OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [bfd/] [ChangeLog] - Blame information for rev 205

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 205 julius
2010-03-03  Tristan Gingold  
2
 
3
        * Makefile.am (RELEASE): Unset.
4
        * Makefile.in: Regenerate.
5
 
6
2010-03-01  Tristan Gingold  
7
 
8
        * configure.in: Bump version to 2.20.1
9
        * Makefile.am (RELEASE): Set.
10
        * configure, Makefile.in: Regenerate.
11
 
12
2010-02-19  Matthew Gretton-Dann  
13
 
14
        2010-01-19  Matthew Gretton-Dann  
15
        * elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of
16
        R_ARM_THM_CALL entry.
17
        (elf32_arm_final_link_relocate): Correct calculation of
18
        reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22,
19
        or R_ARM_THM_JUMP24 relocation.
20
 
21
2010-02-17  Dave Korn  
22
 
23
        PR binutils/11280
24
        * configure.host (*-*-solaris2.11):  Add host define to select
25
        valid default code page for windres/windmc on solaris.
26
 
27
2010-01-30  Richard Sandiford  
28
 
29
        * coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1.
30
        (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE.
31
        * coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and
32
        bitsize to 1.
33
        (xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE.
34
 
35
2010-01-27  Alan Modra  
36
 
37
        PR ld/11217
38
        * elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec.
39
        (ppc64_elf_setup_section_lists): Init them.
40
        (ppc64_elf_next_toc_section): Don't partition multi-toc between .got
41
        and .toc on the same input file.
42
        (ppc64_elf_relocate_section): Correct GOT entry offset.
43
 
44
2010-01-25  Alan Modra  
45
 
46
        PR ld/11217
47
        * elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences
48
        with relocations against undefined weak symbols.
49
        (ppc64_elf_relocate_section): Don't optimize calls to undefined
50
        weak functions if the symbol is dynamic.
51
        (ppc64_elf_relocate_section): Edit tprel tls sequences.
52
        * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
53
        (_bfd_elf_ppc_at_tprel_transform): New function.
54
        * bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare.
55
        * bfd-in2.h: Regenerate.
56
 
57
2010-01-25  Alan Modra  
58
 
59
        2009-12-11  Nick Clifton  
60
        * elf32-ppc.c: Fix shadowed variable warnings.
61
        * elf64-ppc.c: Likewise.
62
 
63
        2009-11-18  Alan Modra  
64
        * bfd-in.h (_bfd_elf_ppc_at_tls_transform): Declare.
65
        * bfd-in2.h: Regenerate.
66
        * elf64-ppc.c (ppc64_elf_relocate_section): Move code for R_PPC64_TLS
67
        insn optimisation to..
68
        * elf32-ppc.c (_bfd_elf_ppc_at_tls_transform): ..here.  New function.
69
        (ppc_elf_relocate_section): Use it.
70
 
71
2010-01-11  Alan Modra  
72
 
73
        PR 11103
74
        * dwarf1.c (parse_die): Correct FORM_STRING data pointer increment.
75
 
76
2010-01-11  Alan Modra  
77
 
78
        PR 6832
79
        * dwarf2.c (struct comp_unit): Add sec_info_ptr.
80
        (find_abstract_instance_name): Use it.
81
        (parse_comp_unit): Set it.
82
 
83
2009-12-21  Alan Modra  
84
 
85
        * elf64-ppc.c: Delete my email address.
86
 
87
2009-12-17  Alan Modra  
88
 
89
        PR ld/11088
90
        * elf32-ppc.c (update_plt_info): Clear sec here when addend is
91
        less than 32768..
92
        (ppc_elf_check_relocs): ..rather than doing so here.  Ignore new
93
        relax relocs.
94
        (ppc_elf_gc_sweep_hook): Don't segfault when symbol hiding has
95
        removed plt_entry records.
96
        (ppc_elf_tls_setup): Handle PIE calls to __tls_get_addr correctly.
97
        (ppc_elf_tls_optimize): Likewise.  Also dec __tls_get_addr refcount
98
        when optimizing code using new tlsgd and tlsld marker relocs.
99
        (ppc_elf_relax_section): Differentiate relaxed PLTREL24 relocs
100
        from ADDR24 relocs using plt or glink.  Don't clear the addend
101
        for R_PPC_RELAX_PLTREL24.
102
        (ppc_elf_relocate_section): Correctly handle addends on relaxed
103
        PLTREL24 relocs.
104
 
105
2009-12-17  Alan Modra  
106
 
107
        PR ld/11088
108
        * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Don't abort if symbol
109
        hiding has nulled out plt.plist.
110
 
111
2009-12-03  Alan Modra  
112
 
113
        PR ld/11047
114
        * elf32-ppc.c (ppc_elf_relocate_section): Delete __tls_get_addr
115
        symbol reference from relocs belonging to calls that are
116
        optimized away.
117
        * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
118
 
119
2009-11-17  Ulrich Weigand  
120
 
121
        * elf32-spu.c (struct spu_link_hash_table): Remove overlay_fixed,
122
        reserved, and extra_stack_space members.
123
        (spu_elf_auto_overlay): Use auto_overlay_fixed, auto_overlay_reserved,
124
        and extra_stack_space members of htab->params instead.
125
 
126
2009-11-03  Alan Modra  
127
            Ulrich Weigand  
128
 
129
        * elf32-spu.c (mark_functions_via_relocs): Handle non-branch relocs
130
        (jump tables or other references to code labels) as well.
131
 
132
2009-10-20  Alan Modra  
133
 
134
        PR binutils/10802
135
        * opncls.c (_maybe_make_executable): Make DYNAMIC files executable.
136
 
137
2009-10-19  Hans-Peter Nilsson  
138
 
139
        * elf32-cris.c (cris_elf_relocate_section) :
140
        Don't subtract the size of the TLS block for non-shared objects
141
        from the relocation.
142
 
143
2009-10-16  Tristan Gingold  
144
 
145
        * configure.in: Bump version to 2.20.0
146
        * Makefile.am (RELEASE): Unset.
147
        * configure, Makefile.in: Regenerate.
148
 
149
2009-10-16  Tristan Gingold  
150
 
151
        * configure.in: Bump version to 2.20
152
        * Makefile.am (RELEASE): Set.
153
        * configure, Makefile.in: Regenerate.
154
 
155
2009-10-16  Alan Modra  
156
 
157
        PR binutils/10785
158
        * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Don't bfd_alloc
159
        bim and bim->buffer.  bfd_malloc instead.
160
        * peicode.h (pe_ILF_build_a_bfd): Similarly.
161
        (ILF_DATA_SIZE): Don't include bim.
162
        * opncls.c (bfd_close): Test bim->buffer non-NULL before freeing.
163
 
164
2009-10-06  Tristan Gingold  
165
 
166
        * configure.in: Bump version to 2.19.92
167
        * configure: Regenerate.
168
 
169
2009-10-01  Dave Korn  
170
 
171
        * cofflink.c (_bfd_coff_generic_relocate_section): Look for the aux
172
        symbol for a weak undef in the auxbfd, not the input bfd.
173
 
174
2009-10-01  Ulrich Weigand  
175
 
176
        * elf32-spu.c (spu_elf_auto_overlay): Insert icache linker script
177
        after .toe instead of before .text section.  Set the LMA of all
178
        overlay sections to their icache IA address.
179
        (spu_elf_find_overlays): Determine icache set id without reference
180
        to the LMA.
181
 
182
2009-09-30  Tristan Gingold  
183
 
184
        * configure.com: Use hosts/alphavms.h on both alpha and ia64 VMS.
185
 
186
2009-09-24  Alan Modra  
187
 
188
        PR binutils/10654
189
        * dwarf2.c (lookup_address_in_line_info_table): Remove workaround
190
        for invalid location lists generated by gcc-2.95 and Intel 6.0 C++.
191
        Remove "function" parm, adjust caller.
192
 
193
2009-09-23  Jie Zhang  
194
 
195
        * elf32-bfin.c (_bfinfdpic_size_got_plt): Make sure empty
196
        .rel.plt and .plt sections are removed.
197
        (elf32_bfinfdpic_size_dynamic_sections): Remove empty .dynbss
198
        section.  Remove the duplicated removing of empty .rel.plt
199
        section.
200
 
201
2009-09-21  Alan Modra  
202
 
203
        * elf32-ppc.c (TLS_GET_ADDR_GLINK_SIZE): Define.
204
        (ADD_3_12_2, BEQLR, CMPWI_11_0, LWZ_11_3, LWZ_12_3): Define.
205
        (MR_0_3, MR_3_0): Define.
206
        (struct ppc_elf_link_hash_table): Add no_tls_get_addr_opt.
207
        (ppc_elf_select_plt_layout): Save emit_stub_syms param earlier.
208
        (ppc_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
209
        table.  Check for presense of __tls_get_addr_opt
210
        (allocate_dynrelocs): Increase glink entry size for __tls_get_addr.
211
        (ppc_elf_size_dynamic_sections): Add DT_PPC_TLS_OPT tag.
212
        (write_glink_stub): Add param p.
213
        (ppc_elf_relocate_section): Adjust write_glink_stub call.
214
        (ppc_elf_finish_dynamic_symbol): Emit special glink call stub for
215
        __tls_get_addr.
216
        * elf32-ppc.h (ppc_elf_tls_setup): Update prototype.
217
        * elf64-ppc.c (struct ppc_link_hash_table): Add no_tls_get_addr_opt.
218
        (ppc64_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
219
        table.  Check for presense of __tls_get_addr_opt.
220
        (ppc64_elf_size_dynamic_sections): Add DT_PPC64_TLS_OPT tag.
221
        (LD_R11_0R3, LD_R12_0R3, MR_R0_R3, CMPDI_R11_0, ADD_R3_R12_R13,
222
        BEQLR, MR_R3_R0, MFLR_R11, STD_R11_0R1, BCTRL, LD_R11_0R1,
223
        LD_R2_0R1, MTLR_R11): Define.
224
        (build_tls_get_addr_stub): New function.
225
        (ppc_build_one_stub): Call it.
226
        (ppc_size_one_stub): Add extra size for __tls_get_addr stub.
227
        (ppc64_elf_relocate_section): Don't change nop to ld 2,40(1) for
228
        __tls_get_addr plt call.
229
        * elf64-ppc.h (ppc64_elf_tls_setup): Update prototype.
230
 
231
2009-09-18  Alan Modra  
232
 
233
        PR ld/10406
234
        * elf32-ppc.c (ppc_elf_howto_raw): Make R_PPC_EMB_SDAI16 and
235
        R_PPC_EMB_SDA2I16 complain_overflow_signed.
236
        (create_sdata_sym): Pass info rather than htab.
237
        Update all callers.  Ensure symbols are hidden.
238
        (ppc_elf_check_relocs): Allow SDAREL16 when shared.
239
        (ppc_elf_size_dynamic_sections): When shared, equate _SDA_BASE_ to
240
        _GLOBAL_OFFSET_TABLE_.
241
        (elf_finish_pointer_linker_section): Don't assume that sdata base
242
        symbol is always at 0x8000 offset.  Don't subtract the addend here.
243
        (is_static_defined): New function.
244
        (ppc_elf_relocate_section): Verify symbol base used in SDA relocs
245
        is statically defined.  Clear addend for EMB_SDAI16 and EMB_SDA2I16
246
        relocs.  Downgrade error on unexpected section for EMB_SDA2REL
247
        reloc symbols to a warning.
248
 
249
2009-09-18  Nick Clifton  
250
 
251
        * po/es.po: Updated Spanish translation.
252
        * po/vi.po: Updated Vietnamese translation.
253
 
254
2009-09-18  Alan Modra  
255
 
256
        * elf64-ppc.c (follow_link, elf_follow_link, ppc_follow_link): New
257
        functions.  Use throughout.
258
        (ppc64_elf_copy_indirect_symbol): Set direct symbol "oh" field
259
        from indirect symbol.
260
        (lookup_fdh): Rename from get_fdh.  Follow indirect sym links.
261
        (add_symbol_adjust): Simplify.
262
        (defined_code_entry, defined_func_desc): New functions.
263
        (ppc64_elf_gc_keep): Follow indirect sym links.  Use defined_code_entry.
264
        (ppc64_elf_gc_mark_dynamic_ref): Use defined_func_desc and
265
        defined_code_entry to follow indirect sym links.
266
        (ppc64_elf_gc_mark_hook, func_desc_adjust): Likewise.
267
        (ppc_type_of_stub): Follow indirect sym links.
268
        (toc_adjusting_stub_needed): Likewise.
269
        (ppc_build_one_stub): Likewise.  Make undefined dot-symbols weak
270
        rather than defining them at stub.
271
        (ppc64_elf_relocate_section): Rewrite call test to avoid multiple
272
        assignments in test.
273
 
274
2009-09-14  Daniel Jacobowitz  
275
 
276
        * elf32-arm.c (elf32_arm_final_link_relocate): Set sym_flags
277
        for the mode of target PLT entries.
278
        (allocate_dynrelocs): Only adjust symbol type if setting its
279
        value.
280
 
281
2009-09-14  Nick Clifton  
282
 
283
        * po/fi.po: Updated Finnish translation.
284
 
285
2009-09-11  Nick Clifton  
286
 
287
        * po/bfd.pot: Updated by the Translation project.
288
 
289
2009-09-11  Nick Clifton  
290
 
291
        * rs6000-core.c (read_hdr): Fix typo in recent C++ compatibility
292
        changes.
293
 
294
2009-09-11  Jie Zhang  
295
 
296
        * elf32-bfin.c (bfinfdpic_relocs_info_find): Just return
297
        NULL if `ht' is NULL.
298
 
299
2009-09-10  Tristan Gingold  
300
 
301
        * configure.in: Bump version to 2.19.91
302
        * configure: Regenerate.
303
 
304
2009-09-09  Martin Thuresson  
305
 
306
        Update sources to compile cleanly with -Wc++-compat:
307
        * aoutx.h: Add casts.
308
        * archive.c: Add casts.
309
        * archive64.c: Add casts.
310
        * archures.c: Add casts.
311
        * bfd-in2.h: Regenerated.
312
        * bfd.c: Add casts. (enum bfd_direction): Move out to top level.
313
        * bfdio.c: Add casts.
314
        * binary.c: Add casts.
315
        * cache.c (cache_bseek,cache_bread_1,cache_bwrite): Updated
316
        parameter to use enum value instead of int.
317
        * coffcode.h: Add casts.
318
        * coffgen.c: Add casts.
319
        * cofflink.c: Add casts.
320
        * compress.c: Add casts.
321
        * dwarf1.c: Add casts.
322
        * dwarf2.c: Add casts. (struct dwarf2_debug): Rename member bfd to
323
        bfd_ptr. Update code to use new name.
324
        * elf-attrs.c: Add casts.
325
        * elf-bfd.h (elf_link_virtual_table_entry): Gives name to
326
        anonymous struct. (union gotplt_union, struct
327
        elf_link_virtual_table_entry): Move to top level.
328
        * elf-eh-frame.c: Add casts.
329
        * elf-strtab.c: Add casts.
330
        * elf.c: Add casts. (_bfd_elm_make_Section_from_phdr): Change
331
        argument name from typename to type_name.
332
        * elf32-i386.c: Add casts.
333
        * elf64-x86-64.c: Add casts.
334
        * elfcode.h: Add casts.
335
        * elfcore.h: Add casts.
336
        * elflink.c: Add casts.
337
        * format.c: Add casts.
338
        * hash.c: Add casts.
339
        * ihex.c: Add casts.
340
        * libaout.h (enum aout_subformat, enum aout_magic): Move to top
341
        level.
342
        * libbfd.c: Add casts.
343
        * linker.c: Add casts.
344
        * merge.c: Add casts.
345
        * opncls.c: Add casts.
346
        * peXXigen.c: Add casts.
347
        * peicode.h: Add casts.
348
        * reloc.c: Add casts.
349
        * section.c: Add casts.
350
        * simple.c: Add casts.
351
        * srec.c: Add casts.
352
        * stabs.c: Add casts.
353
        * syms.c: Add casts.
354
        * targets.c: Add casts.
355
        * tekhex.c: Add casts.
356
        * verilog.c: Add casts.
357
 
358
2009-09-09  Nick Clifton  
359
 
360
        PR 10478:
361
        * elf.c (bfd_section_from_shdr): Do not reject sparc binaries with
362
        section headers containing sh_link values of SHN_BEFORE or
363
        SHN_AFTER.
364
        * elfcode.h (elf_object_p): Likewise.
365
 
366
2009-09-09  Alan Modra  
367
 
368
        * elf32-xtensa.c (elf_xtensa_relax_section): Delete -r check.
369
 
370
2009-09-07  Tristan Gingold  
371
 
372
        * po/bfd.pot: Regenerate
373
        * po/SRC-POTFILES.in: Regenerate
374
 
375
2009-09-07  Tristan Gingold  
376
 
377
        * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
378
        BFD_HAVE_SYS_STAT_TYPE_MEMBER): Moved to gas/acinclude.m4
379
        * configure.in: Move tests for tm_gmtoff, st_mtim.tv_sec and
380
        st_mtim.tv_nsec to gas/configure.in
381
        (bfd_elf64_ia64_vms_vec): Remove vmsutil.lo
382
        * configure: Regenerate.
383
        * config.in: Regenerate.
384
        * vmsutil.c: Moved to gas/config/te-vms.c
385
        * vmsutil.h: Removed.
386
        * Makefile.am (BFD32_BACKENDS_CFILES): Remove vmsutil.c
387
        (BFD32_BACKENDS): Remove vmsutil.lo
388
        * Makefile.in: Regenerate.
389
 
390
2009-09-05  Martin Thuresson  
391
 
392
        * coff-arm.c (coff_arm_relocate_section)
393
        (record_thumb_to_arm_glue, bfd_arm_process_before_allocation):
394
        Change member name class to symbol_class.
395
        * coff-i960.c (coff_i960_relocate_section) Rename variable
396
        class to class_val. Change member name class to symbol_class.
397
        * coff-rs6000.c (_bfd_xcoff_swap_aux_in)
398
        (_bfd_xcoff_swap_aux_out): Rename arguments class to in_class.
399
        * coff-stgo32.c (adjust_aux_in_post)
400
        (adjust_aux_out_pre, adjust_aux_out_post): Rename arguments class
401
        to in_class.
402
        * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in)
403
        (_bfd_xcoff64_swap_aux_out): Rename arguments class to in_class.
404
        * coffcode.h (coff_pointerize_aux_hook): Rename variable class
405
        to n_sclass.
406
        * coffgen.c (coff_write_symbol, coff_pointerize_aux): Rename
407
        variables named class to n_sclass. (coff_write_symbols): Rename
408
        variable class to sym_class. (bfd_coff_set_symbol_class): Rename
409
        argument class to symbol_class.
410
        * cofflink.c (_bfd_coff_link_hash_newfunc)
411
        (coff_link_add_symbols, _bfd_coff_link_input_bfd)
412
        (_bfd_coff_write_global_sym, _bfd_coff_generic_relocate_section):
413
        Update code to use renamed members.
414
        * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Rename
415
        argument class to in_class.
416
        * libcoff-in.h (struct coff_link_hash_entry, struct
417
        coff_debug_merge_type) Renamed members class to symbol_class and
418
        type_class.
419
        * libcoff.h Regenerated.
420
        * peXXigen.c: (_bfd_XXi_swap_aux_in, _bfd_XXi_swap_aux_out):
421
        Rename argument class to in_class.
422
        * pef.c (bfd_pef_parse_imported_symbol): Update code to use
423
        renamed members.
424
        * pef.h (struct bfd_pef_imported_symbol): Changed name of
425
        member class to symbol_class.
426
 
427
2009-09-04  Tristan Gingold  
428
 
429
        * configure.in: Bump version to 2.19.90
430
        * configure: Regenerated.
431
 
432
2009-09-04  Alan Modra  
433
 
434
        * elf32-spu.c (spu_elf_relocate_section): Correct 2009-07-24 logic.
435
 
436
2009-09-04  Jie Zhang  
437
 
438
        * elf32-bfin.c (elf32_bfinfdpic_create_dynamic_sections): Always
439
        create .rela.bss.
440
        (elf32_bfinfdpic_size_dynamic_sections): Set SEC_EXCLUDE flag
441
        for empty .rela.bss and .rel.plt sections.
442
 
443
2009-09-03  Adam Nemet  
444
 
445
        * elfxx-mips.c (mips_elf_calculate_relocation): Don't relocate
446
        R_MIPS_JALR unless symbol resolves locally.
447
 
448
2009-09-03  Adam Nemet  
449
 
450
        * elfxx-mips.c (_bfd_mips_elf_check_relocs): Don't set
451
        has_static_relocs for R_MIPS_JALR.
452
 
453
2009-09-03  Maciej W. Rozycki  
454
 
455
        * elf64-mips.c (mips_elf64_howto_table_rela): Add support for
456
        R_MIPS_TLS_DTPMOD64 and R_MIPS_TLS_TPREL64, replacing the
457
        respective stubs.
458
 
459
2009-09-01  H.J. Lu  
460
 
461
        * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Declare
462
        plt earlier.
463
 
464
2009-09-01  Tristan Gingold  
465
 
466
        * makefile.vms: Ported to Itanium VMS.  Remove useless variable and
467
        dependencies.  Reindent.
468
        * configure.com: Ported to Itanium VMS.  Now generates a build.com
469
        to build without make.  Add messages but make edit silent.
470
        * hosts/alphavms.h: Add a prototype for stpcpy.
471
        * vms.c: Add a missing include for Alpha VMS.
472
        * elfxx-ia64.c (ELF_OSABI): Define for OpenVMS.
473
 
474
2009-08-31  Jan Beulich  
475
 
476
        * elf-bfd.h (bfd_elf_get_default_section_type): Declare.
477
        * elf.c (bfd_elf_get_default_section_type): New.
478
        (elf_fake_sections): Use bfd_elf_get_default_section_type.
479
 
480
2009-08-30  H.J. Lu  
481
 
482
        * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert the
483
        accidental checkin.
484
        * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likwise.
485
 
486
2009-08-30  Alan Modra  
487
 
488
        PR ld/10569
489
        * bfd.c (bfd_emul_get_maxpagesize): Don't abort.
490
        (bfd_emul_get_commonpagesize): Likewise.
491
 
492
2009-08-29  Martin Thuresson  
493
 
494
        * elf32-arm.c (struct stub_def): Rename member template to
495
        template_sequence. (arm_build_one_stub,
496
        find_stub_size_and_template, arm_size_one_stub, arm_map_one_stub):
497
        Rename variable template to template_sequence.
498
        * elfxx-ia64.c (elfNN_ia64_relax_br, elfNN_ia64_relax_brl):
499
        Rename variable template to template_val.
500
        * aoutx.h (NAME (aout, make_empty_symbol)): Rename variable
501
        new to new_symbol.
502
        * coffgen.c (coff_make_empty_symbol)
503
        (coff_bfd_make_debug_symbol): Rename variable new to new_symbol.
504
        * cpu-ia64-opc.c (ext_reg, ins_imms_scaled): Rename variable
505
        new to new_insn.
506
        * ecoff.c (_bfd_ecoff_make_empty_symbol): Rename variable new
507
        to new_symbol.
508
        * elf32-m68k.c (elf_m68k_get_got_entry_type): Rename argument
509
        new to new_reloc.
510
        * hash.c (bfd_hash_lookup): Rename variable new to new_string.
511
        * ieee.c (ieee_make_empty_symbol): Rename variable new to
512
        new_symbol.
513
        * linker.c (bfd_new_link_order): Rename variable new to
514
        new_lo.
515
        * mach-o.c (bfd_mach_o_sizeof_headers): Rename variable new to
516
        symbol.
517
        * oasys.c (oasys_make_empty_symbol): Rename variable new to
518
        new_symbol_type.
519
        * pdp11.c (NAME (aout, make_empty_symbol)): Rename variable
520
        new to new_symbol_type.
521
        * plugin.c (bfd_plugin_make_empty_symbol): Rename variable new
522
        to new_symbol.
523
        * rs6000-core.c (CoreHdr, VmInfo): Rename union member new to
524
        new_dump.
525
        (read_hdr, rs6000coff_core_p)
526
        (rs6000coff_core_file_matches_executable_p)
527
        (rs6000coff_core_file_failing_command)
528
        (rs6000coff_core_file_failing_signal): Updated function to use new
529
        union member name.
530
        * som.c (som_make_empty_symbol): Rename variable new to
531
        new_symbol_type.
532
        * syms.c (_bfd_generic_make_empty_symbol): Rename variable new
533
        to new_symbol.
534
        * tekhex.c (first_phase, tekhex_make_empty_symbol): Rename
535
        variable new to new_symbol.
536
 
537
2009-08-27  Ralf Wildenhues  
538
 
539
        * acinclude.m4 (AM_INSTALL_LIBBFD): Call AM_SUBST_NOTMAKE for
540
        bfdlibdir and bfdincludedir.
541
        * Makefile.am (bfdlibdir, bfdincludedir): Move definition ...
542
        [INSTALL_LIBBFD]: ... here, ...
543
        [INSTALL_LIBBFD]: ... and empty overrides here.
544
        [!INSTALL_LIBBFD]: (rpath_bfdlibdir): New variable.
545
        [!INSTALL_LIBBFD] (libbfd_la_LDFLAGS): Use it.
546
        * Makefile.in: Regenerate.
547
        * configure: Regenerate.
548
 
549
2009-08-26  Maxim Kuvyrkov  
550
 
551
        * elf32-m68k.c: Rewrite initialization of GOT entries for TLS
552
        relocations.  Rewrite output of dynamic TLS relocations.
553
        (DTP_OFFSET, TP_OFFSET): New constants.
554
        (dtpoff_base): Update.
555
        (tpoff): Rename to tpoff_base, update.
556
        (elf_m68k_init_got_entry_static, elf_m68k_init_got_entry_local_shared):
557
        New functions.  Move code from elf_m68k_relocate_section here.
558
        (elf_m68k_relocate_section): Update.
559
        (elf_m68k_finish_dynamic_symbol): Fix handling of local TLS symbols.
560
 
561
2009-08-26  Maxim Kuvyrkov  
562
 
563
        * elf32-m68k.c (elf_m68k_copy_indirect_symbol): Propagate
564
        non_got_ref value.
565
        (elf_m68k_check_relocs): Handle dynamic TLS relocations.
566
        Handle non_got_ref field.
567
        (elf_m68k_adjust_dynamic_symbol): Handle non_got_ref field.
568
 
569
2009-08-26  Alan Modra  
570
 
571
        PR ld/10518
572
        * linker.c (bfd_find_version_for_sym): Revert warning.
573
 
574
2009-08-26  Alan Modra  
575
 
576
        PR ld/10518
577
        * linker.c (bfd_find_version_for_sym): Override a "*" match by any
578
        other wildcard match.  Warn on multiple wildcard matches.
579
 
580
2009-08-22  Ralf Wildenhues  
581
 
582
        * Makefile.am (libbfd_la_LDFLAGS): Initialize early, to allow
583
        appending.
584
        [INSTALL_LIBBFD] (bfdlib_LTLIBRARIES, bfdinclude_HEADERS): Set
585
        only in this condition.
586
        [!INSTALL_LIBBFD] (noinst_LTLIBRARIES, libbfd_la_LDFLAGS): New,
587
        to build but not install libbfd.la in this condition.
588
        (install-bfdlibLTLIBRARIES, uninstall-bfdlibLTLIBRARIES)
589
        (install_libbfd, install_libbfd): Remove.
590
        * Makefile.in: Regenerate.
591
        * doc/Makefile.am (AM_CPPFLAGS): Renamed from ...
592
        (INCLUDES): ... this.
593
        ($(MKDOC)): Adjust.
594
        * doc/Makefile.in: Regenerate.
595
 
596
        * Makefile.am (AUTOMAKE_OPTIONS): Remove cygnus, instead use
597
        no-dist and foreign.
598
        (EXTRA_libbfd_la_SOURCES): New, list $(CFILES) to allow
599
        dependency tracking to work for them.
600
        (targets.lo, archures.lo, dwarf.lo): Rewrite to
601
        use automake dependency tracking mechanism.
602
        (MKDEP, DEP, DEP1, dep.sed, dep, dep-in, dep-am): Remove.
603
        (mkdep section): Remove.
604
        (BUILT_SOURCES): New, list $(BUILD_HFILES).
605
        * Makefile.in: Regenerate.
606
        * po/SRC-POTFILES.in, po/bfd.pot: Regenerate.
607
 
608
        * Makefile.am (datarootdir, docdir, htmldor, pdfdir)
609
        (install-pdf, install-pdf-recursive, install-html)
610
        (install-html-recursive): Remove.
611
        * Makefile.in: Regenerate.
612
 
613
        * Makefile.in: Regenerate.
614
        * aclocal.m4: Likewise.
615
        * config.in: Likewise.
616
        * configure: Likewise.
617
 
618
2009-08-21  Daniel Gutson  
619
 
620
        * elf32-arm.c (arch_has_thumb2_nop): New function.
621
        (arch_has_arm_nop): New function.
622
        (elf32_arm_final_link_relocate): NOP opcodes changed.
623
 
624
2009-08-16  Doug Evans  
625
 
626
        * opncls.c (bfd_close): Until BFD_IN_MEMORY has an iovec,
627
        at least don't leak memory.
628
 
629
2009-08-13  DJ Delorie  
630
 
631
        * elf32-m32c.c (m32c_elf_relax_delete_bytes): Adjust symbol sizes
632
        if needed.
633
 
634
2009-08-12  Nick Clifton  
635
 
636
        * po/fi.po: Updated Finnish translation.
637
 
638
2009-08-11  Bernd Schmidt  
639
 
640
        Merge some FRV FDPIC changes into the Blackfin code.
641
        * elf32-bfin.c (struct bfinfdpic_elf_link_hash_table): Add pointer to
642
        summary reloc information.
643
        (bfinfdpic_dynamic_got_plt_info): New.
644
        (_bfin_create_got_section): Create the PLT section here.
645
        (elf32_bfinfdpic_create_dynamic_sections): Not here.
646
        (_bfinfdpic_count_nontls_entries): Move out of...
647
        (_bfinfdpic_count_got_plt_entries): ... here.
648
        (_bfinfdpic_count_relocs_fixups): Likewise.
649
        (_bfinfdpic_reset_got_plt_entries): New.
650
        (_bfinfdpic_size_got_plt): Move out of...
651
        (elf32_bfinfdpic_size_dynamic_sections): ... here.
652
        (bfinfdpic_relocate_section): Be careful not to call
653
        _bfinfdpic_add_rofixup or _bfinfdpic_add_dyn_reloc for deleted relocs.
654
        (bfinfdpic_check_discarded_relocs, bfinfdpic_elf_discard_info):
655
        New functions.
656
        (elf_backend_discard_info): Define for FD-PIC.
657
 
658
2009-08-11  Alan Modra  
659
 
660
        * elflink.c: Add FIXMEs for some places that require octets_per_byte
661
        adjustments.
662
        * elf-eh-frame.c: Likewise.
663
        * merge.c: Likewise.
664
 
665
2009-08-11  Alan Modra  
666
 
667
        * configure.in:  Remove elf-ifunc.lo from common ELF files.  Add
668
        to x86 and x86_64 configurations.
669
        * configure: Regenerate.
670
 
671
2009-08-10  Jan Kratochvil  
672
 
673
        Stop using bfd_usrdata in libbfd.
674
        * coff-stgo32.c (bfd_coff_go32stub): Remove.
675
        (stub_bytes, comment): Replace STUBSIZE by GO32_STUBSIZE.
676
        (adjust_filehdr_in_post): Declare the abfd parameter as unused.
677
        Replace STUBSIZE by GO32_STUBSIZE.  Save now the stub in
678
        filehdr_dst->u.go32.stub.  New comment with the reason.
679
        (adjust_filehdr_out_pre): Replace STUBSIZE by GO32_STUBSIZE.
680
        Substitute the removed macro bfd_coff_go32stub.
681
        (adjust_filehdr_out_post, adjust_scnhdr_in_post, adjust_scnhdr_out_pre)
682
        (adjust_scnhdr_out_post, adjust_aux_in_post, adjust_aux_out_pre)
683
        (adjust_aux_out_post): Replace STUBSIZE by GO32_STUBSIZE.
684
        (create_go32_stub, go32_stubbed_coff_bfd_copy_private_bfd_data):
685
        Replace STUBSIZE by GO32_STUBSIZE.  Substitute the removed macro
686
        bfd_coff_go32stub.
687
        * coffcode.h (coff_mkobject_hook): Initialize coff->go32stub.
688
        * libcoff-in.h (coff_data_type): New field go32stub.
689
        * libcoff.h: Regenerated.
690
 
691
2009-08-10  Jan Kratochvil  
692
 
693
        Fix go32 stub preservation by objcopy.
694
        * coff-stgo32.c (adjust_filehdr_in_post): Use bfd_malloc.
695
        (go32_stubbed_coff_bfd_copy_private_bfd_data): Optionally allocate OBFD
696
        go32stub.
697
 
698
2009-08-10  Nathan Sidwell  
699
 
700
        * elf32-arm.c (elf32_arm_size_stubs): Don't die on undefined local
701
        symbols.
702
        (elf32_arm_final_link_relocate): Treat local undefined symbols the
703
        same as global undefined symbols.
704
        (elf32_arm_relocate_section): Give an error for local undefined
705
        non-weak symbols, unless the reloc will not use the symbol.
706
 
707
2009-08-10  Nathan Sidwell  
708
 
709
        * elf32-ppc.c (shared_stub_entry, stub_entry): Use r12, not r11.
710
        (ppc_elf_relax_section): Use symbol index to distinguish
711
        relocatable stubs.
712
 
713
2009-08-10  Alan Modra  
714
 
715
        * elf32-ppc.c (ppc_elf_relax_section): Ignore non-code sections.
716
 
717
2009-08-10  Alan Modra  
718
 
719
        * elflink.c (_bfd_elf_adjust_dynamic_symbol): Don't clear plt
720
        info for STT_GNU_IFUNC.
721
        * elf32-ppc.c (ppc_elf_check_relocs): Count a needed plt entry
722
        on got refs in case the symbol turns out to be ifunc.
723
        (ppc_elf_gc_sweep_hook): Similarly.
724
        (ppc_elf_adjust_dynamic_symbol): Adjust assertion.
725
        (allocate_dynrelocs): Don't specially allocate got relocs for ifunc.
726
        (ppc_elf_size_dynamic_sections): Likewise.
727
        (ppc_elf_relocate_section): Likewise.
728
 
729
2009-08-09  Bernd Schmidt  
730
 
731
        From Mike Frysinger 
732
        * elf32-bfin.c (bfin_howto_table, bfin_reloc_map, bfin_check_relocs,
733
        bfin_final_link_relocate, bfin_relocate_section, bfin_gc_sweep_hook,
734
        _bfinfdpic_emit_got_relocs_plt_entries, bfinfdpic_relocate_section,
735
        bfinfdpic_gc_sweep_hook, bfinfdpic_check_relocs,
736
        bfin_finish_dynamic_symbol, bfd_bfin_elf32_create_embedded_relocs):
737
        Adjust to match the renamed reloc definitions.
738
 
739
2009-08-08  Alan Modra  
740
 
741
        PR 10494
742
        * elf.c (_bfd_elf_make_section_from_shdr): When setting up section
743
        LMAs, use ELF_IS_SECTION_IN_SEGMENT to match sections with headers.
744
 
745
2009-08-07  Tom Tromey  
746
 
747
        * elf32-microblaze.c (microblaze_elf_check_relocs): Avoid strict
748
        aliasing error.
749
 
750
2009-08-06  Michael Eager 
751
 
752
        * Makefile.am: Add cpu-microblaze.{lo,c}, elf32-microblaze.{lo,c}.
753
        * Makefile.in: Regenerate.
754
        * archures.c: Add bfd_arch_microblaze.
755
        * bfd-in2.h: Regenerate.
756
        * config.bfd: Add microblaze target.
757
        * configure.in: Add bfd_elf32_microblaze_vec target.
758
        * configure: Regenerate.
759
        * cpu-microblaze.c: New.
760
        * elf32-microblaze.c: New.
761
        * libbfd-in.h: Add prototype _bfd_dwarf2_fixup_section_debug_loc().
762
        * libbfd.h: Regenerate.
763
        * reloc.c: Add MICROBLAZE relocations.
764
        * section.c: Add struct relax_table and relax_count to section.
765
        * targets.c: Add bfd_elf32_microblaze_vec.
766
 
767
2009-08-06  Jakub Jelinek  
768
            Alan Modra  
769
 
770
        PR binutils/10492
771
        * elf.c (sym_is_global): Return true even for BSF_GNU_UNIQUE
772
        symbols.
773
        * elf32-mips.c (mips_elf_sym_is_global): Likewise.
774
        * elfn32-mips.c (mips_elf_sym_is_global): Likewise.
775
 
776
2009-08-06  Nathan Sidwell  
777
 
778
        * elf32-arm.c (elf32_arm_size_stubs): Call layout_sections_again
779
        at least once when fixing cortex-a8.
780
 
781
2009-08-05  Chao-ying Fu  
782
 
783
        * elf32-mips.c (mips_reloc_map): Add BFD_RELOC_MIPS_JALR.
784
        * elfxx-mips.c (JAL_TO_BAL_P): New define to transform JAL to BAL
785
        for CPUs.  It is true for RM9000.
786
        (JALR_TO_BAL_P): New define to transform JALR to BAL.  It is true
787
        for all CPUs.
788
        (mips_elf_perform_relocation): Use JAL_TO_BAL_P and JALR_TO_BAL_P
789
        to guard the transformation.
790
 
791
2009-08-05  Trevor Smigiel  
792
 
793
        * elf32-spu.h (spu_elf_params): Add member emit_fixups.
794
        (spu_elf_size_sections): Declare prototype.
795
        * elf32-spu.c (spu_link_hash_table): Add member sfixup.
796
        (FIXUP_RECORD_SIZE, FIXUP_GET, FIXUP_PUT): New macros.
797
        (spu_elf_emit_fixup): New function.
798
        (spu_elf_relocate_section): Emit fixup for each SPU_ADDR32.
799
        (spu_elf_size_sections): New function.
800
 
801
2009-08-05  Nathan Sidwell  
802
 
803
        * elf32-arm.c (elf32_arm_stub_type): Add arm_stub_a8_veneer_lwm.
804
        (arm_build_one_stub): Build a8 veneers as a separate pass.
805
        (cortex_a8_erratum_scan): Add prev_num_a8_fixes and stub_changed_p
806
        parameters.  Use them to check if we create a different a8 fixup
807
        than the previous pass.
808
        (elf32_arm_size_stubs): Move scope of stub_changed and
809
        prev_num_a8_fixes into main loop.
810
        (elf32_arm_build_stubs): Build a8 veneers in a second pass.
811
 
812
2009-08-04  Alan Modra  
813
 
814
        * elf32-ppc.c (ppc_elf_relax_section): Correct conditions under
815
        which find_plt_ent is called.  Delete redundant code.
816
 
817
2009-08-03  H.J. Lu  
818
 
819
        PR binutils/10363
820
        * elf.c (bfd_elf_string_from_elf_section): Return NULL on
821
        invalid string offset.
822
 
823
2009-08-03  H.J. Lu  
824
 
825
        PR ld/10433
826
        * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Set got
827
        to htab->init_got_offset and plt to htab->init_plt_offset
828
        when discarding space for dynamic relocations.
829
 
830
2009-08-03  Alan Modra  
831
 
832
        * elf32-ppc.c (struct plt_entry): Revise comments.
833
        (ppc_elf_check_relocs): Don't create needless plt_entry info
834
        for non-pie executables.  Don't test info->pie when info->shared
835
        already covers that case.
836
        (ppc_elf_gc_sweep_hook): Adjust for above change.
837
        (add_stub_sym): Don't test info->pie when info->shared tested.
838
        (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Likewise.
839
        (write_glink_stub, ppc_elf_finish_dynamic_symbol): Likewise.
840
        (ppc_elf_relax_section): Adjust find_plt_ent arguments.
841
        (ppc_elf_relocate_section): Likewise.
842
 
843
2009-08-03  Alan Modra  
844
 
845
        * elf32-ppc.c (ppc_elf_check_relocs): Always add a plt ref count
846
        for local ifunc symbols in non-pie executables, regardless of
847
        reloc type.  Don't specially create ifunc dyn relocs.  Tidy ifunc
848
        code so that it's obvious that we only do anything special for
849
        local ifunc syms.
850
        (ppc_elf_gc_sweep_hook): Adjust to suit check_relocs changes.
851
        (allocate_dynrelocs): Correct comment for syms defined in plt.
852
        Don't specially allocate ifunc dyn relocs.
853
        (ppc_elf_relax_section): Relax branches to ifunc plt entries too.
854
        (ppc_elf_relocate_section): Set "relocation" value for ifunc
855
        syms in non-pie executables.  No specially allocated dyn relocs
856
        for ifunc to write.  Allow for local sym on R_PPC_RELAX32_PLT.
857
        (ppc_elf_finish_dynamic_symbol): Set value of ifunc symbols in
858
        a non-pie executable.
859
 
860
2009-08-02  H.J. Lu  
861
            Jakub Jelinek  
862
 
863
        PR ld/6443
864
        * elf32-i386.c (elf_i386_tls_transition): Check executable
865
        instead of shared for TLS when building PIE.
866
        (elf_i386_check_relocs): Likewise.
867
        (elf_i386_allocate_dynrelocs): Likewise.
868
        (elf_i386_relocate_section): Likewise.
869
 
870
        * elf64-x86-64.c (elf64_x86_64_tls_transition): Check executable
871
        instead of shared for TLS when building PIE.
872
        (elf64_x86_64_check_relocs): Likewise.
873
        (elf64_x86_64_allocate_dynrelocs): Likewise.
874
        (elf64_x86_64_relocate_section): Likewise.
875
 
876
2009-07-31  Anthony Green  
877
 
878
        * config.bfd (targ_cpu): Add moxie-uclinux support.
879
 
880
2009-07-31  Hans-Peter Nilsson  
881
 
882
        * linker.c (fix_syms): Consider SEC_LOAD when choosing section.
883
 
884
2009-07-30  Alan Modra  
885
 
886
        * elf32-ppc.c (ppc_elf_check_relocs): Always set up sections
887
        used by indirect function support.  Count dynamic relocs for
888
        ifunc syms.
889
        (ppc_elf_adjust_dynamic_symbol): Tweak for ifunc.
890
        (allocate_dynrelocs): Allocate all non-dynamic ifunc plt entries
891
        in iplt and their relocs in reliplt.  Don't make ifunc syms
892
        dynamic.  Allocate got entry relocs for non-dynamic ifunc in
893
        reliplt.  Handle other dynamic relocs for ifunc.
894
        (ppc_elf_size_dynamic_sections): Alloc dyn relocs for static
895
        ifunc in reliplt, likewise relocs for got against local ifunc.
896
        Typo fix on reliplt size adjust.
897
        (ppc_elf_relocate_section): Don't use plt scheme of allocating
898
        relocs 1-1 with entries for iplt, instead just add using
899
        reloc_count.  Write got relocs and dyn relocs for ifunc to reliplt.
900
        Error on invalid ifunc dyn relocs.
901
        (ppc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt
902
        in iplt/reliplt.
903
        * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_JMP_IREL,
904
        R_PPC64_REL16, R_PPC64_REL16_LO, R_PPC64_REL16_HI, R_PPC64_REL16_HA.
905
        (ppc64_elf_reloc_type_lookup): Handle new relocs.
906
        (ppc64_elf_check_relocs): Likewise.  Count dyn relocs for ifunc.
907
        (allocate_dynrelocs): As for elf32-ppc.c above.
908
        (ppc64_elf_size_dynamic_sections): Likewise.
909
        (ppc_build_one_stub): Put non-dynamic ifunc plt call stubs in iplt,
910
        and their relocs in reliplt.  Use R_PPC64_JMP_IREL.
911
        (ppc_size_one_stub): Similarly.
912
        (ppc64_elf_relocate_section): As for elf32-ppc.c above.  Handle new
913
        relocs too.
914
        (ppc64_elf_finish_dynamic_symbol): As for elf32-ppc.c above.
915
 
916
2009-07-29  Hans-Peter Nilsson  
917
 
918
        * elf64-mmix.c (mmix_elf_relax_section): Revert 2009-05-27
919
        change.  Add note to head comment.
920
 
921
2009-07-28  Jan Beulich  
922
 
923
        * archive.c (get_extended_arelt_filename): Remove redundant
924
        range check on index.
925
 
926
2009-07-27  Doug Kwan  
927
 
928
        * elf32-arm.c (stub_hash_newfunc): Initialize field output_name.
929
 
930
2009-07-27  H.J. Lu  
931
 
932
        * archures.c bfd_*_arch): Sorted.
933
        (bfd_archures_list): Likewise.
934
 
935
2009-07-27  M R Swami Reddy 
936
 
937
        * elf32-cr16.c (elf_cr16_final_link_relocate): Add code to handle
938
        to R_cr16_NUM32 relocation.
939
 
940
2009-07-26  Michael Eager  
941
 
942
        * archures.c: Add bfd_mach_ppc_405
943
        * bfd-in2.h: Same.
944
 
945
2009-07-25  H.J. Lu  
946
 
947
        * cpu-i386.c (bfd_x86_64_arch): Fix comment typos.
948
        * cpu-l1om.c (bfd_l1om_arch): Likewise.
949
 
950
2009-07-25  H.J. Lu  
951
 
952
        * archures.c (bfd_architecture): Add bfd_arch_l1om.
953
        (bfd_l1om_arch): New.
954
        (bfd_archures_list): Add &bfd_l1om_arch.
955
        * bfd-in2.h: Regenerated.
956
 
957
        * config.bfd (targ64_selvecs): Add bfd_elf64_l1om_vec if
958
        bfd_elf64_x86_64_vec is supported.  Add bfd_elf64_l1om_freebsd_vec
959
        if bfd_elf64_x86_64_freebsd_vec is supported.
960
        (targ_selvecs): Likewise.
961
 
962
        * configure.in: Support bfd_elf64_l1om_vec and
963
        bfd_elf64_l1om_freebsd_vec.
964
        * configure: Regenerated.
965
 
966
        * cpu-l1om.c: New.
967
 
968
        * elf64-x86-64.c (elf64_l1om_elf_object_p): New.
969
        (bfd_elf64_l1om_vec): Likewise.
970
        (bfd_elf64_l1om_freebsd_vec): Likewise.
971
 
972
        * Makefile.am (ALL_MACHINES): Add cpu-l1om.lo.
973
        (ALL_MACHINES_CFILES): Add cpu-l1om.c.
974
        * Makefile.in: Regenerated.
975
 
976
        * targets.c (bfd_elf64_l1om_vec): New.
977
        (bfd_elf64_l1om_freebsd_vec): Likewise.
978
        (_bfd_target_vector): Add bfd_elf64_l1om_vec and
979
        bfd_elf64_l1om_freebsd_vec.
980
 
981
2009-07-24  Trevor Smigiel  
982
            Alan Modra  
983
 
984
        * reloc.c (BFD_RELOC_SPU_ADD_PIC): Define.
985
        * bfd-in2.h: Regenerate.
986
        * libbfd.h: Regenerate.
987
        * elf32-spu.c (elf_howto_table): Add entries SPU_ADD_PIC.
988
        (spu_elf_bfd_to_reloc_type): Handle SPU_ADD_PIC.
989
        (spu_elf_relocate_section): Patch instructions marked by SPU_ADD_PIC.
990
 
991
2009-07-23  H.J. Lu  
992
 
993
        PR ld/10434
994
        * elf64-x86-64.c (elf64_x86_64_check_relocs): Check executable
995
        instead of shared for R_X86_64_TPOFF32.
996
        (elf64_x86_64_relocate_section): Likewise.
997
 
998
2009-07-23  Ulrich Drepper  
999
 
1000
        * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field.
1001
        * elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols
1002
        with the BSF_GNU_UNIQUE flag bit set.
1003
        * elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag
1004
        for symbols with STB_GNU_UNIQUE binding.
1005
        * elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols
1006
        with the STB_GNU_UNIQUE binding.
1007
        (elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for
1008
        symbols with STB_GNU_UNIQUE binding.  Set STB_GNU_UNIQUE for
1009
        symbols with the unique_global field set.
1010
        (elf_link_output_extsym): Set unique_global field for symbols with
1011
        the STB_GNU_UNIQUE binding.
1012
        * syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit.
1013
        (bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE
1014
        symbols.
1015
        (bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE
1016
        symbols.
1017
        * bfd-in2.h: Regenerate.
1018
 
1019
2009-07-22  H.J. Lu  
1020
 
1021
        * elflink.c (elf_link_output_extsym): Revert the last change.
1022
 
1023
2009-07-22  H.J. Lu  
1024
 
1025
        PR ld/10433
1026
        * elflink.c (elf_link_output_extsym): Special case ifunc syms
1027
        when ref_regular, not def_regular.
1028
 
1029
2009-07-21  H.J. Lu  
1030
 
1031
        PR ld/10426
1032
        * elflink.c (elf_link_add_object_symbols): Turn an IFUNC symbol
1033
        from a DSO into a normal FUNC symbol.
1034
        (elf_link_output_extsym): Turn an undefined IFUNC symbol into
1035
        a normal FUNC symbol.
1036
 
1037
2009-07-17  Chao-ying Fu  
1038
 
1039
        * elfxx-mips.c (LOAD_INTERLOCKS_P): New define.
1040
        (_bfd_mips_elf_size_dynamic_sections): For CPUs without load
1041
        interlocking, the last PLT entry needs a nop in the branch delay slot.
1042
        (_bfd_mips_elf_finish_dynamic_symbol): For CPUs with load itnerlocking,
1043
        output the last two PLT entries in reverse order.
1044
 
1045
2009-07-16  H.J. Lu  
1046
 
1047
        * elf32-i386.c (elf_i386_relocate_section): Don't get local
1048
        STT_GNU_IFUNC symbol for relocatable link.
1049
        * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1050
 
1051
2009-07-10  H.J. Lu  
1052
 
1053
        * bfdio.c (bfd_iovec): Add comments for bmmap.
1054
        * bfd-in2.h: Regenerated.
1055
 
1056
2009-07-10  H.J. Lu  
1057
 
1058
        * Makefile.am: Run "make dep-am".
1059
        * Makefile.in: Regenerated.
1060
 
1061
2009-07-10  Doug Kwan  
1062
 
1063
        * elf32-arm.c (stub_hash_newfunc): Initialize fields
1064
        target_addend and orig_insn.
1065
 
1066
2009-07-10  Tom Tromey  
1067
 
1068
        * Makefile.am (dwarf2.lo): Use dwarf2.h, not elf/dwarf2.h.
1069
        (elf-eh-frame.lo): Likewise.
1070
        (elf32-bfin.lo): Likewise.
1071
        (elf32-frv.lo): Likewise.
1072
        (elf32-xc16x.lo): Likewise.
1073
        * Makefile.in: Rebuild.
1074
        * dwarf2.c: Included dwarf.h, not elf/dwarf2.h.
1075
        * elf-eh-frame.c: Likewise.
1076
        * elf32-bfin.c: Likewise.
1077
        * elf32-frv.c: Likewise.
1078
        * elf32-xc16x.c: Likewise.
1079
 
1080
2009-07-10  Julian Brown  
1081
 
1082
        * elf32-arm.c (arm_build_one_stub): Use the hash entry of the
1083
        symbol a stub entry is derived from, not the entry for the stub
1084
        itself, in call to elf32_arm_final_link_relocate.
1085
 
1086
2009-07-10  H.J. Lu  
1087
 
1088
        * elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros
1089
        when reporting  addends.
1090
 
1091
2009-07-10  Alan Modra  
1092
 
1093
        * elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager
1094
        data even when no stubs.
1095
        (spu_elf_place_overlay_data, spu_elf_build_stubs): Adjust.
1096
 
1097
2009-07-10  Alan Modra  
1098
 
1099
        * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_IRELATIVE.
1100
        (ppc_elf_get_synthetic_symtab): Report addend.
1101
        (PLT_IFUNC): Define.
1102
        (struct ppc_elf_link_hash_table): Add iplt and reliplt.
1103
        (ppc_elf_create_glink): New function.
1104
        (ppc_elf_create_dynamic_sections): Use it.
1105
        (ppc_elf_add_symbol_hook): Set has_ifunc_symbols.
1106
        (update_local_sym_info): Allocate space for local_plt array.
1107
        Don't bump local_got_refcounts for PLT_IFUNC.  Return local_plt
1108
        entry pointer.
1109
        (is_branch_reloc): New function.
1110
        (ppc_elf_check_relocs): Handle STT_GNU_IFUNC symbols.
1111
        (ppc_elf_gc_sweep_hook): Likewise.
1112
        (ppc_elf_adjust_dynamic_symbol): Likewise.
1113
        (allocate_dynrelocs): Likewise.
1114
        (ppc_elf_size_dynamic_sections): Likewise.
1115
        (ppc_elf_relocate_section): Likewise.
1116
        (branch_reloc_hash_match): Use is_branch_reloc.
1117
        (ppc_elf_tls_optimize): Adjust for local_plt.
1118
        (write_glink_stub): New function, extracted from..
1119
        (ppc_elf_finish_dynamic_symbol): ..here.  Handle STT_GNU_IFUNC.
1120
        (ppc_elf_finish_dynamic_sections): Only write plt resolver and
1121
        branch table when dynamic.
1122
        (elf_backend_post_process_headers): Define.
1123
        * elf64-ppc.c (elf_backend_post_process_headers): Define.
1124
        (ppc64_elf_howto_raw): Add R_PPC64_IRELATIVE.
1125
        (ppc64_elf_get_synthetic_symtab): Report addend.
1126
        (struct ppc_stub_hash_entry): Add plt_ent.
1127
        (PLT_IFUNC): Define.
1128
        (struct ppc_link_hash_table): Add iplt and reliplt.
1129
        (create_linkage_sections): Make .iplt and .rela.iplt sections.
1130
        (ppc64_elf_add_symbol_hook): Set has_ifunc_symbols.
1131
        (update_local_sym_info): Allocate space for local_plt array.
1132
        Don't bump local_got_ents for PLT_IFUNC.  Return local_plt
1133
        entry pointer.
1134
        (update_plt_info): Pass pointer to plt_entry rather than sym hash,
1135
        and don't change hash flags here.
1136
        (is_branch_reloc): New function.
1137
        (ppc64_elf_check_relocs): Handle STT_GNU_IFUNC.
1138
        (ppc64_elf_gc_sweep_hook): Likewise.
1139
        (ppc64_elf_adjust_dynamic_symbol): Likewise.
1140
        (allocate_dynrelocs): Likewise.
1141
        (ppc64_elf_size_dynamic_sections): Likewise.
1142
        (ppc_build_one_stub, ppc_size_one_stub): Likewise.
1143
        (ppc64_elf_size_stubs): Likewise.
1144
        (ppc64_elf_relocate_section): Likewise.
1145
        (get_sym_h): Adjust for local_plt.
1146
        (branch_reloc_hash_match): Use is_branch_reloc.
1147
        (ppc_type_of_stub): Pass plt_entry pointer and handle ifunc.
1148
        (ppc64_elf_toc): Ignore SEC_EXCLUDE sections.
1149
 
1150
2009-07-10  Alan Modra  
1151
 
1152
        * elf.c (_bfd_elf_get_synthetic_symtab): Report addends.
1153
 
1154
2009-07-10  Alan Modra  
1155
 
1156
        * elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular
1157
        and ref_regular_nonweak comment.
1158
        * elflink.c (elf_link_output_extsym): Special case ifunc syms
1159
        when def_regular, not ref_regular.
1160
        (elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,..
1161
        * elf32-i386.c (elf_i386_check_relocs): ..set it here instead..
1162
        * elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here.
1163
 
1164
2009-07-09  Alan Modra  
1165
 
1166
        * elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field
1167
        of malloc'd struct call_info.
1168
        (pasted_function): Likewise, priority too.
1169
 
1170
2009-07-07  Alan Modra  
1171
 
1172
        * elf32-spu.c (spu_elf_auto_overlay): Take into account section
1173
        alignment when packing sections into overlays.
1174
 
1175
2009-07-03  Cary Coutant  
1176
 
1177
        * dwarf2.c (decode_line_info): Ignore DW_LNE_set_discriminator.
1178
 
1179
2009-07-03  Dave Korn  
1180
 
1181
        * coffcode.h (sec_to_styp_flags):  Partially revert (functional
1182
        changes only) earlier patch:-
1183
 
1184
2009-06-25  Kai Tietz  
1185
 
1186
        * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
1187
        give .debug and .reloc data characteristics.
1188
        (DOT_RELOC): New define for .reloc section string.
1189
        (coff_write_object_contents): Use DOT_RELOC instead of string.
1190
 
1191
2009-07-02  Tom Tromey  
1192
 
1193
        * aoutx.h (aout_get_external_symbols): Declare 'amt' locally.
1194
        * bfdwin.c (bfd_free_window): Cast to unsigned long.
1195
 
1196
2009-07-01  Nick Clifton  
1197
 
1198
        * elf-m10300.c: Remove trailing white space.
1199
        * reloc.c: Likewise.
1200
 
1201
2009-07-01  Douglas B Rupp  
1202
 
1203
        * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
1204
        BFD_HAVE_SYS_STAT_TYPE_MEMBER): New config functions.
1205
        * configure.in: Use them.
1206
        * configure: Regenerate.
1207
        * config.in: Regenerate.
1208
        * vmsutil.c: Include sysdep.h, remove ansidecl.h.
1209
        #define _BSD_SOURCE. Add comments.
1210
        (vms_file_stats_name): Calculate creation date based on available
1211
        runtime data. Return 1 for version instead of 0.
1212
 
1213
2009-07-01  Nick Clifton  
1214
 
1215
        PR 10072
1216
        * elf32-arm.c (elf32_arm_final_link_relocate): Add code to handle
1217
        to R_ARM_THM_PC8 relocation.
1218
 
1219
2009-06-29  Nick Clifton  
1220
 
1221
        * elf-m10300.c (mn10300_elf_relax_section): Allow for the
1222
        different uses of the relocations addend when a symbol is in a
1223
        merged section.
1224
 
1225
2009-06-27  H.J. Lu  
1226
 
1227
        PR ld/10337
1228
        * elf.c (bfd_section_from_shdr): Don't change sh_link for
1229
        SHT_REL/SHT_RELA sections on executable nor shared library.
1230
        Treat SHT_REL/SHT_RELA sections with sh_link set to SHN_UNDEF
1231
        as a normal section.
1232
 
1233
2009-06-25  Nick Clifton  
1234
 
1235
        * elf-m10300.c (mn10300_elf_relax_section): Handle non-section
1236
        symbols with SEC_MERGE flag.
1237
 
1238
2009-06-25  Kai Tietz  
1239
 
1240
        * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
1241
        give .debug and .reloc data characteristics.
1242
        (DOT_RELOC): New define for .reloc section string.
1243
        (coff_write_object_contents): Use DOT_RELOC instead of string.
1244
 
1245
2009-06-25  Tristan Gingold  
1246
 
1247
        * mach-o-target.c (bfd_mach_o_get_dynamic_symtab_upper_bound)
1248
        (bfd_mach_o_canonicalize_dynamic_symtab)
1249
        (bfd_mach_o_get_synthetic_symtab): Defines.
1250
        (TARGET_NAME_BACKEND): Add bfd_mach_o_print_thread entry.
1251
        (TARGET_NAME): Use Mach-O specific functions for dynamic.
1252
 
1253
        * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_in): Fix howto indexes
1254
        for scattered relocations.
1255
        (bfd_mach_o_i386_print_thread): New function.
1256
        (bfd_mach_o_print_thread): Define.
1257
 
1258
        * mach-o.c (text_section_names_xlat): Add an entry for __const.
1259
        (bfd_mach_o_canonicalize_one_reloc, bfd_mach_o_canonicalize_relocs):
1260
        New functions extracted from ...
1261
        (bfd_mach_o_canonicalize_reloc): ... This.  Simplified.
1262
        (bfd_mach_o_get_dynamic_reloc_upper_bound): New function.
1263
        (bfd_mach_o_canonicalize_dynamic_reloc): New function.
1264
        (bfd_mach_o_i386_flavour_string): Adjusted after enum renaming.
1265
        (bfd_mach_o_ppc_flavour_string): Reindentation.  Add 64 bits cases.
1266
        (bfd_mach_o_scan_read_dylinker): Do not create a section anymore.
1267
        Set name_str field.
1268
        (bfd_mach_o_scan_read_dylib): Ditto.
1269
        (bfd_mach_o_scan_read_thread): Set mdata at declaration.  Add comments,
1270
        reindent.
1271
        (bfd_mach_o_scan_read_dysymtab): Set mdata at declaration.  Correctly
1272
        decode isym and flags on little endian targets.  Set dysymtab field.
1273
        (bfd_mach_o_scan_start_address): Adjust for enum names.
1274
        (bfd_mach_o_lookup_section): Do not look for segments anymore.
1275
        (bfd_mach_o_print_section): Display bfd section name.
1276
        (bfd_mach_o_print_segment): Display none if no name.
1277
        (bfd_mach_o_print_dysymtab): Display next index for local, external
1278
        and undefined symbols.
1279
        (bfd_mach_o_bfd_print_private_bfd_data): Adjust code by using name_str.
1280
        Display dylinker name. Display thread and unixthread commands content.
1281
        (bfd_mach_o_print_thread): New macro.
1282
 
1283
        * mach-o.h (bfd_mach_o_mach_header_magic): Align numbers.
1284
        (bfd_mach_o_ppc_thread_flavour): Ditto.
1285
        (bfd_mach_o_i386_thread_flavour): Ditto.
1286
        (BFD_MACH_O_PPC_THREAD_STATE_NONE): New enum.
1287
        (BFD_MACH_O_x86_THREAD_STATE_NONE): Replaces
1288
        BFD_MACH_O_THREAD_STATE_NONE.
1289
        (bfd_mach_o_segment_command): Remove segment field.
1290
        (bfd_mach_o_thread_flavour): Field offset is now unsigned long.
1291
        (bfd_mach_o_dylinker_command): Remove section field, add name_str.
1292
        (bfd_mach_o_prebound_dylib_command): Ditto.
1293
        (bfd_mach_o_dylib_command): Ditto.
1294
        (bfd_mach_o_prebound_dylib_command): Remove section field.
1295
        (mach_o_data_struct): Add dysymtab field.
1296
        (bfd_mach_o_backend_data): Add _bfd_mach_o_print_thread field.
1297
        (bfd_mach_o_get_reloc_upper_bound, bfd_mach_o_canonicalize_reloc)
1298
        (bfd_mach_o_build_commands): Remove parameter names and attributes.
1299
        (bfd_mach_o_get_dynamic_reloc_upper_bound)
1300
        (bfd_mach_o_canonicalize_dynamic_reloc): New prototypes.
1301
 
1302
2009-06-25  Rafael Avila de Espindola  
1303
 
1304
        * plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type
1305
        field of struct dirent.
1306
 
1307
2009-06-23  Tristan Gingold  
1308
 
1309
        * vms.c (vms_get_synthetic_symtab): Remove duplicate definition
1310
        of this macro.  Fix indentation.
1311
 
1312
2009-06-22  Christophe Lyon  
1313
 
1314
        * elf32-arm.c (elf32_arm_size_stubs): Use PLT address as
1315
        destination for defined dynamic symbols when deciding whether to
1316
        insert a stub or not.
1317
        (allocate_dynrelocs): Make sure functions are not marked as Thumb
1318
        when actually accessed through a PLT, even when generating a
1319
        shared lib.
1320
 
1321
2009-06-22  Tristan Gingold  
1322
 
1323
        * mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
1324
        the relocs array.
1325
 
1326
2009-06-22  Alan Modra  
1327
 
1328
        * elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch.
1329
        * elf32-v850.c (v850_elf_relocate_section): Warning fix.
1330
 
1331
2009-06-22  Alan Modra  
1332
 
1333
        * elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
1334
 
1335
2009-06-19  H.J. Lu  
1336
 
1337
        * elflink.c (elf_link_add_object_symbols): Avoid warning
1338
        from -Wjump-misses-init in gcc 4.5.0.
1339
 
1340
2009-06-19  H.J. Lu  
1341
 
1342
        * elf32-i386.c (elf_i386_check_relocs): Properly check local
1343
        symbol on error.
1344
        * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1345
 
1346
2009-06-19  H.J. Lu  
1347
 
1348
        * elf32-i386.c (elf_i386_tls_transition): Add a parameter,
1349
        r_symndx.  Report local symbol name on error.
1350
        (elf_i386_check_relocs): Updated.  Report local symbol name on
1351
        error.
1352
        (elf_i386_gc_sweep_hook): Updated.
1353
        (elf_i386_relocate_section): Likewise.
1354
 
1355
        * elf64-x86-64.c (elf64_x86_64_tls_transition): Add a parameter,
1356
        r_symndx.  Report local symbol name on error.
1357
        (elf64_x86_64_check_relocs): Updated.  Report local symbol name
1358
        on error.
1359
        (elf64_x86_64_gc_sweep_hook): Updated.
1360
        (elf64_x86_64_relocate_section): Likewise.
1361
 
1362
2009-06-19  Tristan Gingold  
1363
 
1364
        * mach-o.c (bfd_mach_o_print_private_header): Fix format character.
1365
 
1366
2009-06-19  Tristan Gingold  
1367
 
1368
        * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Add prototype.
1369
        (bfd_mach_o_version): Use bfd_mach_o_get_data instead of direct access.
1370
        (bfd_mach_o_valid): Ditto.
1371
        (bfd_mach_o_wide_p): Ditto.
1372
        (bfd_mach_o_canonicalize_reloc): Ditto.
1373
        (bfd_mach_o_build_commands): Ditto.
1374
        (bfd_mach_o_scan_read_thread): Ditto.
1375
        (bfd_mach_o_flatten_sections): Ditto.
1376
        (bfd_mach_o_scan_start_address): Ditto.
1377
        (bfd_mach_o_lookup_section): Ditto.
1378
        (bfd_mach_o_core_fetch_environment): Ditto.
1379
        (bfd_mach_o_write_contents): Ditto.  Handle reexport_dylib.
1380
        (bfd_mach_o_scan_write_relocs): Adjust for bfd_mach_o_get_data.
1381
        (bfd_mach_o_scan_write_symtab): Ditto.
1382
        Use macros instead of hard-coded values.
1383
        (bfd_mach_o_scan_read_symtab_symbol): Make the function static.
1384
        Use bfd_mach_o_get_data instead of direct access.  Use macros
1385
        instead of hard-coded values.
1386
        (bfd_mach_o_scan_read_symtab_strtab): Make the function static.
1387
        Remove sym argument and get section from mdata.
1388
        Move code into the else branch.
1389
        (bfd_mach_o_scan_read_symtab_symbols): Make the function static.
1390
        Remove sym argument and get section from mdata.  Adjust code.
1391
        (bfd_mach_o_scan_read_dylib): Move assertion into the created
1392
        switch (which replaces consecutive if statements).
1393
        (bfd_mach_o_scan_read_dysymtab): Rename seg to cmd.  Load
1394
        module table, table of content, indirect symbols and external
1395
        referenced symbols.
1396
        (bfd_mach_o_scan_read_symtab): Renames seg to symtab.  Set symtab
1397
        field.
1398
        (bfd_mach_o_scan_read_linkedit): New function.
1399
        (bfd_mach_o_scan_read_str): Ditto.
1400
        (bfd_mach_o_count_symbols): Simplify the code by using the symtab
1401
        field of mdata.
1402
        (bfd_mach_o_get_symtab_upper_bound): Remove check as
1403
        bfd_mach_o_count_symbols never returns an error.
1404
        (bfd_mach_o_canonicalize_symtab): Simplify the code by using the
1405
        symtab field (there might be only one symtab).
1406
        (bfd_mach_o_scan_read_command): Handle reexported dylib.
1407
        Handle sub frameworks, sub umbrella, sub library and sub client.
1408
        Read code signature and segment split info commands.
1409
        (bfd_mach_o_scan): Reindent.
1410
        (bfd_mach_o_xlat_name): New type.
1411
        (bfd_mach_o_print_flags): New function.
1412
        (bfd_mach_o_get_name): Ditto.
1413
        (bfd_mach_o_cpu_name): New variable.
1414
        (bfd_mach_o_filetype_name, bfd_mach_o_header_flags_name)
1415
        (bfd_mach_o_section_type_name)
1416
        (bfd_mach_o_section_attribute_name)
1417
        (bfd_mach_o_load_command_name): New variables.
1418
        (bfd_mach_o_print_private_header): New function.
1419
        (bfd_mach_o_print_section_map): New function extracted from
1420
        bfd_mach_o_print_private_bfd_data.
1421
        (bfd_mach_o_print_section): Ditto.  Print more infos.
1422
        (bfd_mach_o_print_segment): Ditto.
1423
        (bfd_mach_o_print_dysymtab): Ditto.
1424
        (bfd_mach_o_bfd_print_private_bfd_data): Reworked.  Handle
1425
        load weak dylib, reexport dylib and id dylib.
1426
        Handle code signature and segment_split info.
1427
        Handle sub frameworks, sub umbrella, sub library and sub client.
1428
        (bfd_mach_o_section_get_nbr_indirect): New function.
1429
 
1430
        * mach-o.h (BFD_MACH_O_REFERENCE_MASK): New macro.  Add comment.
1431
        (bfd_mach_o_header_flags): New enum to define header flags.
1432
        (bfd_mach_o_section_attribute): New enum to replace ...
1433
        (BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
1434
        BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
1435
        BFD_MACH_O_S_SELF_MODIFYING_CODE, BFD_MACH_O_S_ATTR_LIVE_SUPPORT,
1436
        BFD_MACH_O_S_ATTR_NO_DEAD_STRIP, BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS,
1437
        BFD_MACH_O_S_ATTR_NO_TOC, BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): ...
1438
        these removed macros.
1439
        (BFD_MACH_O_NLIST_SIZE, BFD_MACH_O_NLIST_64_SIZE): New macros.
1440
        (bfd_mach_o_dylib_module): New type.
1441
        (BFD_MACH_O_DYLIB_MODULE_SIZE, BFD_MACH_O_DYLIB_MODULE_64_SIZE): New
1442
        macros.
1443
        (bfd_mach_o_dylib_table_of_content): New type.
1444
        (BFD_MACH_O_TABLE_OF_CONTENT_SIZE): New macro.
1445
        (bfd_mach_o_dylib_reference): New type.
1446
        (BFD_MACH_O_REFERENCE_SIZE): New macro.
1447
        (bfd_mach_o_dysymtab_command): Add fields for loaded and decoded
1448
        modules, toc, references and indirect syms.
1449
        (BFD_MACH_O_INDIRECT_SYMBOL_SIZE): New macro.
1450
        (bfd_mach_o_dylinker_command): Remove cmd and cmdsize fields (were
1451
        unused).  Add comment.
1452
        (bfd_mach_o_dylib_command): Ditto.
1453
        (bfd_mach_o_prebound_dylib_command): Ditto.
1454
        (bfd_mach_o_linkedit_command): New type.
1455
        (bfd_mach_o_str_command): New type.
1456
        (bfd_mach_o_load_command): Add linkedit and str fields.
1457
        (mach_o_data_struct): Add symtab field.
1458
        (bfd_get_mach_o_data): Renamed to ...
1459
        (bfd_mach_o_get_data): ... this new macro.
1460
        (bfd_mach_o_scan_read_symtab_symbol,
1461
        bfd_mach_o_scan_read_symtab_strtab,
1462
        bfd_mach_o_scan_read_symtab_symbols): Prototypes removed.
1463
 
1464
        * mach-o-i386.c (bfd_mach_o_i386_mkobject): Use bfd_mach_o_get_data
1465
        instead of direct access.
1466
 
1467
2009-06-19  Alan Modra  
1468
 
1469
        * elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for
1470
        R_PPC_PLTREL24 relocs.
1471
        (ppc_elf_relocate_section): Likewise.
1472
 
1473
2009-06-19  Alan Modra  
1474
 
1475
        * elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than
1476
        pointer to sym hash.  Update all uses.
1477
        (update_plt_info): Likewise.  Don't check addend here.
1478
 
1479
2009-06-18  H.J. Lu  
1480
 
1481
        * elf32-i386.c (elf_i386_check_relocs): Remove isymbuf and use
1482
        bfd_sym_from_r_symndx.
1483
        * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1484
 
1485
2009-06-18  Alan Modra  
1486
 
1487
        * elf-bfd.h (struct sym_sec_cache): Delete.
1488
        (struct sym_cache): New.
1489
        (bfd_section_from_r_symndx): Delete prototype.
1490
        (bfd_sym_from_r_symndx): Define prototype.
1491
        * elf.c (bfd_section_from_r_symndx): Delete, replace with..
1492
        (bfd_sym_from_r_symndx): ..new function.
1493
        * elf32-arm.c: Update all uses of struct sym_sec_cache and
1494
        bfd_section_from_r_symndx to new struct and function.
1495
        * elf32-bfin.c: Likewise.
1496
        * elf32-hppa.c: Likewise.
1497
        * elf32-i386.c: Likewise.
1498
        * elf32-m32r.c: Likewise.
1499
        * elf32-m68hc1x.c: Likewise.
1500
        * elf32-m68hc1x.h: Likewise.
1501
        * elf32-m68k.c: Likewise.
1502
        * elf32-ppc.c: Likewise.
1503
        * elf32-s390.c: Likewise.
1504
        * elf32-sh.c: Likewise.
1505
        * elf64-ppc.c: Likewise.
1506
        * elf64-s390.c: Likewise.
1507
        * elf64-x86-64.c: Likewise.
1508
        * elfxx-sparc.c: Likewise.
1509
        * elfxx-sparc.h: Likewise.
1510
 
1511
2009-06-18  H.J. Lu  
1512
 
1513
        * elf32-i386.c (elf_i386_check_relocs): Cache or free isymbuf.
1514
        * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1515
 
1516
2009-06-18  Nick Clifton  
1517
 
1518
        * elflink.c (elf_link_sort_relocs): Return early if there are no
1519
        relocs to sort.
1520
 
1521
2009-06-18  Dave Korn  
1522
 
1523
        Merge cegcc and mingw32ce target name changes from
1524
        CeGCC project:
1525
 
1526
        2007-12-25  Pedro Alves  
1527
 
1528
        * config.bfd: Add arm*-*-cegcc* target.
1529
 
1530
        2007-12-17  Pedro Alves  
1531
 
1532
        * config.bfd: Add arm-*-mingw32ce* target.
1533
 
1534
2009-06-17  H.J. Lu  
1535
 
1536
        * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New.
1537
        * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise.
1538
        * elf32-i386.c (elf_i386_allocate_dynrelocs): Use it.
1539
        * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1540
 
1541
2009-06-17  H.J. Lu  
1542
 
1543
        * elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New.
1544
        * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise.
1545
        * elf32-i386.c (elf_i386_check_relocs): Use it.
1546
        * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1547
 
1548
2009-06-17  H.J. Lu  
1549
 
1550
        * elf-bfd.h (elf_dyn_relocs): New.
1551
 
1552
        * elf32-i386.c (elf_i386_dyn_relocs): Removed.
1553
        (elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with
1554
        elf_dyn_relocs.
1555
        (elf_i386_copy_indirect_symbol): Likewise.
1556
        (elf_i386_check_relocs): Likewise.
1557
        (elf_i386_gc_sweep_hook): Likewise.
1558
        (elf_i386_allocate_dynrelocs): Likewise.
1559
        (elf_i386_readonly_dynrelocs): Likewise.
1560
        (elf_i386_size_dynamic_sections): Likewise.
1561
 
1562
        * elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed.
1563
        (elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs
1564
        with elf_dyn_relocs.
1565
        (elf64_x86_64_copy_indirect_symbol): Updated.
1566
        (elf64_x86_64_check_relocs): Likewise.
1567
        (elf64_x86_64_gc_sweep_hook): Likewise.
1568
        (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1569
        (elf64_x86_64_allocate_dynrelocs): Likewise.
1570
        (elf64_x86_64_readonly_dynrelocs): Likewise.
1571
        (elf64_x86_64_size_dynamic_sections): Likewise.
1572
 
1573
2009-06-17  H.J. Lu  
1574
 
1575
        * elf32-arm.c (create_got_section): Get existing .rela.got
1576
        section.
1577
        * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1578
        * elf32-lm32.c (create_got_section): Likewise.
1579
        * elf32-m32r.c (create_got_section): Likewise.
1580
        * elf32-ppc.c (ppc_elf_create_got): Likewise.
1581
        * elf32-s390.c (create_got_section): Likewise.
1582
        * elf32-sh.c (create_got_section): Likewise.
1583
        * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1584
        * elf64-s390.c (create_got_section): Likewise.
1585
        * elfxx-sparc.c (create_got_section): Likewise.
1586
 
1587
        * elflink.c (_bfd_elf_create_got_section): Properly initialize
1588
        the GOT size.
1589
 
1590
2009-06-16  H.J. Lu  
1591
 
1592
        * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New.
1593
 
1594
        * elf32-i386.c (elf_i386_local_hash): Removed.
1595
        (elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
1596
        (elf_i386_get_local_sym_hash): Likewise.
1597
 
1598
        * elf64-x86-64.c (elf64_x86_64_local_hash): Removed.
1599
        (elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
1600
        (elf64_x86_64_get_local_sym_hash): Likewise.
1601
        * elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise.
1602
        (get_local_sym_hash): Likewise.
1603
 
1604
2009-06-16  H.J. Lu  
1605
 
1606
        * elfxx-ia64.c (elfNN_ia64_link_hash_table): Remove got_sec,
1607
        rel_got_sec and plt_sec.
1608
        (elfNN_ia64_relax_section): Updated.
1609
        (elfNN_ia64_create_dynamic_sections): Likewise.
1610
        (get_got): Likewise.
1611
        (allocate_dynrel_entries): Likewise.
1612
        (elfNN_ia64_size_dynamic_sections): Likewise.
1613
        (set_got_entry): Likewise.
1614
        (elfNN_ia64_choose_gp): Likewise.
1615
        (elfNN_ia64_relocate_section): Likewise.
1616
        (elfNN_ia64_finish_dynamic_symbol): Likewise.
1617
        (elfNN_ia64_finish_dynamic_sections): Likewise.
1618
 
1619
2009-06-16  Ulrich Weigand  
1620
 
1621
        * elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
1622
        also for calls.
1623
 
1624
2009-06-16  H.J. Lu  
1625
 
1626
        * configure.in (elf): Add elf-ifunc.lo.
1627
 
1628
        * configure: Regenerated.
1629
        * Makefile.in: Likewise.
1630
 
1631
        * elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt,
1632
        srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc.
1633
 
1634
        * elf32-i386.c (elf_i386_link_hash_table): Remove sgot,
1635
        sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
1636
        irelifunc.
1637
        (elf_i386_link_hash_table_create): Likewise.
1638
        (elf_i386_create_dynamic_sections): Likewise.
1639
        (elf_i386_check_relocs): Likewise.
1640
        (elf_i386_allocate_dynrelocs): Likewise.
1641
        (elf_i386_size_dynamic_sections): Likewise.
1642
        (elf_i386_relocate_section): Likewise.
1643
        (elf_i386_finish_dynamic_symbol): Likewise.
1644
        (elf_i386_finish_dynamic_sections): Likewise.
1645
        (elf_i386_create_got_section): Removed.
1646
 
1647
        * elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot,
1648
        sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
1649
        irelifunc.
1650
        (elf64_x86_64_compute_jump_table_size): Updated.
1651
        (elf64_x86_64_link_hash_table_create): Likewise.
1652
        (elf64_x86_64_create_dynamic_sections): Likewise.
1653
        (elf64_x86_64_check_relocs): Likewise.
1654
        (elf64_x86_64_allocate_dynrelocs): Likewise.
1655
        (elf64_x86_64_size_dynamic_sections): Likewise.
1656
        (elf64_x86_64_relocate_section): Likewise.
1657
        (elf64_x86_64_finish_dynamic_symbol): Likewise.
1658
        (elf64_x86_64_finish_dynamic_sections): Likewise.
1659
        (elf64_x86_64_create_got_section): Removed.
1660
 
1661
        * elflink.c (_bfd_elf_create_got_section): Use log_file_align
1662
        for pointer alignment.  Set up section pointers.
1663
        (_bfd_elf_create_dynamic_sections): Likewise.
1664
        (_bfd_elf_create_ifunc_sections): Moved to ...
1665
        * elf-ifunc.c: Here.  New.
1666
 
1667
        * Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo.
1668
        (BFD32_BACKENDS_CFILES): Add elf-ifunc.c.
1669
        Run "make dep-am".
1670
 
1671
2009-06-16  Doug Kwan  
1672
 
1673
        * elf32-arm.c (cortex_a8_erratum_scan): Change type of offset
1674
        to bfd_signed_vma.  Cast constant operands which are used in
1675
        offset related expressions to bfd_signed_vma type as appropriate.
1676
 
1677
2009-06-16  Maciej W. Rozycki  
1678
 
1679
        * elf32-vax.c (elf_vax_plt_sym_val): New function.
1680
        (elf_backend_plt_sym_val): Define.
1681
 
1682
2009-06-16  Maciej W. Rozycki  
1683
 
1684
        * elf32-vax.c (elf_vax_reloc_type_class): New function.
1685
        (elf_backend_reloc_type_class): Define.
1686
 
1687
2009-06-16  Maciej W. Rozycki  
1688
 
1689
        * elf32-vax.c (elf_vax_relocate_section): For symbol references
1690
        from an executable to a shared library treat R_VAX_PC32
1691
        relocations as R_VAX_PLT32 ones.
1692
 
1693
2009-06-16  Maciej W. Rozycki  
1694
 
1695
        * elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
1696
        symbols in GOT space calculation.
1697
        (elf_vax_relocate_section): Adjust accordingly.
1698
 
1699
2009-06-16  Maciej W. Rozycki  
1700
 
1701
        * elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
1702
        include .
1703
 
1704
2009-06-16  Maciej W. Rozycki  
1705
 
1706
        * elf32-vax.c (elf_vax_check_relocs): Handle the visibility
1707
        attribute.
1708
        (elf_vax_relocate_section): Likewise.
1709
 
1710
2009-06-15  H.J. Lu  
1711
 
1712
        * elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
1713
        * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1714
 
1715
2009-06-15  H.J. Lu  
1716
 
1717
        * elf32-i386.c (elf_i386_check_relocs): Reformat.
1718
        * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1719
 
1720
2009-06-15  H.J. Lu  
1721
 
1722
        * Makefile.am: Run "make dep-am".
1723
        * Makefile.in: Regenerated.
1724
 
1725
2009-06-15  H.J. Lu  
1726
 
1727
        * elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo.
1728
        * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1729
 
1730
2009-06-15  Nick Clifton  
1731
 
1732
        * po/ru.po: New Russian translation.
1733
        * configure.in (ALL_LINGUAS): Add ru.
1734
        * configure: Regenerate.
1735
 
1736
2009-06-14  H.J. Lu  
1737
 
1738
        * elf32-i386.c: Remove duplicated comments.
1739
 
1740
2009-06-14  H.J. Lu  
1741
 
1742
        PR ld/10270
1743
        * elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
1744
        dynamic IFUNC pointer in non-shared object.  Use .got.plt
1745
        for IFUNC definition in PIE.
1746
        (elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
1747
        PIE locally.
1748
 
1749
        * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
1750
        dynamic IFUNC pointer in non-shared object.  Use .got.plt
1751
        for IFUNC definition in PIE.
1752
        (elf64_x86_64_relocate_section): Resolve IFUNC definition in
1753
        PIE locally.
1754
 
1755
2009-06-13  H.J. Lu  
1756
 
1757
        * elf32-i386.c (elf_i386_check_relocs): Properly report
1758
        local symbol for unhandled relocation against STT_GNU_IFUNC
1759
        symbol.
1760
        (elf_i386_relocate_section): Likewise.
1761
        * elf64-x86-64.c (elf64_x86_64_check_relocs):  Likewise.
1762
        (elf64_x86_64_relocate_section): Likewise.
1763
 
1764
2009-06-13  H.J. Lu  
1765
 
1766
        PR ld/10269
1767
        * elf32-i386.c: Include "objalloc.h" and "hashtab.h".
1768
        (elf_i386_link_hash_table): Add loc_hash_table and
1769
        loc_hash_memory.
1770
        (elf_i386_local_hash): New.
1771
        (elf_i386_local_htab_hash): Likewise.
1772
        (elf_i386_local_htab_eq): Likewise.
1773
        (elf_i386_get_local_sym_hash): Likewise.
1774
        (elf_i386_link_hash_table_free): Likewise.
1775
        (elf_i386_allocate_local_dynrelocs): Likewise.
1776
        (elf_i386_finish_local_dynamic_symbol): Likewise.
1777
        (bfd_elf64_bfd_link_hash_table_free): Likewise.
1778
        (elf_i386_link_hash_table_create): Create loc_hash_table and
1779
        loc_hash_memory.
1780
        (elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols.
1781
        (elf_i386_size_dynamic_sections): Likewise.
1782
        (elf_i386_relocate_section): Likewise.
1783
        (elf_i386_finish_dynamic_sections): Likewise.
1784
        (elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym
1785
        isn't NULL.
1786
 
1787
        * elf64-x86-64.c: Include "objalloc.h" and "hashtab.h".
1788
        (elf64_x86_64_link_hash_table): Add loc_hash_table and
1789
        loc_hash_memory.
1790
        (elf64_x86_64_local_hash): New.
1791
        (elf64_x86_64_local_htab_hash): Likewise.
1792
        (elf64_x86_64_local_htab_eq): Likewise.
1793
        (elf64_x86_64_get_local_sym_hash): Likewise.
1794
        (elf64_x86_64_link_hash_table_free): Likewise.
1795
        (elf64_x86_64_allocate_local_dynrelocs): Likewise.
1796
        (elf64_x86_64_finish_local_dynamic_symbol): Likewise.
1797
        (bfd_elf64_bfd_link_hash_table_free): Likewise.
1798
        (elf64_x86_64_link_hash_table_create): Create loc_hash_table
1799
        and loc_hash_memory.
1800
        (elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC
1801
        symbols.
1802
        (elf64_x86_64_size_dynamic_sections): Likewise.
1803
        (elf64_x86_64_relocate_section): Likewise.
1804
        (elf64_x86_64_finish_dynamic_sections): Likewise.
1805
        (elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if
1806
        sym isn't NULL.
1807
 
1808
2009-06-10  Philip Blundell  
1809
 
1810
        * elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if
1811
        elf_sec->this_hdr == NULL.
1812
 
1813
2009-06-12  Tristan Gingold  
1814
 
1815
        * reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR.
1816
        * bfd-in2.h: Regenerated.
1817
        * libbfd.h: Regenerated.
1818
 
1819
        * mach-o.c (FILE_ALIGN): New macro.
1820
        (bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol.
1821
        (bfd_mach_o_print_symbol): Ditto.
1822
        (bfd_mach_o_scan_write_thread): Adjust type of variable offset.
1823
        (bfd_mach_o_get_reloc_upper_bound): New function.
1824
        (bfd_mach_o_canonicalize_reloc): Ditto.
1825
        (bfd_mach_o_scan_write_relocs): Ditto.
1826
        (bfd_mach_o_scan_write_section_32): Remove offset argument.
1827
        (bfd_mach_o_scan_write_section_64): Ditto.
1828
        (bfd_mach_o_scan_write_segment_32): Write relocs.  Fix size of data
1829
        written for load command.  Do not compute section file offset.
1830
        (bfd_mach_o_scan_write_segment_64): Ditto.
1831
        (bfd_mach_o_scan_write_symtab): Compute file offset first.
1832
        Adjust for bfd_mach_o_asymbol.  Move code to convert from BFD to
1833
        Mach-O to ...
1834
        (bfd_mach_o_mangle_symbols): ... this new function.
1835
        (bfd_mach_o_write_contents): Be sure to have load commands built.
1836
        Call bfd_mach_o_mangle_symbols.
1837
        (bfd_mach_o_build_commands): Adjust for filelen field.
1838
        Use FILE_ALIGN macro.  Clear section file offset if section is empty.
1839
        Do not set symtab file offset anymore here.
1840
        (bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol.
1841
        (bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc.
1842
        Set reloc_count and rel_filepos section fields.
1843
        (bfd_mach_o_scan_read_section_32): Type of argument offset is now
1844
        unsigned int.
1845
        (bfd_mach_o_scan_read_section_64): Ditto.
1846
        (bfd_mach_o_scan_read_section): Ditto.
1847
        (bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now
1848
        bfd_mach_o_asymbol.  Use unsigned int for file offset type.
1849
        (bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol.
1850
        Handle weak-ref symbols.
1851
        (bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol.
1852
        (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1853
        (bfd_mach_o_scan): Remove assignment to removed field.
1854
        (bfd_mach_o_mkobject_init): Ditto.
1855
        (bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter.
1856
        (bfd_mach_o_bfd_reloc_type_lookup): New macro.
1857
        (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
1858
        (bfd_mach_o_swap_reloc_in): Ditto.
1859
        (bfd_mach_o_swap_reloc_out): Ditto.
1860
 
1861
        * mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY)
1862
        (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY)
1863
        (BFD_MACH_O_REFERENCE_FLAG_DEFINED)
1864
        (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED)
1865
        (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY)
1866
        (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY)
1867
        (BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED)
1868
        (BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF)
1869
        (BFD_MACH_O_N_WEAK_DEF): New macros.
1870
        Add comments.
1871
        (bfd_mach_o_section_type): Add new enumeration values.
1872
        (BFD_MACH_O_S_SELF_MODIFYING_CODE)
1873
        (BFD_MACH_O_S_ATTR_LIVE_SUPPORT)
1874
        (BFD_MACH_O_S_ATTR_NO_DEAD_STRIP)
1875
        (BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New
1876
        macros.
1877
        (BFD_MACH_O_GENERIC_RELOC_VANILLA)
1878
        (BFD_MACH_O_GENERIC_RELOC_PAIR)
1879
        (BFD_MACH_O_GENERIC_RELOC_SECTDIFF)
1880
        (BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR)
1881
        (BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto.
1882
        (BFD_MACH_O_RELENT_SIZE): Ditto.
1883
        (BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH)
1884
        (BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE)
1885
        (BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH)
1886
        (BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto.
1887
        (BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL)
1888
        (BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE)
1889
        (BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH)
1890
        (BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto.
1891
        (bfd_mach_o_reloc_info): New struct.
1892
        (bfd_mach_o_asymbol): New struct.
1893
        (bfd_mach_o_symtab_command): The symbols field is now of type
1894
        bfd_mach_o_asymbol.
1895
        (bfd_mach_o_load_command): The offset and len fields are now of type
1896
        unsigned int.
1897
        (mach_o_data_struct): Remove symbols, nsymbols and ibfd fields.
1898
        Add a filelen field.  Add comments.
1899
        (bfd_mach_o_backend_data): New struct.
1900
        (bfd_mach_o_get_backend_data): New macro.
1901
        (bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type
1902
        bfd_mach_o_asymbol.
1903
        (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1904
        (bfd_mach_o_get_reloc_upper_bound): New prototype.
1905
        (bfd_mach_o_canonicalize_reloc): Ditto.
1906
 
1907
        * mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove
1908
        duplicated macro.  Now defined to _bfd_generic_is_local_label.
1909
        (TARGET_NAME_BACKEND): New macro...
1910
        (TARGET_NAME_BACKEND): ... used to name a new variable.
1911
        (TARGET_NAME): Define relocs table using bfd_mach_o, reference
1912
        Mach-O backend data.
1913
 
1914
        * mach-o-i386.c (i386_howto_table): New variable.
1915
        (bfd_mach_o_i386_swap_reloc_in): New function.
1916
        (bfd_mach_o_i386_swap_reloc_out): Ditto.
1917
        (bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto.
1918
        (bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto.
1919
        (bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros.
1920
        (bfd_mach_o_bfd_reloc_type_lookup)
1921
        (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
1922
 
1923
2009-06-11  Eric Paris  
1924
            Nick Clifton  
1925
 
1926
        * opncls.c (_maybe_make_executable): New function.  Gives execute
1927
        permission to an executable bfd that was opened for writing
1928
        provided that it is a regular file.  Replaces common code found in...
1929
        (bfd_close): here and ...
1930
        (bfd_close_all_done): here.
1931
 
1932
2009-06-11  Anthony Green  
1933
 
1934
        * reloc.c: Add BFD_RELOC_MOXIE_10_PCREL.
1935
        * bfd-in2.h: Rebuilt.
1936
        * libbfd.h: Rebuilt.
1937
        * elf32-moxie.c (moxie_elf_howto_table): Add R_MOXIE_PCREL10
1938
        relocation support.
1939
        (moxie_reloc_map): Ditto.
1940
        Clean up copyright notice.
1941
 
1942
2009-06-10  Paul Pluzhnikov  
1943
 
1944
        * bfd-in2.h: bfd_mmap prototype.
1945
        * bfdio.c (bfd_mmap): New function.
1946
        * libbfd.h (bfd_iovec): Add bmmap.
1947
        * cache.c (cache_bmmap): New function.
1948
        (cache_iovec): Initialize bmmap member.
1949
        * opencls.c (opncls_bmmap): New function.
1950
        (opncls_iovec): Initialize bmmap member.
1951
 
1952
2009-06-09  Tristan Gingold  
1953
 
1954
        * mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
1955
        and stabstr_segment fields.
1956
        (mach_o_be_vec, mach_o_le_vec): Removed
1957
        (bfd_mach_o_version): New prototype.
1958
 
1959
        * mach-o.c (bfd_mach_o_version): Make this function public.
1960
        (mach_o_wide_p): New function.
1961
        (bfd_mach_o_wide_p): Ditto.
1962
        (bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
1963
        weird names.
1964
        (bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
1965
        Search in the list only if the name starts with a dot.
1966
        (bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
1967
        test.  Check bfd_seek status.
1968
        (bfd_mach_o_scan_write_thread): Check bfd_seek status.
1969
        (bfd_mach_o_scan_write_section_32): Ditto.
1970
        (bfd_mach_o_scan_write_section_64): Ditto.
1971
        (bfd_mach_o_scan_write_section): Removed.
1972
        (bfd_mach_o_scan_write_segment): Split into ...
1973
        (bfd_mach_o_scan_write_segment_32): ... this and ...
1974
        (bfd_mach_o_scan_write_segment_64): ... this.  Check bfd_seek status.
1975
        (bfd_mach_o_scan_write_symtab_symbols): Moved into ...
1976
        (bfd_mach_o_scan_write_symtab): ... this.  Write symtab from BFD
1977
        symbol table.  Now returns a boolean.
1978
        (bfd_mach_o_write_contents): Set filetype.  Check bfd_seek status.
1979
        Adjust for status type.
1980
        (bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
1981
        test.  Write symbol table.  Numbers the sections.
1982
        (bfd_mach_o_read_header): Check bfd_seek status.
1983
        Use mach_o_wide_p instead of hard-coded test.
1984
        (bfd_mach_o_scan_read_section_32): Check bfd_seek status.
1985
        (bfd_mach_o_scan_read_section_64): Ditto.
1986
        (bfd_mach_o_scan_read_symtab_symbol): Ditto.  Check bfd_seek status.
1987
        Use BFD_MACH_O_N_TYPE instead of hard-coded value.  Correctly
1988
        handled common symbols.
1989
        (bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
1990
        (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1991
        (bfd_mach_o_scan_read_dylinker): Ditto.
1992
        (bfd_mach_o_scan_read_dylib): Ditto.
1993
        (bfd_mach_o_scan_read_thread): Ditto.
1994
        (bfd_mach_o_scan_read_symtab): Ditto.
1995
        Do not create a section for the stabs.
1996
        (bfd_mach_o_scan_read_uuid): Check bfd_seek status.
1997
        (bfd_mach_o_scan_read_segment): Ditto.
1998
        (bfd_mach_o_scan_read_command): Ditto.
1999
        (bfd_mach_o_scan_start_address): Ditto.
2000
        (bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
2001
        (bfd_mach_o_archive_p): Check bfd_seek status.
2002
        (bfd_mach_o_core_fetch_environment): Ditto.
2003
 
2004
        * mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.
2005
 
2006
2009-06-06  H.J. Lu  
2007
 
2008
        * elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
2009
        (elf_i386_link_hash_table_create): Initialize irelifunc.
2010
        (elf_i386_check_relocs): Updated.  Set up irelifunc for
2011
        shared objects.
2012
        (elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
2013
        relocation for non-GOT reference of STT_GNU_IFUNC symbol in
2014
        shared objects.
2015
        (elf_i386_relocate_section): Likewise.
2016
 
2017
        * elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
2018
        (elf64_x86_64_link_hash_table_create): Initialize irelifunc.
2019
        (elf64_x86_64_check_relocs): Updated.  Set up irelifunc for
2020
        shared objects.
2021
        (elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
2022
        relocation for non-GOT reference of STT_GNU_IFUNC symbol in
2023
        shared objects.
2024
        (elf64_x86_64_relocate_section): Likewise.
2025
 
2026
        * elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
2027
        ...
2028
        (_bfd_elf_create_ifunc_sections): This.
2029
 
2030
        * elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to
2031
        ...
2032
        (_bfd_elf_create_ifunc_sections): This.  Create .rel[a].ifunc
2033
        for shared objects.
2034
 
2035
2009-06-06  H.J. Lu  
2036
 
2037
        * elf32-i386.c (elf_i386_check_relocs): Make room for dynamic
2038
        relocation for R_386_32 against STT_GNU_IFUNC symbol when
2039
        building shared object.  Check info->executable instead of
2040
        !info->shared when setting non_got_ref.
2041
        (elf_i386_allocate_dynrelocs): Allocate dynamic relocation
2042
        for non-GOT reference of STT_GNU_IFUNC symbol in shared
2043
        object. Allocate GOT relocation agsinst STT_GNU_IFUNC
2044
        symbol if needed.
2045
        (elf_i386_relocate_section): Output dynamic relocation for
2046
        R_386_32 against STT_GNU_IFUNC symbol to get the real
2047
        function address when building shared object.
2048
        (elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT
2049
        relocation for STT_GNU_IFUNC symbol in shared object.
2050
 
2051
        * elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for
2052
        dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC
2053
        symbol when building shared object.  Check info->executable
2054
        instead of !info->shared when setting non_got_ref.
2055
        (elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation
2056
        for non-GOT reference of STT_GNU_IFUNC symbol in shared
2057
        library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol
2058
        if needed.
2059
        (elf64_x86_64_relocate_section): Output dynamic relocation
2060
        for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real
2061
        function address when building shared object.
2062
        (elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT
2063
        relocation for STT_GNU_IFUNC symbol in shared object.
2064
 
2065
2009-06-06  Jan Kratochvil  
2066
 
2067
        * Makefile.am: Run "make dep-am".
2068
        (BFD32_BACKENDS): Add mach-o-i386.lo.
2069
        (BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
2070
        * Makefile.in: Regenerate.
2071
 
2072
2009-06-06  Alan Modra  
2073
 
2074
        * elf32-spu.c (spu_elf_relocate_section): Match overlay number
2075
        when looking for soft-icache stubs.
2076
 
2077
2009-06-05  Tristan Gingold  
2078
 
2079
        * mach-o.h: Update copyright year.
2080
        (bfd_mach_o_mach_header_magic): New enum.
2081
        (bfd_mach_o_cpu_subtype): Now an enum.
2082
        (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
2083
        (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
2084
        (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
2085
        (bfd_mach_o_load_command): Field type_required is now a boolean.
2086
        Reindent prototypes.
2087
        (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
2088
        (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
2089
        (bfd_mach_o_bfd_copy_private_section_data): Ditto.
2090
        (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
2091
        (bfd_mach_o_get_symtab_upper_bound): Ditto.
2092
        (bfd_mach_o_canonicalize_symtab): Ditto.
2093
        (bfd_mach_o_get_symbol_info): Ditto.
2094
        (bfd_mach_o_print_symbol): Ditto.
2095
        (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
2096
        (bfd_mach_o_make_empty_symbol): Ditto.
2097
        (bfd_mach_o_write_contents): Ditto.
2098
 
2099
        * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
2100
        bfd_mach_o_mkobject): Defines.
2101
        (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
2102
        Do not check with target vector but with flavour.
2103
        (struct mach_o_section_name_xlat): New declaration.
2104
        (dwarf_section_names_xlat): Ditto.
2105
        (text_section_names_xlat): Ditto.
2106
        (data_section_names_xlat): Ditto.
2107
        (struct mach_o_segment_name_xlat): Ditto.
2108
        (segsec_names_xlat): Ditto.
2109
        (bfd_mach_o_convert_section_name_to_bfd): New function.
2110
        (bfd_mach_o_convert_section_name_to_mach_o): Ditto.
2111
        (bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
2112
        (bfd_mach_o_bfd_copy_private_section_data): Ditto.
2113
        (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
2114
        Accept any input and output flavour.  Do not share private data
2115
        anymore.
2116
        (bfd_mach_o_count_symbols): Add a comment.
2117
        (bfd_mach_o_get_symtab_upper_bound): Make it public.
2118
        (bfd_mach_o_canonicalize_symtab): Ditto.
2119
        (bfd_mach_o_get_symbol_info): Ditto.
2120
        (bfd_mach_o_print_symbol): Ditto.
2121
        (bfd_mach_o_write_header): Now returns a boolean instead of an int.
2122
        Use constants instead of hard-coded values.
2123
        (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
2124
        values.
2125
        (bfd_mach_o_scan_write_section_64): Ditto.
2126
        (bfd_mach_o_scan_write_segment): Ditto.
2127
        Do not copy sections anymore.
2128
        (bfd_mach_o_write_contents): Make it public.
2129
        Remove dead code.  Rewrite typeflag assignment.
2130
        (bfd_mach_o_build_commands): New function.
2131
        (bfd_mach_o_set_section_contents): Ditto.
2132
        (bfd_mach_o_make_empty_symbol): Make it public.
2133
        (bfd_mach_o_read_header): Make it static.
2134
        Convert to bfd_boolean.
2135
        Use constants instead of hard-coded values.
2136
        (bfd_mach_o_make_bfd_section): Call
2137
        bfd_mach_o_convert_section_name_to_bfd to create name.
2138
        (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
2139
        values.
2140
        (bfd_mach_o_scan_read_section_64): Ditto.
2141
        (bfd_mach_o_scan_read_segment): Do not create a bfd section for
2142
        a segment anymore.  Use constants instead of hard-coded values.
2143
        (bfd_mach_o_scan_read_command): Fix style.
2144
        (bfd_mach_o_scan): Use constants instead of hard-coded values.
2145
        Get rid of BFD_IO_FUNCS.
2146
        (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
2147
        (bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
2148
        (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
2149
        (bfd_mach_o_object_p): Removed.
2150
        (bfd_mach_o_gen_core_p): New function, replaces ...
2151
        (bfd_mach_o_core_p): ... deleted.
2152
        (bfd_mach_o_bfd_print_private_bfd_data): Make it public.
2153
 
2154
        * mach-o-i386.c: New file.
2155
        * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
2156
        * configure.in (TDEFINES): Add mach_o_i386_vec.
2157
        * configure: Regenerated.
2158
        * targets.c: Add mach_o_i386_vec.
2159
 
2160
        * mach-o.c: Update copyright years.
2161
        (BFD_IO_FUNCS): Remove (was not used).
2162
        (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
2163
        bfd_mach_o_slurp_extended_name_table,
2164
        bfd_mach_o_construct_extended_name_table,
2165
        bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
2166
        bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
2167
        bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
2168
        bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
2169
        bfd_mach_o_get_section_contents_in_window,
2170
        bfd_mach_o_bfd_is_local_label_name,
2171
        bfd_mach_o_bfd_is_target_special_symbol,
2172
        bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
2173
        bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
2174
        bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
2175
        bfd_mach_o_minisymbol_to_symbol,
2176
        bfd_mach_o_bfd_get_relocated_section_contents,
2177
        bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
2178
        bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
2179
        bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
2180
        bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
2181
        bfd_mach_o_bfd_merge_private_bfd_data,
2182
        bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
2183
        bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
2184
        bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
2185
        bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
2186
        bfd_mach_o_bfd_copy_private_header_data,
2187
        bfd_mach_o_core_file_matches_executable_p): Move these defines ...
2188
        * mach-o-target.c: ... here.
2189
        Update copyright years.
2190
 
2191
2009-06-04  Alan Modra  
2192
 
2193
        * dep-in.sed: Don't use \n in replacement part of s command.
2194
        * Makefile.am (DEP1): LC_ALL for uniq.
2195
        Run "make dep-am".
2196
        * Makefile.in: Regenerate.
2197
 
2198
2009-06-03  H.J. Lu  
2199
 
2200
        * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
2201
        h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
2202
        * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2203
 
2204
2009-06-03  H.J. Lu  
2205
 
2206
        * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
2207
        GOT entry for STT_GNU_IFUNC symbol with pointer equality.
2208
        (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
2209
        against STT_GNU_IFUNC symbols for static executables.
2210
        (elf_i386_finish_dynamic_symbol): Load GOT entry with
2211
        PLT entry for STT_GNU_IFUNC symbol with pointer equality.
2212
 
2213
        * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
2214
        GOT entry for STT_GNU_IFUNC symbol with pointer equality.
2215
        (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
2216
        PLT entry for STT_GNU_IFUNC symbol with pointer equality.
2217
 
2218
2009-06-02  Richard Sandiford  
2219
 
2220
        * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
2221
        symbols to be left unimported when linking statically.
2222
        * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
2223
        code when linking statically.
2224
 
2225
2009-06-02  H.J. Lu  
2226
 
2227
        * elf32-i386.c (elf_i386_check_relocs): Increment
2228
        got.refcount for R_386_GOT32/R_386_GOTOFF relocations
2229
        against STT_GNU_IFUNC symbol.
2230
        (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
2231
        local STT_GNU_IFUNC definition is used.
2232
        (elf_i386_relocate_section): Handle got.offset != -1 for
2233
        R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
2234
        symbol.
2235
 
2236
        * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
2237
        got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
2238
        relocations against STT_GNU_IFUNC symbol.
2239
        (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
2240
        local STT_GNU_IFUNC definition is used.
2241
        (elf64_x86_64_relocate_section): Handle got.offset != -1
2242
        for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
2243
        STT_GNU_IFUNC symbol.
2244
 
2245
2009-06-01  H.J. Lu  
2246
 
2247
        PR ld/10205
2248
        * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
2249
        (elf_i386_reloc_type_lookup): Likewise.
2250
        (R_386_tls): Removed.
2251
        (R_386_irelative): New.
2252
        (R_386_vt_offset): Updated.
2253
        (elf_i386_rtype_to_howto): Likewise.
2254
        (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
2255
        (elf_i386_link_hash_table_create): Initialize igotplt,
2256
        iplt and irelplt.
2257
        (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
2258
        (elf_i386_adjust_dynamic_symbol): Likewise.
2259
        (elf_i386_allocate_dynrelocs): Likewise.
2260
        (elf_i386_relocate_section): Likewise.
2261
        (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
2262
        sections.
2263
        (elf_i386_finish_dynamic_symbol): When building a static
2264
        executable, use .iplt, .igot.plt and .rel.iplt sections for
2265
        STT_GNU_IFUNC symbols.  Generate R_386_IRELATIVE relocation for
2266
        locally defined STT_GNU_IFUNC symbol.
2267
 
2268
        * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
2269
        (x86_64_reloc_map): Likewise.
2270
        (R_X86_64_standard): Updated.
2271
        (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
2272
        (elf64_x86_64_link_hash_table_create): Initialize igotplt,
2273
        iplt and irelplt.
2274
        (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
2275
        (elf64_x86_64_adjust_dynamic_symbol): Likewise.
2276
        (elf64_x86_64_allocate_dynrelocs): Likewise.
2277
        (elf64_x86_64_relocate_section): Likewise.
2278
        (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
2279
        sections.
2280
        (elf64_x86_64_finish_dynamic_symbol): When building a static
2281
        executable, use .iplt, .igot.plt and .rela.iplt sections for
2282
        STT_GNU_IFUNC symbols.  Generate R_X86_64_IRELATIVE relocation
2283
        for locally defined STT_GNU_IFUNC symbol.
2284
 
2285
        * reloc.c (BFD_RELOC_386_IRELATIVE): New.
2286
        (BFD_RELOC_X86_64_IRELATIVE): Likewise.
2287
 
2288
        * bfd-in2.h: Regenerated.
2289
        * libbfd.h: Likewise.
2290
 
2291
2009-06-01  H.J. Lu  
2292
 
2293
        * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
2294
        (_bfd_elf_make_ifunc_reloc_section): Removed.
2295
        (_bfd_elf_is_ifunc_symbol): Likewise.
2296
        (_bfd_elf_create_static_ifunc_sections): New.
2297
 
2298
        * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
2299
        symbol check to ...
2300
        (elf_link_add_object_symbols): Here.
2301
        (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
2302
        STT_GNU_IFUNC symbol.
2303
        (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
2304
        if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
2305
        (IFUNC_INFIX): Removed.
2306
        (get_ifunc_reloc_section_name): Likewise.
2307
        (_bfd_elf_make_ifunc_reloc_section): Likewise.
2308
        (_bfd_elf_is_ifunc_symbol): Likewise.
2309
        (_bfd_elf_create_static_ifunc_sections): New.
2310
 
2311
2009-05-29  H.J. Lu  
2312
 
2313
        * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
2314
        (create_got_section): Likewise.
2315
        (allocate_dynrelocs): Likewise.
2316
        (readonly_dynrelocs): Likewise.
2317
        (set_tls_module_base): Likewise.
2318
        (dtpoff_base): Likewise.
2319
        (tpoff): Likewise.
2320
        (elf_i386_link_hash_table_create): Updated.
2321
        (elf_i386_create_dynamic_sections): Likewise.
2322
        (elf_i386_check_relocs): Likewise.
2323
        (elf_i386_size_dynamic_sections): Likewise.
2324
        (elf_i386_relocate_section): Likewise.
2325
 
2326
        * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
2327
        (create_got_section): Likewise.
2328
        (allocate_dynrelocs): Likewise.
2329
        (readonly_dynrelocs): Likewise.
2330
        (set_tls_module_base): Likewise.
2331
        (dtpoff_base): Likewise.
2332
        (tpoff): Likewise.
2333
        (elf64_x86_64_link_hash_table_create): Updated.
2334
        (elf64_x86_64_create_dynamic_sections): Likewise.
2335
        (elf64_x86_64_check_relocs): Likewise.
2336
        (elf64_x86_64_size_dynamic_sections): Likewise.
2337
        (elf64_x86_64_relocate_section): Likewise.
2338
 
2339
2009-05-28  Nick Clifton  
2340
 
2341
        * targets.c (_bfd_target_vector): Only include plugin target in
2342
        all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
2343
 
2344
2009-05-28  Ulrich Weigand  
2345
 
2346
        * elf32-spu.c (struct call_info): New member broken_cycle.
2347
        (remove_cycle): Instead of physically removing call_info structures
2348
        to break call graph cycles, mark them using the broken_cycle flag.
2349
        (mark_overlay_section): Respect broken_cycle flag.
2350
        (unmark_overlay_section): Likewise.
2351
        (collect_lib_sections): Likewise.
2352
        (collect_overlays): Likewise.
2353
        (sum_stack): Likewise.
2354
 
2355
2009-05-28  Ulrich Weigand  
2356
 
2357
        * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
2358
        (mark_functions_via_relocs): Initialize callee->count to 1.
2359
        (pasted_function): Likewise.
2360
        (spu_elf_auto_overlay): Honor call counts when determining number
2361
        of stubs required in software i-cache mode.
2362
 
2363
2009-05-27  Rafael Avila de Espindola  
2364
 
2365
        * plugin.c (program_name): Remove.
2366
        (plugin_program_name): New.
2367
        (bfd_plugin_set_program_name): New.
2368
        (try_load_plugin): Use plugin_program_name.
2369
        * plugin.h (bfd_plugin_set_program_name): New.
2370
 
2371
2009-05-27  Rafael Avila de Espindola  
2372
 
2373
        * aclocal.m4: Include ../config/plugins.m4.
2374
        * configure.in: Use AC_PLUGINS.
2375
        * configure: Regenerate.
2376
        * Makefile.in: Regenerate.
2377
        * doc/Makefile.in: Regenerate.
2378
 
2379
2009-05-27  Nathan Sidwell  
2380
 
2381
        * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
2382
        link.
2383
        * bout.c (b_out_bfd_relax_section): Reject relocatable links.
2384
        * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
2385
        * elf32-avr.c (elf32_avr_relax_section): Likewise.
2386
        * elf32-frv.c (elf32_avr_relax_section): Likewise.
2387
        * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
2388
        * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2389
        * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2390
        * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
2391
        * reloc.c (bfd_generic_relax_section): Likewise.
2392
        * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
2393
        * vms.c (vms_bfd_relax_section): Likewise.
2394
 
2395
2009-05-26  H.J. Lu  
2396
 
2397
        * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
2398
 
2399
        * elf32-i386.c (is_indirect_symbol): Renamed to ...
2400
        * elflink.c (_bfd_elf_is_ifunc_symbol): This.
2401
 
2402
        * elf32-i386.c (allocate_dynrelocs): Updated.
2403
        (elf_i386_relocate_section): Likewise.
2404
        * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2405
        (elf64_x86_64_relocate_section): Likewise.
2406
 
2407
        * elf64-x86-64.c (is_indirect_symbol): Removed.
2408
 
2409
2009-05-26  Nick Clifton  
2410
 
2411
        * po/id.po: Updated Indonesian translation.
2412
 
2413
2009-05-26  Rafael Avila de Espindola  
2414
 
2415
        * Makefile.am: Run "make dep-am".
2416
        (AM_CPPFLAGS): New.
2417
        (LIBDL): New.
2418
        (ALL_MACHINES): Add cpu-plugin.lo.
2419
        (ALL_MACHINES_CFILES): Add cpu-plugin.c.
2420
        (BFD32_BACKENDS): Add plugin.lo.
2421
        (BFD32_BACKENDS_CFILES): Add plugin.c.
2422
        (libbfd_la_LIBADD): Add LIBDL
2423
        * archures.c (bfd_architecture): Add bfd_arch_plugin.
2424
        (bfd_plugin_arch): Declare.
2425
        * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
2426
        * bfd.c (bfd): Add plugin_data.
2427
        * config.bfd: Handle the plugin target.
2428
        * configure.in: Check for --enable-plugins.
2429
        (LT_INIT): Use the dlopen option.
2430
        * cpu-plugin.c: New.
2431
        * plugin.c: New.
2432
        * plugin.h: New.
2433
        * targets.c (plugin_vec): Declare.
2434
        (_bfd_target_vector): Add plugin_vec.
2435
        * Makefile.in: Regenerate.
2436
        * bfd-in2.h: Regenerate.
2437
        * configure: Regenerate.
2438
 
2439
2009-05-26  Alan Modra  
2440
 
2441
        * dep-in.sed: Don't modify .o to .lo here.  Output one filename
2442
        per line with all lines having continuation backslash.  Prefix
2443
        first line with "A", following lines with "B".
2444
        * Makefile.am (DEP): Don't use dep.sed here.
2445
        (DEP1): Run $MKDEP on single files, modify .o to .lo here.  Use
2446
        dep.sed here on dependencies, sort and uniq.
2447
        * Makefile.in: Regenerate.
2448
 
2449
2009-05-25  Tristan Gingold  
2450
 
2451
        * makefile.vms: Add verilog.obj to object list OBJS.
2452
 
2453
2009-05-24  Alan Modra  
2454
 
2455
        * bfdio.c (bfd_seek): Formatting.  Ensure newly allocated memory
2456
        for BFD_IN_MEMORY is cleared.
2457
        (bfd_bwrite): Zero excess memory allocated.
2458
 
2459
2009-05-22  Julian Brown  
2460
 
2461
        * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
2462
        macros.
2463
        (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
2464
        (elf32_arm_stub_a8_veneer_blx): New stub sequences.
2465
        (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
2466
        arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
2467
        (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
2468
        (a8_erratum_fix, a8_erratum_reloc): New structs.
2469
        (elf32_arm_link_hash_table): Add a8_erratum_fixes,
2470
        num_a8_erratum_fixes, fix_cortex_a8 fields.
2471
        (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
2472
        (elf32_arm_add_stub): Split into two parts, creating...
2473
        (elf32_arm_create_or_find_stub_sec): New function.
2474
        (elf32_arm_final_link_relocate): Add forward declaration.
2475
        (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
2476
        relocations, multiple relocations per stub.
2477
        (find_stub_size_and_template): New (using parts of arm_size_one_stub).
2478
        (arm_size_one_stub): Use find_stub_size_and_template.
2479
        (a8_reloc_compare): New.
2480
        (find_thumb_glue): Add forward declaration.
2481
        (cortex_a8_erratum_scan): New.
2482
        (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
2483
        (bfd_elf32_arm_set_cortex_a8_fix): New.
2484
        (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
2485
        (arm_map_one_stub): Add THUMB32_TYPE support.
2486
        (a8_branch_to_stub_data): New.
2487
        (make_branch_to_a8_stub): New.
2488
        (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
2489
        * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
2490
        (bfd_elf32_arm_set_target_relocs): Add argument for controlling
2491
        Cortex-A8 erratum workaround.
2492
        * bfd-in2.h: Regenerate.
2493
 
2494
2009-05-22  Alan Modra  
2495
 
2496
        * Makefile.am: Run "make dep-am".
2497
        * Makefile.in: Regenerate.
2498
        * po/SRC-POTFILES.in: Regenerate.
2499
 
2500
2009-05-21  Alan Modra  
2501
 
2502
        * elflink.c (elf_link_input_bfd): Correct *pindex change in last
2503
        commit.
2504
 
2505
2009-05-21  Alan Modra  
2506
 
2507
        * elf-bfd.h (struct elf_backend_data
2508
        ): Return an int.
2509
        * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
2510
        symbols on deleted .opd entries.
2511
        * elflink.c (elf_link_output_sym): Return without outputting sym
2512
        if output_symbol_hook returns 2.
2513
        (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
2514
        Abort if we must not discard sym.
2515
        (elf_link_input_bfd): Similarly, don't set finfo->indices for
2516
        local syms.
2517
        (bfd_elf_final_link): Adjust elf_link_output_sym calls.
2518
        * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
2519
        elf_backend_link_output_symbol_hook return type change.
2520
        * elf32-arm.c (output_arch_syminfo): Likewise.
2521
        (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
2522
        (elf32_arm_output_arch_local_syms): Likewise.
2523
        * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
2524
        * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
2525
        (bfd_score_elf_link_output_symbol_hook): Likewise.
2526
        * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
2527
        * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
2528
        * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
2529
        * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
2530
        * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
2531
        * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
2532
        * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
2533
        * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
2534
        * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
2535
        * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
2536
        * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
2537
 
2538
2009-05-21  Alan Modra  
2539
 
2540
        * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
2541
        out of range .opd symbols.
2542
 
2543
2009-05-21  Dave Korn  
2544
 
2545
        * coffgen.c (coff_print_symbol):  Use bfd_fprintf_vma, not
2546
        fprintf_vma directly.
2547
        * peXXigen.c (pe_print_edata):  Likewise.
2548
        (pe_print_pdata):  Likewise.
2549
        (_bfd_XX_print_ce_compressed_pdata):  Likewise.
2550
        (_bfd_XX_print_private_bfd_data_common):  Likewise.
2551
 
2552
2009-05-19  Dave Korn  
2553
 
2554
        * cofflink.c (process_embedded_commands):  Ignore "-aligncomm".
2555
 
2556
2009-05-15  Andrew Stubbs  
2557
            Paul Brook  
2558
 
2559
        * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
2560
        fix discarded sections.
2561
 
2562
2009-05-14  Ulrich Weigand  
2563
 
2564
        * elf32-spu.c (mark_overlay_section): Move .init and .fini
2565
        sections into the software icache.
2566
 
2567
2009-05-14  Ulrich Weigand  
2568
 
2569
        * elf32-spu.c (build_stub): Always build "compact" sofware
2570
        i-cache stubs.
2571
 
2572
2009-05-14  Ulrich Weigand  
2573
 
2574
        * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
2575
        (spu_elf_setup): Initialize it.
2576
        (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
2577
        Update to new-sytle cache manager data structures.
2578
        (spu_elf_build_stubs): Generate new-style cache manager data
2579
        structures and symbols.
2580
        (spu_elf_auto_overlay): Update size computation.
2581
 
2582
2009-05-14  Ulrich Weigand  
2583
 
2584
        * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
2585
        segments first amongst the program headers.
2586
 
2587
2009-05-14  Ulrich Weigand  
2588
 
2589
        * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
2590
        into addresses for relocation types that look at high bits.  Remove
2591
        special handling of relocation overflow warnings.
2592
 
2593
2009-05-14  Ulrich Weigand  
2594
 
2595
        * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
2596
        control flow graph between fragments of a function.
2597
 
2598
2009-05-14  Ulrich Weigand  
2599
 
2600
        * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
2601
        generate only a 16-byte .toe section.
2602
        (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
2603
 
2604
2009-05-14  Alan Modra  
2605
 
2606
        * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
2607
        (spu_elf_place_overlay_data): ..here.  New function.
2608
        * elf32-spu.h (spu_elf_place_overlay_data): Declare.
2609
 
2610
2009-05-13  Andrew Jenner  
2611
 
2612
        * elf32-arm.c: Move sysdep.h to start of file.
2613
 
2614
2009-05-11  Ulrich Weigand  
2615
 
2616
        * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
2617
        start of overlays.
2618
        (spu_elf_build_stubs): Don't define __icache_tagbase.  Define
2619
        __icache_tag_array and __icache_tag_array_size.
2620
 
2621
2009-05-11  Masaki Muranaka  
2622
 
2623
        * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
2624
        ATTRIBUTE_UNUSED.
2625
        (bfinfdpic_link_omit_section_dynsym): Likewise.
2626
        (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
2627
 
2628
2009-05-05  Paul Brook  
2629
 
2630
        * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
2631
        * bfd-in2.h: Regenerate.
2632
        * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
2633
        (_arm_elf_section_data): Add text and exidx fields.
2634
        (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
2635
        insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
2636
        copy_exidx_entry): New functions.
2637
        (elf32_arm_write_section): Fixup .ARM.exidx contents.
2638
 
2639
2009-05-05  Christophe lyon  
2640
 
2641
        * elf32-arm.c (DEF_STUBS): New helper define.
2642
        (DEF_STUB): Likewise.
2643
        (stub_def): New type.
2644
        (stub_definitions): New array, containing stub template pointers
2645
        and sizes.
2646
        (arm_size_one_stub): Make use of stub_definitions.
2647
 
2648
2009-05-04  Dave Korn  
2649
 
2650
        * elflink.c (find_version_for_sym):  Remove from here, ...
2651
        * linker.c (bfd_find_version_for_sym):  ... rename, replace
2652
        here, make public and update all callers.
2653
        * bfd-in2.h:  Regenerate.
2654
 
2655
2009-04-30  Nick Clifton  
2656
 
2657
        * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
2658
        section pointer.
2659
        (struct elf_obj_data): Add has_ifunc_symbols boolean.
2660
        * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
2661
        into a STT_GNU_IFUNC symbol type.
2662
        (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
2663
        type.
2664
        (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
2665
        the binary contains ifunc symbols.
2666
        * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
2667
        symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
2668
        * elf32-i386.c (is_indirect_function): New function.
2669
        (elf_i386_check_relocs): Create an ifunc output section.
2670
        (allocate_dynrelocs): Create dynamic relocs in the ifunc output
2671
        section if necessary.
2672
        (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
2673
        if necessary.
2674
        (elf_i386_add_symbol_hook): New function. Set the
2675
        has_ifunc_symbols field of the elf_obj_data structure if an ifunc
2676
        symbol is encountered.
2677
        (elf_backend_post_process_headers): Define.
2678
        (elf_backend_add_symbol_hook): Define.
2679
        (elf_i386_post_process_headers): Rename to
2680
        elf_i388_fbsd_post_process_headers.
2681
        * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
2682
        (is_indirect_function): New function.
2683
        (elf64_x86_64_check_relocs): Create an ifunc output section.
2684
        (allocate_dynrelocs): Create dynamic relocs in the ifunc output
2685
        section if necessary.
2686
        (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
2687
        symbol if necessary.
2688
        (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
2689
        elf_obj_data structure if an ifunc symbol is encountered.
2690
        (elf_backend_post_process_headers): Define.
2691
        * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
2692
        if we have ifunc symbols to handle.
2693
        (get_ifunc_reloc_section_name): New function.  Computes the name
2694
        for an ifunc section.
2695
        (_bfd_elf_make_ifunc_reloc_section): New function.  Creates a
2696
        section to hold ifunc relocs.
2697
        * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
2698
        (bfd_print_symbol_vandf): Handle ifunc symbols.
2699
        (bfd_decode_symclass): Likewise.
2700
        * bfd-in2.h: Regenerate.
2701
 
2702
2009-04-30  Joseph Myers  
2703
 
2704
        * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
2705
        MOVW and MOVT relocations in a shared library link.
2706
 
2707
2009-04-27  Anthony Green  
2708
 
2709
        * verilog.c: New file.
2710
        * Makefile.am (BFD32_LIBS): Add verilog.c.
2711
        (BFD32_LIBS_CFILES): Add verilog.c.
2712
        (verilog.lo): New build rule.
2713
        * Makefile.in: Rebuilt.
2714
        * targets.c: Add verilog support.
2715
        * bfd.c (tdata union): Add Verilog private data field.
2716
        * bfd-in2.h: Regenerate.
2717
 
2718
2009-04-27  H.J. Lu  
2719
 
2720
        * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
2721
        copy pe_opthdr.
2722
 
2723
2009-04-23  Matthias Klose  
2724
 
2725
        * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
2726
 
2727
2009-04-22  Christophe Lyon  
2728
 
2729
        PR9743
2730
        * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
2731
        R_ARM_JUMP24 and R_ARM_PLT32 relocations.
2732
        (elf32_arm_size_stubs): Likewise.
2733
        (record_thumb_to_arm_glue): Deleted unused function.
2734
        (bfd_elf32_arm_process_before_allocation): No longer handle
2735
        R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
2736
        (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
2737
        R_ARM_JUMP24 and R_ARM_PLT32 relocations.
2738
 
2739
2009-04-21  Daniel Jacobowitz  
2740
 
2741
        * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
2742
        (elf32_arm_write_section): Declare early.
2743
        (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
2744
        (arm_allocate_glue_section_space): Exclude empty sections.
2745
        (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
2746
        (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
2747
        BFD.
2748
        (elf32_arm_output_glue_section, elf32_arm_final_link): New.
2749
        (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
2750
        (elf32_arm_size_dynamic_sections): Allocate interworking
2751
        sections here.
2752
        (bfd_elf32_bfd_final_link): Define.
2753
 
2754
2009-04-21  H.J. Lu  
2755
 
2756
        * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
2757
 
2758
        * coffcode.h (coff_compute_section_file_positions): Clear
2759
        D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
2760
 
2761
        * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
2762
        force_minimum_alignment.
2763
 
2764
        * libcoff.h: Regenerated.
2765
 
2766
        * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
2767
        (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
2768
 
2769
        * peicode.h (pe_mkobject): Don't set force_minimum_alignment
2770
        nor target_subsystem.
2771
 
2772
        * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
2773
        force_minimum_alignment nor target_subsystem.
2774
 
2775
2009-04-21  Kai Tietz  
2776
 
2777
        * coff-x86_64.c (PEI_HEADERS): Protect includes.
2778
        (bfd_pe_print_pdata): Remove #ifdef PE variation.
2779
        * pei-x86_64.c (PEI_HEADERS): Define to prevent double
2780
        include in coff-x86_64.c of headers.
2781
        (PDATA_ROW_SIZE): New define.
2782
        (pex_regs[]): New static array.
2783
        (pex64_get_runtime_function): New static function.
2784
        (pex64_get_unwind_info): Likewise.
2785
        (pex64_get_scope_entry): Likewise.
2786
        (pex64_xdata_print_uwd_codes): Likewise.
2787
        (pex64_get_section_by_rva): Likewise.
2788
        (pex64_dump_xdata): Likewise.
2789
        (pex64_bfd_print_pdata): Likewise.
2790
        (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
2791
        * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
2792
        * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
2793
 
2794
2009-04-19  Peter O'Gorman  
2795
            Alan Modra  
2796
            Dave Korn  
2797
 
2798
        * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
2799
        long names and non-NUL-terminated strings.
2800
 
2801
2009-04-17  H.J. Lu  
2802
 
2803
        * bfd-in2.h: Regenerated.
2804
 
2805
2009-04-17  H.J. Lu  
2806
 
2807
        * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
2808
        IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
2809
 
2810
2009-04-17  H.J. Lu  
2811
 
2812
        PR binutils/10074
2813
        * coffcode.h (bfd_pei_p): New.
2814
 
2815
        * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
2816
        bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
2817
        bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
2818
        bfd_efi_rtdrv_ia64_vec.  Replace bfd_efi_app_ia32_vec,
2819
        bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
2820
        i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
2821
 
2822
        * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
2823
        bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
2824
        bfd_efi_rtdrv_x86_64_vec,
2825
        bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec.  Replace
2826
        bfd_efi_ia64_vec with bfd_pei_ia64_vec.
2827
        * targets.c: Likewise.
2828
 
2829
        * configure: Regenerated.
2830
        * libcoff.h: Likewise.
2831
        * Makefile.in: Likewise.
2832
 
2833
        * efi-app-ia32.c: Removed.
2834
        * efi-app-x86_64.c: Likewise.
2835
        * efi-bsdrv-ia32.c: Likewise.
2836
        * efi-bsdrv-ia64.c: Likewise.
2837
        * efi-bsdrv-x86_64.c: Likewise.
2838
        * efi-rtdrv-ia32.c: Likewise.
2839
        * efi-rtdrv-ia64.c: Likewise.
2840
        * efi-rtdrv-x86_64.c: Likewise.
2841
        * efi-rtdrv-ia32.c: Likewise.
2842
 
2843
        * efi-app-ia64.c: Moved to ...
2844
        * pei-ia64.c: This.
2845
        (TARGET_SYM): Set to bfd_pei_ia64_vec.
2846
        (TARGET_NAME): Set to pei-ia64.
2847
 
2848
        * libpei.h (bfd_target_pei_p): Removed.
2849
        (bfd_target_pei_arch): Likewise.
2850
        (bfd_target_efi_app_p): Likewise.
2851
        (bfd_target_efi_app_arch): Likewise.
2852
        (bfd_target_efi_bsdrv_p): Likewise.
2853
        (bfd_target_efi_bsdrv_arch): Likewise.
2854
        (bfd_target_efi_rtdrv_p): Likewise.
2855
        (bfd_target_efi_rtdrv_arch): Likewise.
2856
        (bfd_pe_executable_p): Likewise.
2857
 
2858
        * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
2859
        efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
2860
        (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
2861
        and efi-rtdrv-ia32.c.
2862
        (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
2863
        efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
2864
        efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
2865
        (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
2866
        efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
2867
        efi-rtdrv-x86_64.c. Add pei-ia64.c.
2868
        (efi-app-ia64.lo): Removed.
2869
        (efi-bsdrv-ia32.lo): Likewise.
2870
        (efi-rtdrv-ia32.lo): Likewise.
2871
        (efi-app-ia64.lo): Likewise.
2872
        (efi-bsdrv-ia64.lo): Likewise.
2873
        (efi-rtdrv-ia64.lo): Likewise.
2874
        (efi-app-x86_64.lo): Likewise.
2875
        (efi-bsdrv-x86_64.lo): Likewise.
2876
        (efi-rtdrv-x86_64.lo): Likewise.
2877
        (pei-ia64.lo): New.
2878
 
2879
        * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
2880
        with bfd_pei_p.
2881
        (arch_type): Removed.
2882
        (pe_arch): Likewise.
2883
        (pe_bfd_object_p): Just return coff_object_p.
2884
 
2885
        * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
2886
        bfd_pe_executable_p with bfd_pei_p.
2887
 
2888
2009-04-17  Christophe Lyon  
2889
 
2890
        * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
2891
        PLT entries to an undefined symbol when generating a shared
2892
        library.
2893
 
2894
2009-04-17  Nick Clifton  
2895
 
2896
        PR 9909
2897
        * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
2898
 
2899
2009-04-16  Richard Sandiford  
2900
 
2901
        * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
2902
        * aout-target.h (MY_bfd_define_common_symbol): Likewise.
2903
        * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
2904
        * binary.c (binary_bfd_define_common_symbol): Likewise.
2905
        * bout.c (b_out_bfd_define_common_symbol): Likewise.
2906
        * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
2907
        * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
2908
        * coffcode.h (coff_bfd_define_common_symbol): Likewise.
2909
        * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
2910
        * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
2911
        * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
2912
        * ieee.c (ieee_bfd_define_common_symbol): Likewise.
2913
        * ihex.c (ihex_bfd_define_common_symbol): Likewise.
2914
        * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
2915
        * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
2916
        * mmo.c (mmo_bfd_define_common_symbol): Likewise.
2917
        * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
2918
        * oasys.c (oasys_bfd_define_common_symbol): Likewise.
2919
        * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
2920
        * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
2921
        * som.c (som_bfd_define_common_symbol): Likewise.
2922
        * srec.c (srec_bfd_define_common_symbol): Likewise.
2923
        * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
2924
        * versados.c (versados_bfd_define_common_symbol): Likewise.
2925
        * vms.c (vms_bfd_define_common_symbol): Likewise.
2926
        * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
2927
        * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
2928
        * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
2929
        (pmac_xcoff_vec): Likewise.
2930
        * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2931
        (aix5coff64_vec): Likewise.
2932
        * linker.c (bfd_generic_define_common_symbol): New function.
2933
        * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
2934
        (_bfd_define_common_symbol): New field.
2935
        * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
2936
        * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
2937
        (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
2938
        symbols here.
2939
        * bfd-in2.h: Regenerate.
2940
        * libbfd.h: Likewise.
2941
        * libcoff.h: Likewise.
2942
 
2943
2009-04-15  Anthony Green  
2944
 
2945
        * targets.c: Add moxie support.
2946
        * Makefile.am: Ditto.
2947
        * Makefile.in: Rebuilt.
2948
        * cpu-moxie.c, elf32-moxie.c: New files.
2949
        * archures.c: Add moxie support.
2950
        * configure.in: Add moxie support.
2951
        * configure: Rebuilt.
2952
        * config.bfd, archures.c: Add moxie support.
2953
        * bfd-in2.h: Rebuilt.
2954
 
2955
2009-04-15  Christophe Lyon  
2956
 
2957
        * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
2958
        branch to an undef weak symbol into a jump to next instruction if
2959
        a PLT entry will be created.
2960
 
2961
2009-04-14  Dave Korn  
2962
 
2963
        * coffgen.c (make_a_section_from_file):  Set the backend long
2964
        section names enable if long section names found on input.
2965
        * coffcode.h:  Extend long section names documentation to match.
2966
 
2967
2009-04-08  H.J. Lu  
2968
 
2969
        * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
2970
        machine code.
2971
 
2972
2009-04-07  DJ Delorie  
2973
 
2974
        * archures.c: Add bfd_mach_mep_c5.
2975
        * bfd-in2.h: Likewise.
2976
        * cpu-mep.c: Add bfd_c5_arch.
2977
        * elf32-mep.c: Support it.
2978
 
2979
2009-04-07  H.J. Lu  
2980
 
2981
        * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
2982
        info->callbacks->einfo.
2983
        * linker.c (_bfd_generic_section_already_linked): Likewise.
2984
 
2985
2009-04-06  DJ Delorie  
2986
 
2987
        * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
2988
 
2989
2009-04-06  H.J. Lu  
2990
 
2991
        * coff-x86_64.c (bfd_pe_print_pdata): Defined to
2992
        _bfd_pex64_print_pdata only if PE is defined.
2993
 
2994
        * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
2995
        (_bfd_pex64_print_pdata): This.
2996
 
2997
        * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
2998
        (_bfd_pex64_print_pdata): This.  Defined only if COFF_WITH_pex64
2999
        is defined.
3000
 
3001
2009-04-05  Kai Tietz  
3002
 
3003
        * coff-x86_64.c (bfd_pe_print_pdata): Define as
3004
        _bfd_pep_print_x64_pdata.
3005
        * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
3006
        * peXXigen.c (_bfd_pep_print_x64_pdata): New.
3007
 
3008
2009-04-02  Sterling Augustine  
3009
 
3010
        * elf32-xtensa.c (relax_property_section): Always set r_offset
3011
        to zero.
3012
 
3013
2009-04-02  Christophe Lyon  
3014
 
3015
        * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
3016
        elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
3017
        branch stubs.
3018
        (elf32_arm_stub_type): New enum values for the two new stubs.
3019
        (arm_type_of_stub): Make use of the two new stubs.
3020
        (arm_size_one_stub): Handle the two new stubs.
3021
 
3022
2009-04-01  Matt Thomas  
3023
 
3024
        * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
3025
        hidden symbols into the GOT or PLT.GOT.
3026
        (elf_vax_relocate_section): Do not emit a PCREL reloc
3027
        into a shared object if it is against a hidden symbol.
3028
 
3029
2009-04-01  Richard Sandiford  
3030
 
3031
        * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
3032
        and know_contains_shared_object_p.
3033
        (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
3034
        Cache the result in the archive_info table.
3035
        (xcoff_auto_export_p): Add an "info" parameter and update the
3036
        call to xcoff_archive_contains_shared_object_p.
3037
        (xcoff_mark_auto_exports): Update accordingly.
3038
        (xcoff_post_gc_symbol): Likewise.
3039
 
3040
2009-04-01  Richard Sandiford  
3041
 
3042
        * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
3043
        rather than C_EXT.
3044
 
3045
2009-04-01  Richard Sandiford  
3046
 
3047
        * coff-rs6000.c (member_layout): New structure.
3048
        (archive_iterator): Likewise.
3049
        (member_layout_init): New function.
3050
        (archive_iterator_begin): Likewise.
3051
        (archive_iterator_next): Likewise.
3052
        (xcoff_write_armap_old): Use the new iterator functions.
3053
        (do_shared_object_padding): Delete.
3054
        (xcoff_write_armap_big): Use the new iterator functions.  Simplify
3055
        handling of arch_info.
3056
        (xcoff_write_archive_contents_old): Allocate arelt_data in the
3057
        first loop rather than the second.  Allocate a member header if
3058
        there isn't one, then work out the stat information and length
3059
        in the first loop too.  Use the new iterators for the second loop.
3060
        (xcoff_write_archive_contents_big): Likewise.
3061
 
3062
2009-04-01  Richard Sandiford  
3063
 
3064
        * bfd-in.h (bfd_xcoff_split_import_path): Declare.
3065
        (bfd_xcoff_set_archive_import_path): Likewise.
3066
        * bfd-in2.h: Regenerate.
3067
        * xcofflink.c: Include libiberty.h.
3068
        (xcoff_archive_info): New structure.
3069
        (xcoff_archive_info_hash): New function.
3070
        (xcoff_archive_info_eq): Likewise.
3071
        (xcoff_get_archive_info): Likewise.
3072
        (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
3073
        (bfd_xcoff_split_import_path): New function.
3074
        (bfd_xcoff_set_archive_import_path): Likewise.
3075
        (xcoff_set_import_path): Move earlier in file.
3076
        (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
3077
        object to the the directory part of the bfd's filename.  Get the
3078
        import path and filename of an archive object from the archive's
3079
        xcoff_tdata, initializing it if necessary.  Update use of
3080
        import_file_id.
3081
        (bfd_link_input_bfd): Update use of import_file_id.
3082
        (xcoff_write_global_symbol): Likewise.
3083
 
3084
2009-04-01  Richard Sandiford  
3085
 
3086
        * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
3087
 
3088
2009-04-01  Richard Sandiford  
3089
 
3090
        * xcofflink.c (xcoff_link_create_extra_sections): Don't create
3091
        a .loader section for relocatable links.
3092
        (xcoff_need_ldrel_p): New function.
3093
        (xcoff_mark): Use it.
3094
        (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
3095
        a loader section.
3096
        (xcoff_build_ldsym): New function, split out from...
3097
        (xcoff_build_ldsyms): ...here.  Rename to...
3098
        (xcoff_post_gc_symbol): ...this.  Only export symbols, and only
3099
        call xcoff_build_ldsym, if there's a loader section.
3100
        (xcoff_build_loader_section): New function, extracted verbatim from...
3101
        (bfd_xcoff_size_dynamic_sections): ...here.  Only call it if
3102
        there's a loader section.  Only add an __rtinit loader symbol
3103
        if there's a loader section.  Update after above name change.
3104
        (xcoff_symbol_section, xcoff_create_ldrel): New functions.
3105
        (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
3106
        and xcoff_create_ldrel.
3107
        (xcoff_write_global_symbol): Use xcoff_create_ldrel.
3108
        (xcoff_reloc_link_order): Likewise, but only call it if there's
3109
        a loader section.  Use xcoff_symbol_section.
3110
        (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
3111
        if there's a loader section.
3112
 
3113
2009-04-01  Richard Sandiford  
3114
 
3115
        * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
3116
 
3117
2009-04-01  Christophe Lyon  
3118
 
3119
        * elf32-arm.c (group_sections): Rewrite loops for better
3120
        readability.
3121
 
3122
2009-03-30  DJ Delorie  
3123
 
3124
        * elflink.c (elf_link_input_bfd): Don't try to resolve complex
3125
        relocs when doing a relocatable link.
3126
 
3127
2009-03-28  Mark Mitchell  
3128
 
3129
        * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
3130
        "ERROR:", in error messages.
3131
        * cpu-arm.c (bfd_arm_merge_machines): Likewise.
3132
        * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
3133
        * elf32-arm.c (tag_cpu_arch_combine): Likewise.
3134
        (elf32_arm_merge_eabi_attributes): Likewise.
3135
        (elf32_arm_merge_private_bfd_data): Likewise.
3136
 
3137
2009-03-27  Nick Clifton  
3138
 
3139
        * section.c (bfd_get_section_contents): Detect and handle the case
3140
        where a section has the SEC_IN_MEMORY flag set but no actual
3141
        contents allocated.
3142
 
3143
2009-03-26  Alan Modra  
3144
 
3145
        PR 6494
3146
        * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
3147
        p_filesz and p_memsz are equal.  Use p_memsz as the segment size.
3148
        (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
3149
        if we don't find matching PT_LOAD when copying.
3150
 
3151
2009-03-25  M R Swami Reddy 
3152
 
3153
        * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
3154
        the reloc descriptions.
3155
 
3156
2009-03-25  Hans-Peter Nilsson  
3157
 
3158
        * elf32-cris.c (cris_elf_relocate_section) 
3159
        : Handle COMMON symbols.
3160
        : Ditto.
3161
 
3162
2009-03-24  H.J. Lu  
3163
 
3164
        * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
3165
        (bfd_i386_arch_intel_syntax): Likewise.
3166
        (i8086_arch): Likewise.
3167
        (bfd_x86_64_arch): Likewise.
3168
 
3169
2009-03-24  Hans-Peter Nilsson  
3170
 
3171
        * elf32-cris.c (cris_elf_relocate_section): 
3172
        R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
3173
        symbols for non-allocated sections.  Don't check whether to
3174
        generate R_CRIS_DTPMOD for non-allocated sections.
3175
        (cris_elf_gc_sweep_hook) : Don't
3176
        handle relocation GC:ing if applied to non-allocated section.
3177
        (cris_elf_check_relocs): Similar.
3178
 
3179
        * elf32-cris.c (cris_elf_relocate_section) 
3180
        : Don't include the TLS size
3181
        when emitting a known TP offset in the GOT.
3182
 
3183
2009-03-23  Alan Modra  
3184
 
3185
        * elf64-ppc.c (synthetic_opd): Delete.
3186
        (compare_symbols): Look for .opd name rather than section match.
3187
        (ppc64_elf_get_synthetic_symtab): Likewise.
3188
 
3189
2009-03-21  Alan Modra  
3190
 
3191
        * elf32-ppc.c (is_pic_glink_stub): Delete.
3192
        (is_nonpic_glink_stub): New function.
3193
        (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
3194
        than first pic one.
3195
        (struct ppc_elf_link_hash_table ): Comment fix.
3196
 
3197
2009-03-20  Martin Schwidefsky  
3198
            Andreas Krebbel  
3199
 
3200
        * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
3201
        macros for visibilty and locality checks.
3202
        (elf_s390_adjust_dynamic_symbol): Likewise.
3203
        (allocate_dynrelocs): Likewise.
3204
        (elf_s390_relocate_section): Likewise.
3205
        (elf_s390_finish_dynamic_symbol): Likewise.
3206
        * elf64-s390.c (elf_s390_check_relocs): Likewise.
3207
        (elf_s390_adjust_dynamic_symbol): Likewise.
3208
        (allocate_dynrelocs): Likewise.
3209
        (elf_s390_relocate_section): Likewise.
3210
        (elf_s390_finish_dynamic_symbol): Likewise.
3211
 
3212
2009-03-19  Kai Tietz  
3213
 
3214
        * bfd-in2.h: Regenerated.
3215
        * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
3216
        for debugging sections and map memory read/write dependent on
3217
        SEC_COFF_NOREAD.
3218
        (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
3219
        without memory read flags set.
3220
        * section.c: Add SEC_COFF_NOREAD to section flags.
3221
 
3222
2009-03-19  Andreas Schwab  
3223
 
3224
        * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
3225
        for format string.
3226
 
3227
2009-03-19  Alan Modra  
3228
 
3229
        * elf32-spu.c (spu_elf_find_overlays): Separate error return from
3230
        "no overlays" return.  If there are overlays, create overlay
3231
        manager entry symbols here, so that..
3232
        (spu_elf_build_stubs): ..we don't need to set them up here.
3233
        Simplify entry symbol tests.
3234
        * elf32-spu.h (spu_elf_find_overlays): Update prototype.
3235
 
3236
2009-03-18  Mark Kettenis  
3237
 
3238
        * elf.c (elfcore_grok_openbsd_procinfo)
3239
        (elfcore_grok_openbsd_note): New functions.
3240
        (elf_parse_notes): Handle notes from OpenBSD ELF core files.
3241
 
3242
2009-03-18  Alan Modra  
3243
 
3244
        * vms-hdr.c: Don't include alloca.h.
3245
        * elf32-m68hc1x.c: Include alloca-conf.h.
3246
        * xsym.c: Likewise.
3247
        * elf64-hppa.c: Likewise.  Remove existing #if's handling alloca.
3248
        * som.c: Likewise.
3249
        * Makefile.am: Run "make dep-am".
3250
        * Makefile.in: Regenerate.
3251
 
3252
2009-03-17  Daniel Jacobowitz  
3253
 
3254
        * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
3255
 
3256
2009-03-17  Alan Modra  
3257
 
3258
        * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
3259
        Add compact_stub.
3260
        (emum _ovly_flavour): Delete ovly_compact, ovly_none.
3261
        * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
3262
        ovly_return fields with ovly_entry[2].  Adjust all users.
3263
        (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
3264
        when soft-icache.
3265
        (spu_elf_build_stubs): Likewise.
3266
        (ovl_stub_size): Change arg to spu_elf_params pointer.  Adjust for
3267
        ovly_flavour changes.  Update all callers.
3268
        (ovl_stub_size_log2): New function.
3269
        (build_stub): Handle compact icache stubs.  Use different manager
3270
        entry point for stubs in non-icache area.
3271
        (spu_elf_size_stubs): Don't allocate space for indirect branch
3272
        descriptors.
3273
        (spu_elf_build_stubs): And don't built them.
3274
 
3275
2009-03-16  Andrew Stubbs  
3276
 
3277
        * dwarf2.c (read_section): Always use rawsize, if available.
3278
 
3279
2009-03-16  Alan Modra  
3280
 
3281
        * simple.c (bfd_simple_get_relocated_section_contents): Use larger
3282
        of rawsize and size for buffer.
3283
 
3284
2009-03-15  Ulrich Weigand  
3285
 
3286
        * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
3287
        parameter just because fixed sections fit into local store.
3288
        (spu_elf_auto_overlay): Do not declare as "noreturn".  Skip
3289
        generating overlays if fixed sections plus reserved stack
3290
        and heap space fit into local store.
3291
 
3292
2009-03-15  Alan Modra  
3293
 
3294
        * elf32-spu.c (build_stub): Correct icache set_id.
3295
        (spu_elf_relocate_section): Likewise.
3296
 
3297
2009-03-14  Richard Sandiford  
3298
 
3299
        * xcofflink.c (xcoff_link_check_archive_element): Only free the
3300
        symbol table if it was created by the current call.
3301
 
3302
2009-03-14  Richard Sandiford  
3303
 
3304
        * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
3305
        class XMC_DS rather than XMC_UA.
3306
 
3307
2009-03-14  Richard Sandiford  
3308
 
3309
        * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
3310
        bfd_boolean export_defineds parameter with an unsigned int
3311
        auto_export_flags parameter.
3312
        * bfd-in2.h: Regenerate.
3313
        * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
3314
        split out from xcoff_build_ldsyms.
3315
        (xcoff_covered_by_expall_p): New function.
3316
        (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
3317
        but with extra code to handle -bexpfull and -bexpall.
3318
        (xcoff_mark_auto_exports): New function.
3319
        (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
3320
        a function should be automatically exported.
3321
        (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
3322
        parameter with an auto_export_flags parameter.  Update ldinfo
3323
        accordingly.  Use xcoff_mark_auto_exports to mark all automatically-
3324
        exported symbols.
3325
 
3326
2009-03-14  Richard Sandiford  
3327
 
3328
        * xcofflink.c (xcoff_mark_symbol_by_name): New function.
3329
        (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
3330
        init and fini functions.  Do garbage collection for objects
3331
        without an entry point too.
3332
 
3333
2009-03-14  Richard Sandiford  
3334
 
3335
        * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
3336
        check whether a symbol has csect information.
3337
        (coff_print_aux): Likewise.
3338
        * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
3339
        information for C_AIX_WEAKEXT too.
3340
        (_bfd_xcoff_swap_aux_out): Likewise.
3341
        (xcoff_reloc_type_br): Handle defweak symbols too.
3342
        * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
3343
        information for C_AIX_WEAKEXT too.
3344
        (_bfd_xcoff64_swap_aux_out): Likewise.
3345
        (xcoff64_reloc_type_br): Handle defweak symbols too.
3346
        * coffgen.c (coff_print_symbol): Handle auxillary function
3347
        information for C_AIX_WEAKEXT too.
3348
        * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
3349
        instead of BSF_GLOBAL if the L_WEAK flag is set.
3350
        (xcoff_dynamic_definition_p): New function.
3351
        (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
3352
        defines h.  Don't change h if ldsym isn't the definition.  Otherwise,
3353
        always take the symbol class from the ldsym.  Use weak bfd symbol
3354
        types for weak ldsyms.
3355
        (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
3356
        Fix the check for whether a definition is from a shared object.
3357
        Allow redefinitions of weak symbols.
3358
        (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
3359
        (xcoff_keep_symbol_p): Likewise.
3360
        (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
3361
        (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
3362
        Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
3363
        but mark them as L_WEAK.
3364
        (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
3365
        instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
3366
 
3367
2009-03-14  Richard Sandiford  
3368
 
3369
        * xcofflink.c (xcoff_mark): When walking the relocations,
3370
        only mark the target symbol or the target section, not both.
3371
        (xcoff_final_definition_p): New function.
3372
        (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
3373
        symbol is a valid definition of the associated output symbol.
3374
        Use XCOFF_ALLOCATED to stop the same hash table entry having
3375
        two output symbols.
3376
        (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
3377
        keeping a symbol.
3378
        (xcoff_link_input_bfd): Use xcoff_final_definition_p.
3379
 
3380
2009-03-14  Richard Sandiford  
3381
 
3382
        * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
3383
        symbols as XMC_XO.
3384
 
3385
2009-03-14  Richard Sandiford  
3386
 
3387
        * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
3388
        * libcoff.h: Regenerate.
3389
        * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
3390
        line-number counts in the bfd's lineno_counts field.
3391
        Don't keep per-csect line-number counts.
3392
        (xcoff_sweep): Don't update per-csect line-number counts.
3393
        (bfd_xcoff_size_dynamic_sections): Count the number of line-number
3394
        entries in each output section.
3395
        (xcoff_link_input_bfd): Get the number of line numbers from
3396
        the bfd's lineno_counts field, rather than recalculating it
3397
        from scratch.  Fix the range check when updating C_BINCL and
3398
        C_EINCL symbols.
3399
        (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
3400
        here.  Don't expect csects to have line-number counts.
3401
 
3402
2009-03-14  Richard Sandiford  
3403
 
3404
        * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
3405
        * libcoff.h: Regenerate.
3406
        * xcofflink.c (xcoff_keep_symbol_p): New function, using the
3407
        "skip" logic from xcoff_link_input_bfd.
3408
        (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
3409
        objects in a dynamic link, rather than checking whether csectpp
3410
        is null.  Always allocate debug_index for other objects,
3411
        and always go through the loop.  Update the type of debug_index
3412
        after the change above.  Read the auxillary csect information
3413
        and use xcoff_keep_symbol_p to decide whether a symbol should
3414
        be kept.  Set its debug_index to -2 if not.
3415
        (xcoff_link_input_bfd): Update the type of debug_index after
3416
        the change above and always expect it to be nonnull.  Use it to
3417
        test whether a symbol should be stripped, rather than making the
3418
        decision here.  Postpone all symbol creation to the second pass.
3419
 
3420
2009-03-14  Richard Sandiford  
3421
 
3422
        * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
3423
        creating a descriptor.
3424
        (xcoff_sweep): Don't mark toc_section unless it's needed.
3425
        (bfd_xcoff_size_dynamic_sections): Skip the toc_section
3426
        when marking every bfd.
3427
        (xcoff_link_input_bfd): Skip all TOC anchors.
3428
        (xcoff_toc_section_p, xcoff_find_tc0): New functions.
3429
        (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
3430
        to -1; call xcoff_find_tc0 instead.
3431
 
3432
2009-03-14  Richard Sandiford  
3433
 
3434
        * libcoff-in.h (xcoff_section_tdata): Update commentary.
3435
        * libcoff.h: Regenerate.
3436
        * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
3437
        symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
3438
        the previous symbol's csect.  Treat last_symndx as an inclusive value
3439
        and simplify its handling.
3440
        (xcoff_mark): Treat last_symndx as an inclusive value.  Only mark
3441
        symbols with the right csect.  Don't mark rsec when processing
3442
        relocations against undefined or absolute sections.
3443
        (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
3444
        of bfd_und_section_ptr.
3445
        (xcoff_link_input_bfd): Likewise.
3446
 
3447
2009-03-14  Richard Sandiford  
3448
 
3449
        * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
3450
        against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
3451
        flag is set.  Assert that all undefined symbols are either
3452
        imported or defined by a dynamic object.
3453
        * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
3454
        * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
3455
        handling to all relocations.  Only set XCOFF_CALLED for function
3456
        symbols.
3457
        (xcoff_find_function): New function, split out from...
3458
        (bfd_xcoff_export_symbol) ...here.
3459
        (xcoff_set_import_path): New function, split out from...
3460
        (bfd_xcoff_import_symbol): ...here.  Remove assertion for old
3461
        meaning of XCOFF_CALLED.
3462
        (xcoff_mark_symbol): If we mark an undefined and unimported
3463
        symbol, find some way of defining it.  If the symbol is a function
3464
        descriptor, fill in its definition automatically.  If the symbol
3465
        is a function, mark its descriptor and allocate room for global
3466
        linkage code.  Otherwise mark the symbol as implicitly imported.
3467
        Move the code for creating function descriptors from...
3468
        (xcoff_build_ldsyms): ...here.  Use XCOFF_WAS_UNDEFINED to
3469
        check for symbols that were implicitly defined.
3470
        (xcoff_mark): Don't count any dynamic relocations against
3471
        function symbols.
3472
        (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
3473
        in the xcoff link info.
3474
        (xcoff_link_input_bfd): Remove handling of undefined and
3475
        unexported symbols.
3476
 
3477
2009-03-14  Richard Sandiford  
3478
 
3479
        * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
3480
        if the target is absolute.  Fix comment typo.
3481
        (xcoff_ppc_relocate_section): Remove FIXME.
3482
        * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
3483
        if the target is absolute.
3484
 
3485
2009-03-14  Richard Sandiford  
3486
 
3487
        * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
3488
        R_POS and R_NEG relocations against absolute symbols to the
3489
        .loader section.
3490
 
3491
2009-03-14  Richard Sandiford  
3492
 
3493
        * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
3494
        to 2 for bfd_mach_ppc_620.
3495
 
3496
2009-03-14  Richard Sandiford  
3497
 
3498
        * config.bfd: Treat AIX 6+ in the same way as AIX 5.
3499
        * configure.in: Likewise.
3500
        * configure: Regenerate.
3501
 
3502
2009-03-13  H.J. Lu  
3503
 
3504
        PR binutils/9945
3505
        * elf.c (assign_section_numbers): Generate symbol table if there
3506
        is any relocation in output.
3507
        (_bfd_elf_compute_section_file_positions): Likewise.
3508
 
3509
2009-03-13  Nick Clifton  
3510
 
3511
        PR 9934
3512
        * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
3513
        * elflink.c (elf_link_read_relocs_from_section): Use
3514
        NUM_SHDR_ENTRIES.  Gracefully handle the case where there are
3515
        relocs but no symbol table.
3516
        * elf32-arm.c (elf32_arm_check_relocs): Likewise.
3517
 
3518
2009-03-12  H.J. Lu  
3519
 
3520
        PR ld/9938
3521
        * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
3522
        to check ___tls_get_addr.
3523
 
3524
        * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
3525
        strncmp to check __tls_get_addr.
3526
 
3527
2009-03-12  Andrew Stubbs  
3528
 
3529
        * dwarf2.c (read_section): Always check the offset, even when the
3530
        section has been read before.
3531
 
3532
2009-03-11  H.J. Lu  
3533
 
3534
        * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
3535
        comments.
3536
 
3537
2009-03-11  Chris Demetriou  
3538
 
3539
        * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
3540
        * bfd-in2.h: Regenerate.
3541
        * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
3542
        flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
3543
        mode.
3544
        (bsd_write_armap): Likewise.
3545
        (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
3546
        flag is set, do nothing.
3547
        (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
3548
        for timestamp.
3549
 
3550
2009-03-11  Ulrich Weigand  
3551
 
3552
        * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
3553
        used to update stack pointer.
3554
 
3555
2009-03-07  John David Anglin  
3556
 
3557
        PR binutils/9921
3558
        * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
3559
        for unknown symbols in absolute section.
3560
 
3561
2009-03-06  Nick Clifton  
3562
 
3563
        * po/es.po: Updated Spanish translation.
3564
 
3565
2009-03-05  Christophe Lyon  
3566
 
3567
        * elf32-arm.c (group_sections): Take next section size into
3568
        account before accepting to group it.
3569
 
3570
2009-03-05  Christophe Lyon  
3571
 
3572
        * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
3573
        PLT entries.
3574
        (elf32_arm_final_link_relocate): Likewise.
3575
 
3576
2009-03-05  Moritz Kroll  
3577
 
3578
        PR 9923
3579
        * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
3580
 
3581
2009-03-04  Alan Modra  
3582
 
3583
        * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
3584
        * section.c (struct bfd_section): Add has_tls_get_addr_call.
3585
        (BFD_FAKE_SECTION): Init new flag.
3586
        * ecoff.c (bfd_debug_section): Likewise.
3587
        * bfd-in2.h: Regenerate.
3588
        * libbfd.h: Regenerate.
3589
        * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
3590
        (ppc_elf_reloc_type_lookup): Handle new relocs.
3591
        (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
3592
        without marker relocs.
3593
        (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
3594
        if section has no old-style calls.
3595
        (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
3596
        Don't try to optimize new-style __tls_get_addr call when handling
3597
        arg setup relocs.  Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
3598
        relocs.
3599
        * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
3600
        (ppc64_elf_reloc_type_lookup): Handle new relocs.
3601
        (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
3602
        without marker relocs.
3603
        (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
3604
        if section has no old-style calls.  Set toc_ref for new relocs as
3605
        appropriate.
3606
        (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
3607
        Don't try to optimize new-style __tls_get_addr call when handling
3608
        arg setup relocs.  Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
3609
        relocs.
3610
 
3611
2009-03-04  Alan Modra  
3612
 
3613
        PR 6768
3614
        * configure.in: Test for ld --as-needed support.  Link shared
3615
        libbfd against libm.
3616
        * configure: Regenerate.
3617
 
3618
2009-03-03  Alan Modra  
3619
 
3620
        * Makefile.am: Run "make dep-am".
3621
        * Makefile.in: Regenerate.
3622
 
3623
2009-03-02  Qinwei  
3624
 
3625
        * elf32-score7.c: New file.
3626
        * elf32-score.h: New file.
3627
        * elf32-score.c: Add code to support score 7.  Set score7 as the
3628
        default.
3629
        * cpu-score.c: Add score7 architecure.
3630
        (compatibile): New function.
3631
        * Makefile.am: Add rules for building elf32-score7 object.
3632
        * Makefile.in: Regenerate.
3633
        * configure.in: Add elf32-score7 object to score vectors.
3634
        * configure: Regenerate.
3635
        * reloc.c: Add score7 relocs.
3636
        * archures.c: Add score3 and score7 machine numbers.
3637
        * bfd-in2.h: Regenerate.
3638
        * libbfd.h: Regenerate.
3639
 
3640
2009-03-01  Ralf Wildenhues  
3641
 
3642
        * configure: Regenerate.
3643
 
3644
2009-03-01  John David Anglin  
3645
 
3646
        * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
3647
        (elf32_hppa_check_relocs): Use it.
3648
 
3649
        * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
3650
        elf64-hppa.c.
3651
        (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
3652
        (elf_hppa_remark_useless_dynamic_symbols): Likewise.
3653
        (elf_hppa_is_dynamic_loader_symbol): Likewise.
3654
        (elf_hppa_record_segment_addrs): Likewise.
3655
        (elf_hppa_final_link): Likewise.
3656
        (elf_hppa_relocate_insn): Likewise.
3657
        (elf_hppa_final_link_relocate): Likewise.
3658
        (elf64_hppa_relocate_section): Likewise.
3659
        * elf64-hppa.c: Insert above.
3660
 
3661
2009-02-28  John David Anglin  
3662
 
3663
        * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
3664
        (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
3665
        (elf_hppa_relocate_section): Likewise.
3666
        * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
3667
        from struct elf_link_hash_entry.  Add count field.
3668
        (struct elf64_hppa_dyn_hash_table): Delete.
3669
        (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
3670
        (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
3671
        (hppa_elf_hash_entry, eh_name): Define.
3672
        (elf64_hppa_new_dyn_hash_entry): Delete.
3673
        (elf64_hppa_dyn_hash_lookup): Delete.
3674
        (elf64_hppa_dyn_hash_traverse): Delete.
3675
        (get_dyn_name): Delete.
3676
        (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
3677
        of struct elf64_hppa_dyn_hash_entry *.
3678
        (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
3679
        allocate_global_data_plt, allocate_global_data_stub,
3680
        allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
3681
        Likewise.
3682
        (hppa64_link_hash_newfunc): New.
3683
        (elf64_hppa_hash_table_create): Rework.
3684
        (count_dyn_reloc): Likewise.
3685
        (hppa64_elf_local_refcounts): New.
3686
        (elf64_hppa_check_relocs): Rework using standard technique for recording
3687
        local DLT, PLT and OPD reference counts.
3688
        (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
3689
        elf_link_hash_entry *.
3690
        (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
3691
        allocate_global_data_plt, allocate_global_data_stub,
3692
        allocate_global_data_opd, allocate_dynrel_entries,
3693
        elf64_hppa_adjust_dynamic_symbol,
3694
        elf64_hppa_mark_milli_and_exported_functions): Likewise.
3695
        (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
3696
        Use hppa_link_hash_table.  Rework.
3697
        (elf64_hppa_link_output_symbol_hook): Rework.
3698
        (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
3699
        elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
3700
        elf64_hppa_finish_dynamic_sections): Likewise.
3701
 
3702
2009-02-26  Christophe Lyon  
3703
 
3704
        * elf32-arm.c (stub_reloc_type): Removed.
3705
        (insn_sequence): Renamed reloc_type field to r_type.
3706
        (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
3707
        (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
3708
        (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
3709
        (elf32_arm_stub_type): Add new enum entries for the new stubs.
3710
        (arm_stub_is_thumb): Catch new stubs.
3711
        (arm_type_of_stub): Handle new stubs.
3712
        (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
3713
        (bfd_elf32_arm_process_before_allocation): Remove useless
3714
        condition.
3715
 
3716
2009-02-25  H.J. Lu  
3717
 
3718
        * elf.c (elf_find_function): Use is_function_type to check
3719
        function symbol.
3720
 
3721
2009-02-24  Sterling Augustine  
3722
 
3723
        * xtensa-modules.c: Revert to previous version 1.11 due
3724
        to inadvertant commit.
3725
 
3726
2009-02-24  Sterling Augustine  
3727
 
3728
        * elf32-xtensa.c (text_action_add): Separate test for action
3729
        type.  Break if saved action is ta_widen_insn at same offset.
3730
 
3731
2009-02-24  Daniel Jacobowitz  
3732
 
3733
        * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
3734
        to elf32_arm_stub_long_branch_any_arm_pic.
3735
        (elf32_arm_stub_long_branch_any_thumb_pic): New.
3736
        (enum elf32_arm_stub_type, arm_type_of_stub)
3737
        (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
3738
        separately.
3739
 
3740
2009-02-24  Joseph Myers  
3741
 
3742
        * elf32-arm.c (PREV_SEC): Update comment.
3743
        (group_sections): Rename argument to stubs_always_after_branch.
3744
        Reverse the list and place stubs at the end of input sections.
3745
        Undefine NEXT_SEC.
3746
        (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
3747
 
3748
2009-02-23  Daniel Jacobowitz  
3749
 
3750
        * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
3751
        Fix formatting.
3752
        (arm_size_one_stub): Remove unnecessary break.
3753
        (arm_map_one_stub): Fix formatting.  Return after BFD_FAIL.
3754
 
3755
2009-02-23  Christophe Lyon  
3756
 
3757
        * elf32-arm.c (stub_insn_type): New type.
3758
        (stub_reloc_type): Likewise.
3759
        (insn_sequence): Likewise.
3760
        (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
3761
        (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
3762
        (elf32_arm_stub_long_branch_thumb_only): Likewise.
3763
        (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
3764
        (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
3765
        (elf32_arm_stub_long_branch_any_any_pic): Likewise.
3766
        (elf32_arm_stub_hash_entry): Add new helper fields.
3767
        (stub_hash_newfunc): Initialize these new fields.
3768
        (arm_build_one_stub): Encode Arm and Thumb instructions separately
3769
        to take endianness into account.
3770
        (arm_size_one_stub): Compute size of stubs using insn_sequence.
3771
        (arm_map_one_stub): Code is now more generic, thanks to
3772
        insn_sequence.
3773
 
3774
2009-02-23  Christophe Lyon  
3775
 
3776
        * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
3777
        code.
3778
        (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
3779
        (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
3780
        BLX is not available. Fix typo in warning message. Add comments
3781
        and improve formatting.
3782
        (arm_build_one_stub): Adjust to new
3783
        elf32_arm_stub_long_branch_v4t_thumb_arm stub.
3784
        (arm_map_one_stub): Likewise.
3785
 
3786
2009-02-23  Tristan Gingold  
3787
            Eric Botcazou  
3788
            Douglas B Rupp  
3789
 
3790
        * vms.h: Update copyright year, fix comments, reorder declarations.
3791
        (_bfd_save_vms_section): Remove the prototype.
3792
        (EGPS_S_V_NO_SHIFT): New constant.
3793
        (bfd_vms_set_section_flags): New prototype.
3794
        (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
3795
        constants.
3796
        (EGSY_S_W_FLAGS): Ditto.
3797
        (EGSY_S_V_QUAD_VAL): Ditto.
3798
        (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
3799
        (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
3800
        EGST_S_B_NAMLNG): Ditto.
3801
        (ESRF_S_B_NAMLNG): Ditto.
3802
        (ETIR_S_C_HEADER_SIZE): Ditto.
3803
        (EGPS_S_V_ALLOC_64BIT): Ditto.
3804
        (DST_S_C_EPILOG): Ditto.
3805
        (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
3806
        (DST_S_C_SRC_INCRLNUM_B): Ditto.
3807
        (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
3808
        (DST_S_L_PCLINE_UNSLONG): Ditto.
3809
        (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
3810
        (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
3811
        (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
3812
        (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
3813
        (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
3814
        (DST_S_B_SRC_UNSBYTE): Ditto.
3815
        (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
3816
        Add prototypes.
3817
        (vms_section, vms_reloc): Remove types.
3818
        (hdr_struc): Replaced by ...
3819
        (hdr_struct): ... new type.
3820
        (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
3821
        (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
3822
        (EMH_DATE_LENGTH): Ditto.
3823
        (eom_struc): Replaced by ...
3824
        (eom_struct): ... new type.
3825
        (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
3826
        (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
3827
        (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
3828
        (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
3829
        (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
3830
        (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
3831
        (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
3832
        (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
3833
        (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
3834
        (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
3835
        (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
3836
        (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
3837
        (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
3838
        (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
3839
        (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
3840
        (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
3841
        (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
3842
        (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
3843
        (DBG_S_C_DMT_PSECT_SIZE): Ditto.
3844
        (enum file_type_enum): New type.
3845
        (struct location_struct): Removed.
3846
        (struct fileinfo, struct srecinfo, struct lineinfo): New types.
3847
        (struct funcinfo, struct module): Ditto.
3848
        (struct vms_private_data_struct): Update fields.
3849
        (struct vms_section_data_struct): New type.
3850
 
3851
        * vms.c: Update copyright year, fix comments,
3852
        Fix includes for DECC, add prototypes.
3853
        (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
3854
        some initializers.
3855
        Use flavour to set is_vax, location_stack is removed.
3856
        (struct pair): Declare.
3857
        (fill_section_ptr): Initialize variables at declaration.
3858
        Add guard to set SECTION_SYM flag, handlde und section.
3859
        (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
3860
        (_bfd_vms_slurp_object_records): New function, replaces previous
3861
        vms_object_p.
3862
        (vms_slurp_module): New function.
3863
        (vms_slurp_image): Ditto.
3864
        (vms_object_p): Complete rewrite.
3865
        (vms_mkobject): Use is_vax field to slect architecture.
3866
        (free_reloc_stream): New function.
3867
        (vms_convert_to_var): Ditto.
3868
        (vms_convert_to_var_1): Ditto.
3869
        (vms_convert_to_var_unix_filename): Ditto.
3870
        (vms_close_and_cleanup): Call free_reloc_stream, convert file to
3871
        VAR format on VMS.
3872
        (vms_new_section_hook): Set alignment to 0, allocate private data.
3873
        (vms_get_section_contents): Load content.
3874
        (vms_get_symbol_info): Handle undefined section.
3875
        (vms_find_nearest_line): Handle.
3876
        (alloc_reloc_stream): New function.
3877
        (vms_slurp_reloc_table): Ditto.
3878
        (vms_get_reloc_upper_bound): Make it real.
3879
        (vms_canonicalize_reloc): Do the real work.
3880
        (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
3881
        ALPHA_R_BOH.
3882
        (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
3883
        (vms_set_arch_mach): Check arch.
3884
        (vms_set_section_contents): Copy the content after allocation.
3885
        (vms_alpha_vec): Update object flags.
3886
 
3887
        * vms-tir.c: Update copyright year, fix comments,
3888
        add prototypes for new functions.
3889
        (dst_define_location): New function.
3890
        (dst_restore_location): New function.
3891
        (dst_retrieve_location): New function.
3892
        (dst_check_allocation): New function.
3893
        (image_dump): Call dst_check_allocation.
3894
        (image_write_b): Ditto.
3895
        (image_write_w): Ditto.
3896
        (image_write_l): Ditto.
3897
        (image_write_q): Ditto.
3898
        (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
3899
        STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
3900
        CTL_STKDL.
3901
        Call error handler instead of abort if name is not known.
3902
        (etir_sta): Add quarter_relocs argument and set it.
3903
        Fix cast.
3904
        (etir_sto): Ditto.
3905
        (etir_opr): Ditto, return FALSE in case of error.
3906
        (etir_ctl): Add quarter_relocs argument and set it, fix cast.
3907
        Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
3908
        (etir_stc): Add quarter_relocs argument and set it, fix cast.
3909
        Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
3910
        Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
3911
        Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
3912
        Return FALSE in case of error.
3913
        (tir_sta): Change sign of psect.
3914
        (tir_ctl): Ditto.
3915
        (tir_cmd): Fix cast. Makes tir_table static const.
3916
        (etir_cmd): Add quarter_relocs argument, makes etir_table const,
3917
        add argument to explain.
3918
        (analyze_etir): Initialize maxptr, add quarter_relocs
3919
        declaration, move some declarations into inner scopes.
3920
        Handle quarter_relocs and STO_IMM.
3921
        (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
3922
        (_bfd_vms_slurp_relocs): New function.
3923
        (_bfd_vms_decode_relocs): New function.
3924
        (sto_imm): Rewritten.
3925
        (start_first_etbt_record): New function.
3926
        (start_another_etbt_record): Ditto.
3927
        (etir_output_check): Ditto.
3928
        (defer_reloc_p): Ditto.
3929
        (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
3930
        a for-loop.  Correctly deals with contents, deals with .vmsdebug,
3931
        rewritte relocations handling.
3932
        (_bfd_vms_write_tbt): Removed.
3933
        (_bfd_vms_write_dbg): Ditto.
3934
 
3935
        * vms-misc.c: Update copyright year, Fix comments.
3936
        (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
3937
        (maybe_adjust_record_pointer_for_object): New function.
3938
        (_bfd_vms_get_first_record): New function, replaces ...
3939
        (_bfd_vms_get_record): ..  removed.
3940
        (_bfd_vms_get_object_record): New function.
3941
        (_bfd_vms_get_object_record): New function.
3942
        (vms_get_remaining_object_record): New function, replaces ...
3943
        (_bfd_vms_get_next_record): ... removed.
3944
        (add_new_contents): Removed.
3945
        (_bfd_save_vms_section): Removed.
3946
        (_bfd_get_vms_section): Removed.
3947
        (_bfd_vms_output_flush): Write in VAR format.
3948
        (new_symbol): Don't make UND section.
3949
 
3950
        * vms-hdr.c: Update copyright year, update list of record handled.
3951
        (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
3952
        (_bfd_vms_write_hdr): Strip vms and unix patches,
3953
        add comments, truncate module name at 31 characters,
3954
        use constants instead of hard-coded value,
3955
        write BFD version instead of a fixed string.
3956
        (_bfd_vms_slurp_ihd): New function.
3957
        (_bfd_vms_slurp_isd): Ditto.
3958
        (_bfd_vms_slurp_ihs): Ditto.
3959
        (new_module): Ditto.
3960
        (parse_module): Ditto
3961
        (build_module_list): Ditto.
3962
        (module_find_nearest_line): Ditto.
3963
        (_bfd_vms_find_nearest_dst_line): Ditto.
3964
        (vms_slurp_debug): Ditto.
3965
        (_bfd_vms_slurp_dbg): Ditto.
3966
        (_bfd_vms_slurp_tbt): Ditto.
3967
        (_bfd_vms_write_dbg): Ditto.
3968
        (_bfd_vms_write_tbt): Ditto.
3969
 
3970
        * vms-gsd.c: Update copyright year, update list of records handled.
3971
        (EVAX_LITERALS_NAME): New macro.
3972
        (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
3973
        (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
3974
        (register_universal_symbol): New function and prototype.
3975
        (_bfd_vms_slurp_gsd): Fix indentations and casts,
3976
        improve debug messages,
3977
        use constants instead of hard-coded value,
3978
        fix missing endianness conversion,
3979
        handle global symbol (SYMG).
3980
        (bfd_vms_set_section_flags): New function.
3981
        (_bfd_vms_write_gsd): Don't write .vmsdebug section,
3982
        handle section literals,
3983
        fix indentation,
3984
        handle section bfd and vms flags,
3985
        don't output LIB$INITIALIZE symbol,
3986
        fix handling of weak symbols,
3987
        fix evax vs vax procedure descriptor,
3988
        handle absolute symbols.
3989
 
3990
        * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
3991
        BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
3992
 
3993
        * makefile.vms (DEFS): Fix flags for VMS.
3994
 
3995
        * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
3996
 
3997
        * bfd-in2.h: Regenerated.
3998
        * libbfd.h: Regenerated.
3999
 
4000
2009-02-20  Cary Coutant  
4001
 
4002
        * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
4003
        in struct stat.
4004
 
4005
2009-18-02  Dave Korn  
4006
 
4007
        PR gas/7059
4008
        * coffcode.h (coff_write_object_contents):  Don't let the string
4009
        table offset overflow the s_name field when using long section names.
4010
 
4011
2009-18-02  Dave Korn  
4012
 
4013
        * coff-alpha.c (alpha_ecoff_backend_data):  Initialise fields which
4014
        control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
4015
        * coff-mips.c (mips_ecoff_backend_data):  Likewise.
4016
        * coff-rs6000.c (bfd_xcoff_backend_data):  Initialise fields which
4017
        control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
4018
        (bfd_pmac_xcoff_backend_data):  Likewise.
4019
        * coff64-rs6000.c (bfd_xcoff_backend_data):  Likewise.
4020
        (bfd_xcoff_aix5_backend_data):  Likewise.
4021
        (xcoff64_write_object_contents):  Delete unused long_section_names
4022
        local variable.
4023
        * coff-sh.c (bfd_coff_small_swap_table):  Initialise long section
4024
        name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
4025
        struct non-const.
4026
        * coffcode.h (documentation):  Update to describe long section names.
4027
        (COFFLONGSECTIONCATHELPER):  New helper macro.
4028
        (BLANKOR1TOODD):  Likewise.
4029
        (COFF_ENABLE_LONG_SECTION_NAMES):  Likewise.
4030
        (COFF_LONG_SECTION_NAMES_SETTER):  Likewise.
4031
        (COFF_DEFAULT_LONG_SECTION_NAMES):  Likewise.
4032
        (bfd_coff_set_long_section_names_allowed):  New function.
4033
        (bfd_coff_set_long_section_names_disallowed):  Likewise.
4034
        (struct bfd_coff_backend_data):  Add new backend hook function
4035
        pointer _bfd_coff_set_long_section_names.
4036
        (bfd_coff_set_long_section_names):  New backend hook.
4037
        (coff_write_object_contents):  Only generate long section names if
4038
        bfd_coff_long_section_names() indicates they are currently enabled.
4039
        (bfd_coff_std_swap_table):  Make non-const, and initialise long
4040
        section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
4041
        (ticoff0_swap_table):  Likewise to both.
4042
        (ticoff1_swap_table):  Again, likewise to both.
4043
        * coffgen.c (make_a_section_from_file):  Allow long section names
4044
        as inputs even if not currently allowed for outputs.
4045
        * ecoff.c (_bfd_ecoff_no_long_sections):  New function.
4046
        * efi-app-ia32.c (COFF_LONG_SECTION_NAMES):  Define to 0, not blank.
4047
        * efi-app-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4048
        * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4049
        * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES):  Likewise.
4050
        * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4051
        * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4052
        * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES):  Likewise.
4053
        * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4054
        * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4055
        * pei-arm.c (COFF_LONG_SECTION_NAMES):  Likewise.
4056
        * pei-i386.c (COFF_LONG_SECTION_NAMES):  Likewise.
4057
        * pei-mcore.c (COFF_LONG_SECTION_NAMES):  Likewise.
4058
        * pei-mips.c (COFF_LONG_SECTION_NAMES):  Likewise.
4059
        * pei-ppc.c (COFF_LONG_SECTION_NAMES):  Likewise.
4060
        * pei-sh.c (COFF_LONG_SECTION_NAMES):  Likewise.
4061
        * pei-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4062
        * libcoff-in.h:  Update copyright year to cause updated copyright
4063
        year in generated libcoff.h, and fix typo.
4064
        * libcoff.h:  Regenerated.
4065
        * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES):  New macro.
4066
        (_bfd_ecoff_no_long_sections):  Add prototype.
4067
        * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES):  New macro.
4068
        * pe-mips.c (COFF_LONG_SECTION_NAMES):  Define empty if not already
4069
        defined by an including .c file.
4070
        * ticoff.h (ticoff0_swap_table):  Make non-const, and initialise
4071
        long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
4072
        (ticoff1_swap_table):  Likewise to both.
4073
 
4074
2009-02-18  Christophe Lyon  
4075
 
4076
        * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
4077
        stub. Catch default case error.
4078
        (arm_map_one_stub): Add missing Thumb mapping symbol.
4079
 
4080
2009-02-18  Bjoern Haase  
4081
 
4082
        PR 9841
4083
        * elf32-avr.c: Handle case where no local symbos exist correctly.
4084
 
4085
2009-02-16  Christophe Lyon  
4086
 
4087
        bfd/
4088
        * elf32-arm.c (arm_long_branch_stub,
4089
        arm_thumb_v4t_long_branch_stub,
4090
        arm_thumb_thumb_long_branch_stub,
4091
        arm_thumb_arm_v4t_long_branch_stub,
4092
        arm_thumb_arm_v4t_short_branch_stub,
4093
        arm_pic_long_branch_stub):
4094
        Renamed to elf32_arm_stub_long_branch_any_any,
4095
        elf32_arm_stub_long_branch_v4t_arm_thumb,
4096
        elf32_arm_stub_long_branch_thumb_only,
4097
        elf32_arm_stub_long_branch_v4t_thumb_arm,
4098
        elf32_arm_stub_short_branch_v4t_thumb_arm,
4099
        elf32_arm_stub_long_branch_any_any_pic.
4100
        (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
4101
        arm_thumb_thumb_stub_long_branch,
4102
        arm_thumb_arm_v4t_stub_long_branch,
4103
        arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
4104
        Renamed to arm_stub_long_branch_any_any,
4105
        arm_stub_long_branch_v4t_arm_thumb,
4106
        arm_stub_long_branch_thumb_only,
4107
        arm_stub_long_branch_v4t_thumb_arm,
4108
        arm_stub_short_branch_v4t_thumb_arm,
4109
        arm_stub_long_branch_any_any_pic.
4110
 
4111
2009-02-15  John David Anglin  
4112
 
4113
        * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
4114
        in branch offset check.
4115
 
4116
2009-02-15  Alan Modra  
4117
 
4118
        * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
4119
        add toc.symndx and toc.add.
4120
        (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
4121
        Set up toc.add.
4122
        (get_tls_mask): Add toc_addend param, set from toc.add.  Adjust all
4123
        callers.
4124
        (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
4125
        (branch_reloc_hash_match): New function, extracted from..
4126
        (ppc64_elf_tls_optimize): ..here.
4127
        (ppc64_elf_relocate_section): Properly set addends when optimizing
4128
        tls sequences.  Avoid unnecessary reading and writing of insns.
4129
        Only redo reloc when symbol changed.  Bypass symbol checks when
4130
        using tlsld_got.
4131
        * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
4132
        (branch_reloc_hash_match): New function, extracted from..
4133
        (ppc_elf_tls_optimize): ..here.
4134
        (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
4135
        Don't clear addend on zapped __tls_get_addr reloc.
4136
 
4137
2009-02-12  Nick Clifton  
4138
 
4139
        PR 9827
4140
        * elflink.c (bfd_elf_final_link): When counting the relocations,
4141
        if the header size has not been set yet then assume that it will
4142
        match the output section's reloc type.
4143
 
4144
2009-02-12  Nathan Sidwell  
4145
 
4146
        * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
4147
        relocatable link.
4148
 
4149
2009-02-09  Alan Modra  
4150
 
4151
        * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
4152
        (find_function): Likewise.
4153
        (pasted_function): Don't error if no prior function found.
4154
        (discover_functions): Revert 2008-12-10 change.  Extend first
4155
        function range to start of section.
4156
 
4157
2009-02-08  John David Anglin  
4158
 
4159
        * elf64-hppa.c: Remove PARAMS macro.  Replace PTR with void *.  Convert
4160
        functions to C90.
4161
        * elf64-hppa.h: Likewise.
4162
 
4163
2009-02-06  Joseph Myers  
4164
 
4165
        * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
4166
        .sbss handling.
4167
 
4168
2009-02-04  Alan Modra  
4169
 
4170
        * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
4171
        Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
4172
 
4173
2009-02-03  Sandip Matte  
4174
 
4175
        * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
4176
        * archures.c (bfd_mach_mips_xlr): Define.
4177
        * bfd-in2.h: Regenerate.
4178
        * cpu-mips.c (I_xlr): Define.
4179
        (arch_info_struct): Add XLR entry.
4180
        * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
4181
        (mips_set_isa_flags): Handle bfd_mach_mips_xlr
4182
        (mips_mach_extensions): Add XLR entry.
4183
 
4184
2009-02-03  Eric B. Weddington  
4185
 
4186
        * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
4187
 
4188
2009-02-03  Carlos O'Donell  
4189
 
4190
        * configure.in: AC_SUBST pdfdir.
4191
        * Makefile.am: Add install-pdf, install-pdf-am
4192
        and install-pdf-recursive targets. Define pdfdir.
4193
        * doc/Makefile.am: Define pdf__strip_dir. Add
4194
        install-pdf and install-pdf-am targets.
4195
        * po/Make-in: Add install-pdf target.
4196
        * configure: Regenerate.
4197
        * Makefile.in: Regenerate
4198
        * doc/Makefile.in: Regenerate.
4199
 
4200
2009-02-03  Maxim Kuvyrkov  
4201
 
4202
        * bfd-in2.h: Regenerate.
4203
        * elf32-m68k.c: Handle 2-slot GOT entries.  Rename variables and
4204
        fields from n_entries to n_slots where appropriate, update comments.
4205
        (HOWTO): Add TLS relocations.
4206
        (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
4207
        (enum elf_m68k_got_offset_size): New enum.
4208
        (struct elf_m68k_got_entry.type): Move field to ...
4209
        (struct elf_m68k_got_entry_key): ... here.  Update all uses.
4210
        (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
4211
        functions.
4212
        (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
4213
        functions.
4214
        (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
4215
        fields into n_entries array.  Update comments.
4216
        (elf_m68k_init_got): Simplify, update all uses.
4217
        (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
4218
        (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
4219
        GOT entries; update name, update all uses.
4220
        (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
4221
        (elf_m68k_get_got_entry): Update.
4222
        (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
4223
        simplify.
4224
        (elf_m68k_remove_got_entry_type): Simplify.
4225
        (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
4226
        (elf_m68k_can_merge_gots): Update.
4227
        (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
4228
        (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
4229
        GOT entries, simplify.
4230
        (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
4231
        (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
4232
        field, remove obsoleted local_n_entries field.
4233
        (elf_m68k_partition_multi_got_2): New static function.
4234
        (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
4235
        update.
4236
        (elf_m68k_remove_got_entry_type): Update.
4237
        (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
4238
        (elf_m68k_check_relocs): Handle TLS relocations.  Remove unnecessary
4239
        update of sgot->size and srelgot->size.
4240
        (elf_m68k_gc_sweep_hook): Update.
4241
        (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
4242
        (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
4243
        TLS relocations.
4244
        * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
4245
        * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
4246
 
4247
2009-02-02  DJ Delorie  
4248
 
4249
        * elf32-mep.c (config_names): Regenerate configuration.
4250
 
4251
2009-02-02  Alan Modra  
4252
 
4253
        * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
4254
        (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
4255
        * elf.c (bfd_elf_get_str_section): Make static.
4256
        (bfd_elf_find_section): Delete.
4257
        * libbfd.h: Regenerate.
4258
 
4259
2009-02-01  Jan Kratochvil  
4260
 
4261
        * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
4262
        (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
4263
 
4264
2009-01-31  Alan Modra  
4265
 
4266
        * elflink.c (on_needed_list): New function.
4267
        (elf_link_add_object_symbols): Link in --as-needed libs if they
4268
        satisfy undefined symbols in other libs.
4269
 
4270
2009-01-30  Julian Brown  
4271
 
4272
        * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
4273
        EXEC_P or DYNAMIC flags, and skip sections which are being linked
4274
        with --just-symbols (-R).
4275
 
4276
2009-01-29  Adam Nemet  
4277
 
4278
        * dwarf2.c (read_rangelist): Use read_address to read low_pc and
4279
        high_pc in order to properly sign-extend VMAs.
4280
 
4281
2009-01-29  Daniel Jacobowitz  
4282
            Mark Shinwell  
4283
            Catherine Moore  
4284
 
4285
        * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
4286
 
4287
2009-01-28  Catherine Moore 
4288
 
4289
        * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
4290
        SEC_LOAD for dynamic relocation sections.
4291
 
4292
2009-01-27  Hans-Peter Nilsson  
4293
 
4294
        * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
4295
        (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
4296
        the size of local TLS data.
4297
 
4298
2009-01-27  Andreas Schwab  
4299
 
4300
        * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
4301
        architectures in the archive.
4302
 
4303
2009-01-27  Hans-Peter Nilsson  
4304
 
4305
        * elf32-cris.c (cris_elf_relocate_section) 
4306
        : Correct relocation value.
4307
 
4308
        * elf32-cris.c (cris_elf_relocate_section) 
4309
        : Don't call BFD_ASSERT for weak undefined
4310
        symbols with non-default visibility.
4311
 
4312
2009-01-26  Nathan Sidwell  
4313
 
4314
        * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
4315
        describing the trampolines.
4316
        (ppc_elf_relocate_section): Update relocs to describe the
4317
        trampolines.
4318
 
4319
2009-01-25  John David Anglin  
4320
 
4321
        * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
4322
        branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
4323
        and R_PARISC_PCREL12F relocations.
4324
 
4325
2009-01-24  Alan Modra  
4326
 
4327
        PR 6022
4328
        * elflink.c (find_version_for_sym): New function split out from,
4329
        but without export_dynamic test, ..
4330
        (_bfd_elf_link_assign_sym_version): ..here.
4331
        (_bfd_elf_export_symbol): Use it.
4332
 
4333
2009-01-23  Alan Modra  
4334
 
4335
        * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
4336
        (struct elf_info_failed, struct elf_find_verdep_info): Move to..
4337
        * elflink.c: ..here, somewhat modified.
4338
        * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
4339
        _bfd_elf_link_find_version_dependencies,
4340
        _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
4341
        _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
4342
        _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
4343
        declare..
4344
        * elflink.c: ..and make static here.
4345
        (_bfd_elf_link_find_version_dependencies): Adjust for removal
4346
        of output_bfd from struct elf_find_verdep_info.
4347
        (_bfd_elf_link_assign_sym_version): Similarly adjust to use
4348
        struct elf_info_failed.
4349
        (bfd_elf_size_dynamic_sections): Adjust.
4350
 
4351
2009-01-22  Alan Modra  
4352
 
4353
        PR 6832
4354
        * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
4355
        after comp_unit_find_line call.
4356
 
4357
2009-01-21  Nick Clifton  
4358
 
4359
        PR 9769
4360
        * vmsutil.c (vms_file_stats_name): Remove use of unsupported
4361
        tm_gmtoff field in struct tm.
4362
 
4363
2009-01-21  Alan Modra  
4364
 
4365
        * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
4366
        * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
4367
        sections in soft-icache lines unless non_ia_text.  Don't add
4368
        rodata if doing so would exceed line size.
4369
 
4370
2009-01-19  Hans-Peter Nilsson  
4371
 
4372
        * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
4373
        types than bfd_link_hash_indirect, before early return, call
4374
        _bfd_elf_link_hash_copy_indirect.
4375
 
4376
2009-01-19  Andrew Stubbs  
4377
 
4378
        * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
4379
        * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
4380
        * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
4381
        (elf_backend_obj_attrs_order): New define.
4382
        * elfxx-target.h (elf_backend_obj_attrs_order): New define.
4383
        (elfNN_bed): Add elf_backend_obj_attrs_order.
4384
 
4385
2009-01-19  Andrew Stubbs  
4386
 
4387
        * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
4388
        (obj_attr_size): Likewise.
4389
        (write_obj_attribute): Likewise.
4390
        (_bfd_elf_copy_obj_attributes): Likewise.
4391
        (_bfd_elf_parse_attributes): Likewise.
4392
        * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
4393
        (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
4394
        (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
4395
        (ATTR_TYPE_HAS_NO_DEFAULT): New define.
4396
        * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
4397
        with macros.
4398
 
4399
2009-01-19  Andrew Stubbs  
4400
 
4401
        * elf-attrs.c (is_default_attr): Support defaultless attributes.
4402
        (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
4403
        (bfd_elf_add_obj_attr_string): Likewise.
4404
        (bfd_elf_add_obj_attr_int_string): Likewise.
4405
        (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
4406
        * elf-bfd.h (struct obj_attribute): Document new flag bit.
4407
        * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
4408
        Tag_nodefaults has no default value.
4409
        (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
4410
        comment to reflect the new state.
4411
 
4412
2009-01-19  Alan Modra  
4413
 
4414
        PR 9695
4415
        * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
4416
        (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
4417
        (adjust_z_magix): Delete dead code handling QMAGIC.
4418
 
4419
2009-01-16  Kai Tietz  
4420
 
4421
        * coffcode.h (styp_to_sec_flags): Correct interpretation of
4422
        IMAGE_SCN_MEM_DISCARDABLE.
4423
 
4424
2009-01-16  Alan Modra  
4425
 
4426
        * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
4427
        SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
4428
        * configure.in (commonbfdlib): Delete.
4429
        (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
4430
        (SHARED_LIBADD): Rename from WIN32LIBADD.  Add pic libiberty if such
4431
        is available, not just for linux.
4432
        * po/SRC-POTFILES.in: Regenerate.
4433
        * Makefile.in: Regenerate.
4434
        * configure: Regenerate.
4435
 
4436
2009-01-15  Andrew Stubbs  
4437
            Julian Brown   
4438
 
4439
        * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
4440
        ARM attributes in ABI 2.07.
4441
        * elf32-arm.c (get_secondary_compatible_arch): New function.
4442
        (set_secondary_compatible_arch): New function.
4443
        (tag_cpu_arch_combine): New function.
4444
        (elf32_arm_copy_one_eabi_other_attribute): Delete function.
4445
        (elf32_arm_copy_eabi_other_attribute_list): Delete function.
4446
        (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
4447
        make it fit with order_01243.
4448
        Add support for Tag_also_compatible_with,
4449
        Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
4450
        Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
4451
        Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
4452
        Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
4453
        Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
4454
        Tag_VFP_arch and Tag_ABI_FP_16bit_format.
4455
        Rework the way unknown attributes are handled.
4456
        Defer errors until all attributes have been processed.
4457
 
4458
2009-01-15  Andrew Stubbs  
4459
 
4460
        * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
4461
        bfd_elf_add_obj_attr_int_string.
4462
        Read Tag_compatibility from its new location in the attribute array,
4463
        rather than the attribute list.
4464
        (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
4465
        bfd_elf_add_obj_attr_int_string.
4466
        (_bfd_elf_parse_attributes): Likewise.
4467
        (_bfd_elf_merge_object_attributes): There's now only one
4468
        Tag_compatibility, and it's in the array, not the list.
4469
        * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
4470
        Tag_compatibility.
4471
        (bfd_elf_add_obj_attr_compat): Rename to
4472
        bfd_elf_add_obj_attr_int_string.
4473
        (bfd_elf_add_proc_attr_compat): Rename to
4474
        bfd_elf_add_proc_attr_int_string.
4475
        * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
4476
        Tag_compatibility.
4477
 
4478
2009-01-15  Douglas B Rupp  
4479
 
4480
        * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
4481
        (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
4482
        (vmsutil.lo): Add dependency rule.
4483
        * Makefile.in: Regenerate.
4484
        * config.bfd (ia64*-*-*vms*): Add case.
4485
        * configure.in (bfd_elf64_ia64_vms_vec): Add case.
4486
        * configure: Regenerate.
4487
        * vmsutil.c: New file.
4488
        * vmsutil.h: New file.
4489
        * elf-bfd.h (struct bfd_elf_special_section): Change type of
4490
        attr to bfd_vma.
4491
        * elfxx-ia64.c (elfNN_vms_post_process_headers,
4492
        elfNN_vms_section_processing, elfNN_vms_final_write_processing,
4493
        elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
4494
        elfNN_vms_object_p): New functions
4495
        * targets.c (bfd_elf64_ia64_vms_vec): New target.
4496
 
4497
2009-01-14  H.J. Lu  
4498
 
4499
        PR ld/9727
4500
        * elflink.c (elf_gc_sweep): Exclude the group section if the
4501
        first member of the section group is excluded.
4502
 
4503
2009-01-14  Alan Modra  
4504
 
4505
        PR 9735
4506
        * syms.c (_bfd_stab_section_find_nearest_line): Don't free
4507
        saved filename, use bfd_alloc rather than bfd_malloc for it.
4508
 
4509
2009-01-13  Alan Modra  
4510
 
4511
        * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
4512
 
4513
2009-01-13  Alan Modra  
4514
 
4515
        * elf32-spu.c (remove_cycles): Always set call->max_depth.
4516
 
4517
2009-01-12  Alan Modra  
4518
 
4519
        * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
4520
 
4521
2009-01-12  Alan Modra  
4522
 
4523
        * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
4524
        num_lines_log2.
4525
        (struct got_entry): Add br_addr.
4526
        (struct call_info): Add priority.
4527
        (struct function_info): Add lr_store and sp_adjust.
4528
        (spu_elf_setup): Init line_size_log2 and num_lines_log2.
4529
        (spu_elf_find_overlays): For soft-icache, mark any section within cache
4530
        area as an overlay, and check that no other overlays exist.  Look up
4531
        icache overlay manager entry sym.
4532
        (BRA_STUBS, BRA, BRASL): Define.
4533
        (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
4534
        (needs_ovl_stub): Adjust for soft-icache.  Return priority encoded
4535
        in branch insn.
4536
        (count_stub, build_stub): Support soft-icache.
4537
        (build_spuear_stubs, process_stubs): Adjust build_stub call.
4538
        (spu_elf_size_stubs): Size soft-icache stubs.
4539
        (overlay_index): New function.
4540
        (spu_elf_build_stubs): Make static.  Support soft-icache.
4541
        (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
4542
        (find_function_stack_adjust): Save lr store and stack adjust insn
4543
        offsets.
4544
        (maybe_insert_function): Adjust find_function_stack_adjust call.
4545
        (mark_functions_via_relocs): Retrieve priority.
4546
        (remove_cycles): Only warn about pruned arcs when stack_analysis.
4547
        (sort_calls): Sort by priority first.
4548
        (mark_overlay_section): Ignore .ovl.init.
4549
        (sum_stack): Only print when stack_analysis.
4550
        (print_one_overlay_section): New function, extracted from..
4551
        (spu_elf_auto_overlay): ..here.  Support soft-icache overlays.
4552
        (spu_elf_stack_analysis): Only print when htab->stack_analysis.
4553
        (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
4554
        analysis.  Call spu_elf_build_stubs.
4555
        (spu_elf_relocate_section): For soft-icache encode overlay index
4556
        into addresses.
4557
        (spu_elf_output_symbol_hook): Support soft-icache.
4558
        (spu_elf_modify_program_headers: Likewise.
4559
 
4560
        * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis.  Rename
4561
        num_regions to num_lines.  Add line_size and max_branch.
4562
        (enum _ovly_flavour): Add ovly_soft_icache.
4563
        (spu_elf_build_stubs): Delete.
4564
 
4565
2009-01-11  Jan Kratochvil  
4566
 
4567
        * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
4568
        relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
4569
 
4570
2009-01-07  Hans-Peter Nilsson  
4571
 
4572
        * elf32-cris.c (cris_elf_relocate_section) 
4573
        : For a symbol defined in
4574
        the program, the known offset starts at the negative size of the
4575
        TLS section.
4576
        :
4577
        Similar.
4578
 
4579
2009-01-05  Joel Sherrill 
4580
 
4581
        * config.bfd: Add lm32-*-rtems*.
4582
 
4583
2009-01-03  H.J. Lu  
4584
 
4585
        * coff-ppc.c: Add 2009 to Copyright.
4586
        * elf32-cris.c: Likewise.
4587
        * elflink.c: Likewise.
4588
 
4589
2009-01-03  Hans-Peter Nilsson  
4590
 
4591
        * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
4592
        gotplt_index to rela_plt_index.  Adjust for R_CRIS_DTPMOD entry.
4593
 
4594
2009-01-02  H.J. Lu  
4595
 
4596
        PR ld/9679
4597
        * elflink.c (elf_merge_st_other): New.
4598
        (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
4599
        hide them if needed.
4600
        (elf_link_add_object_symbols): Updated.
4601
 
4602
2009-01-02  H.J. Lu  
4603
 
4604
        PR ld/9676
4605
        * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
4606
        ref_dynamic and dynamic_def fields when setting def_regular
4607
        to 1.
4608
 
4609
2009-01-02  Curtis Mackie  
4610
 
4611
        PR 9682
4612
        * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
4613
        literal.
4614
 
4615
For older changes see ChangeLog-2008
4616
 
4617
Local Variables:
4618
mode: change-log
4619
left-margin: 8
4620
fill-column: 74
4621
version-control: never
4622
End:

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.