]> Git Repo - binutils.git/blob - bfd/ChangeLog
PR ld/12815
[binutils.git] / bfd / ChangeLog
1 2011-07-25  Hans-Peter Nilsson  <[email protected]>
2
3         PR ld/12815
4         * elf64-mmix.c (struct _mmix_elf_section_data): New members
5         has_warned_bpo and has_warned_pushj.
6         (mmix_final_link_relocate): Remove PARAMS and PTR macros,
7         converting to ISO C.  Add new parameter error_message.  All
8         callers changed.
9         (mmix_elf_perform_relocation): Ditto.
10         <case R_MMIX_PUSHJ_STUBBABLE, case R_MMIX_BASE_PLUS_OFFSET>:
11         Handle the case where mmix_elf_check_common_relocs has not been
12         called, missing preparations for relocs of the respective type.
13
14 2011-07-24  Chao-ying Fu  <[email protected]>
15             Ilie Garbacea  <[email protected]>
16             Maciej W. Rozycki  <[email protected]>
17             Joseph Myers  <[email protected]>
18             Catherine Moore  <[email protected]>
19             Richard Sandiford  <[email protected]>
20
21         * archures.c (bfd_mach_mips_micromips): New macro.
22         * cpu-mips.c (I_micromips): New enum value.
23         (arch_info_struct): Add bfd_mach_mips_micromips.
24         * elfxx-mips.h (_bfd_mips_elf_is_target_special_symbol): New
25         prototype.
26         (_bfd_mips_elf_relax_section): Likewise.
27         (_bfd_mips16_elf_reloc_unshuffle): Rename to...
28         (_bfd_mips_elf_reloc_unshuffle): ... this.  Handle microMIPS
29         ASE.
30         (_bfd_mips16_elf_reloc_shuffle): Rename to...
31         (_bfd_mips_elf_reloc_shuffle): ... this.  Handle microMIPS ASE.
32         (gprel16_reloc_p): Handle microMIPS ASE.
33         (literal_reloc_p): New function.
34         * elf32-mips.c (elf_micromips_howto_table_rel): New variable.
35         (_bfd_mips_elf32_gprel16_reloc): Handle microMIPS ASE.
36         (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
37         and _bfd_mips_elf_reloc_shuffle changes.
38         (mips_elf_gprel32_reloc): Update comment.
39         (micromips_reloc_map): New variable.
40         (bfd_elf32_bfd_reloc_type_lookup): Handle microMIPS ASE.
41         (mips_elf32_rtype_to_howto): Likewise.
42         (mips_info_to_howto_rel): Likewise.
43         (bfd_elf32_bfd_is_target_special_symbol): Define.
44         (bfd_elf32_bfd_relax_section): Likewise.
45         * elf64-mips.c (micromips_elf64_howto_table_rel): New variable.
46         (micromips_elf64_howto_table_rela): Likewise.
47         (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
48         and _bfd_mips_elf_reloc_shuffle changes.
49         (micromips_reloc_map): Likewise.
50         (bfd_elf64_bfd_reloc_type_lookup): Handle microMIPS ASE.
51         (bfd_elf64_bfd_reloc_name_lookup): Likewise.
52         (mips_elf64_rtype_to_howto): Likewise.
53         (bfd_elf64_bfd_is_target_special_symbol): Define.
54         * elfn32-mips.c (elf_micromips_howto_table_rel): New variable.
55         (elf_micromips_howto_table_rela): Likewise.
56         (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
57         and _bfd_mips_elf_reloc_shuffle changes.
58         (micromips_reloc_map): Likewise.
59         (bfd_elf32_bfd_reloc_type_lookup): Handle microMIPS ASE.
60         (bfd_elf32_bfd_reloc_name_lookup): Likewise.
61         (mips_elf_n32_rtype_to_howto): Likewise.
62         (bfd_elf32_bfd_is_target_special_symbol): Define.
63         * elfxx-mips.c (LA25_LUI_MICROMIPS_1): New macro.
64         (LA25_LUI_MICROMIPS_2): Likewise.
65         (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise.
66         (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise.
67         (TLS_RELOC_P): Handle microMIPS ASE.
68         (mips_elf_create_stub_symbol): Adjust value of stub symbol if
69         target is a microMIPS function.
70         (micromips_reloc_p): New function.
71         (micromips_reloc_shuffle_p): Likewise.
72         (got16_reloc_p, call16_reloc_p): Handle microMIPS ASE.
73         (got_disp_reloc_p, got_page_reloc_p): New functions.
74         (got_ofst_reloc_p): Likewise.
75         (got_hi16_reloc_p, got_lo16_reloc_p): Likewise.
76         (call_hi16_reloc_p, call_lo16_reloc_p): Likewise.
77         (hi16_reloc_p, lo16_reloc_p, jal_reloc_p): Handle microMIPS ASE.
78         (micromips_branch_reloc_p): New function.
79         (tls_gd_reloc_p, tls_ldm_reloc_p): Likewise.
80         (tls_gottprel_reloc_p): Likewise.
81         (_bfd_mips16_elf_reloc_unshuffle): Rename to...
82         (_bfd_mips_elf_reloc_unshuffle): ... this.  Handle microMIPS
83         ASE.
84         (_bfd_mips16_elf_reloc_shuffle): Rename to...
85         (_bfd_mips_elf_reloc_shuffle): ... this.  Handle microMIPS ASE.
86         (_bfd_mips_elf_lo16_reloc): Handle microMIPS ASE.
87         (mips_tls_got_index, mips_elf_got_page): Likewise.
88         (mips_elf_create_local_got_entry): Likewise.
89         (mips_elf_relocation_needs_la25_stub): Likewise.
90         (mips_elf_calculate_relocation): Likewise.
91         (mips_elf_perform_relocation): Likewise.
92         (_bfd_mips_elf_symbol_processing): Likewise.
93         (_bfd_mips_elf_add_symbol_hook): Likewise.
94         (_bfd_mips_elf_link_output_symbol_hook): Likewise.
95         (mips_elf_add_lo16_rel_addend): Likewise.
96         (_bfd_mips_elf_check_relocs): Likewise.
97         (mips_elf_adjust_addend): Likewise.
98         (_bfd_mips_elf_relocate_section): Likewise.
99         (mips_elf_create_la25_stub): Likewise.
100         (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
101         (_bfd_mips_elf_gc_sweep_hook): Likewise.
102         (_bfd_mips_elf_is_target_special_symbol): New function.
103         (mips_elf_relax_delete_bytes): Likewise.
104         (opcode_descriptor): New structure.
105         (RA): New macro.
106         (OP32_SREG, OP32_TREG, OP16_VALID_REG): Likewise.
107         (b_insns_32, bc_insn_32, bz_insn_32, bzal_insn_32): New variables.
108         (beq_insn_32): Likewise.
109         (b_insn_16, bz_insn_16): New variables.
110         (BZC32_REG_FIELD): New macro.
111         (bz_rs_insns_32, bz_rt_insns_32): New variables.
112         (bzc_insns_32, bz_insns_16):Likewise.
113         (BZ16_REG, BZ16_REG_FIELD): New macros.
114         (jal_insn_32_bd16, jal_insn_32_bd32): New variables.
115         (jal_x_insn_32_bd32): Likewise.
116         (j_insn_32, jalr_insn_32): Likewise.
117         (ds_insns_32_bd16, ds_insns_32_bd32): Likewise.
118         (jalr_insn_16_bd16, jalr_insn_16_bd32, jr_insn_16): Likewise.
119         (JR16_REG): New macro.
120         (ds_insns_16_bd16): New variable.
121         (lui_insn): Likewise.
122         (addiu_insn, addiupc_insn): Likewise.
123         (ADDIUPC_REG_FIELD): New macro.
124         (MOVE32_RD, MOVE32_RS): Likewise.
125         (MOVE16_RD_FIELD, MOVE16_RS_FIELD): Likewise.
126         (move_insns_32, move_insns_16): New variables.
127         (nop_insn_32, nop_insn_16): Likewise.
128         (MATCH): New macro.
129         (find_match): New function.
130         (check_br16_dslot, check_br32_dslot): Likewise.
131         (check_br16, check_br32): Likewise.
132         (IS_BITSIZE): New macro.
133         (check_4byte_branch): New function.
134         (_bfd_mips_elf_relax_section): Likewise.
135         (_bfd_mips_elf_merge_private_bfd_data): Disallow linking MIPS16
136         and microMIPS modules together.
137         (_bfd_mips_elf_print_private_bfd_data): Handle microMIPS ASE.
138         * reloc.c (BFD_RELOC_MICROMIPS_7_PCREL_S1): New relocation.
139         (BFD_RELOC_MICROMIPS_10_PCREL_S1): Likewise.
140         (BFD_RELOC_MICROMIPS_16_PCREL_S1): Likewise.
141         (BFD_RELOC_MICROMIPS_GPREL16): Likewise.
142         (BFD_RELOC_MICROMIPS_JMP, BFD_RELOC_MICROMIPS_HI16): Likewise.
143         (BFD_RELOC_MICROMIPS_HI16_S): Likewise.
144         (BFD_RELOC_MICROMIPS_LO16): Likewise.
145         (BFD_RELOC_MICROMIPS_LITERAL): Likewise.
146         (BFD_RELOC_MICROMIPS_GOT16): Likewise.
147         (BFD_RELOC_MICROMIPS_CALL16): Likewise.
148         (BFD_RELOC_MICROMIPS_GOT_HI16): Likewise.
149         (BFD_RELOC_MICROMIPS_GOT_LO16): Likewise.
150         (BFD_RELOC_MICROMIPS_CALL_HI16): Likewise.
151         (BFD_RELOC_MICROMIPS_CALL_LO16): Likewise.
152         (BFD_RELOC_MICROMIPS_SUB): Likewise.
153         (BFD_RELOC_MICROMIPS_GOT_PAGE): Likewise.
154         (BFD_RELOC_MICROMIPS_GOT_OFST): Likewise.
155         (BFD_RELOC_MICROMIPS_GOT_DISP): Likewise.
156         (BFD_RELOC_MICROMIPS_HIGHEST): Likewise.
157         (BFD_RELOC_MICROMIPS_HIGHER): Likewise.
158         (BFD_RELOC_MICROMIPS_SCN_DISP): Likewise.
159         (BFD_RELOC_MICROMIPS_JALR): Likewise.
160         (BFD_RELOC_MICROMIPS_TLS_GD): Likewise.
161         (BFD_RELOC_MICROMIPS_TLS_LDM): Likewise.
162         (BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16): Likewise.
163         (BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16): Likewise.
164         (BFD_RELOC_MICROMIPS_TLS_GOTTPREL): Likewise.
165         (BFD_RELOC_MICROMIPS_TLS_TPREL_HI16): Likewise.
166         (BFD_RELOC_MICROMIPS_TLS_TPREL_LO16): Likewise.
167         * bfd-in2.h: Regenerate.
168         * libbfd.h: Regenerate.
169
170 2011-07-22  H.J. Lu  <[email protected]>
171
172         * Makefile.am (ALL_MACHINES): Add cpu-k1om.lo.
173         (ALL_MACHINES_CFILES): Add cpu-k1om.c.
174         * Makefile.in: Regenerated.
175
176         * archures.c (bfd_architecture): Add bfd_arch_k1om.
177         (bfd_k1om_arch): New.
178         (bfd_archures_list): Add &bfd_k1om_arch.
179         * bfd-in2.h: Regenerated.
180
181         * config.bfd (targ64_selvecs): Add bfd_elf64_k1om_vec if
182         bfd_elf64_x86_64_vec is supported.  Add bfd_elf64_k1om_freebsd_vec
183         if bfd_elf64_x86_64_freebsd_vec is supported.
184         (targ_selvecs): Likewise.
185
186         * configure.in: Support bfd_elf64_k1om_vec and
187         bfd_elf64_k1om_freebsd_vec.
188         * configure: Regenerated.
189
190         * cpu-k1om.c: New.
191
192         * elf64-x86-64.c (elf64_k1om_elf_object_p): New.
193         (bfd_elf64_k1om_vec): Likewise.
194         (bfd_elf64_k1om_freebsd_vec): Likewise.
195
196         * targets.c (bfd_elf64_k1om_vec): New.
197         (bfd_elf64_k1om_freebsd_vec): Likewise.
198         (_bfd_target_vector): Add bfd_elf64_k1om_vec and
199         bfd_elf64_k1om_freebsd_vec.
200
201 2011-07-20  Jan Kratochvil  <[email protected]>
202
203         Fix false coff-go32-exe matches.
204         * coff-i386.c (TARGET_SYM) <_bfd_check_format>: Conditionally use
205         COFF_CHECK_FORMAT.
206         * coff-stgo32.c (go32_check_format): New forward declaration.
207         (COFF_CHECK_FORMAT): New defintion.
208         (go32_check_format): New function.
209
210 2011-07-15  Alan Modra  <[email protected]>
211
212         * configure.in: Bump version.
213         * configure: Regenerate.
214
215 2011-07-14  Alan Modra  <[email protected]>
216
217         * linker.c (_bfd_generic_section_already_linked): Set l_flags.
218         * elf-bfd.h (struct already_linked): Forward declare.
219
220 2011-07-14  Alan Modra  <[email protected]>
221
222         * elflink.c (_bfd_elf_fix_symbol_flags): Loop on indirect syms.
223         (_bfd_elf_adjust_dynamic_symbol): Remove FIXME.
224
225 2011-07-14  Alan Modra  <[email protected]>
226
227         * elf64-ppc.c (struct ppc_link_hash_table): Add plt_static_chain.
228         (build_plt_stub): Add plt_static_chain param, don't load r11 if false.
229         (build_tls_get_addr_stub): Likewise.
230         (ppc_build_one_stub): Update calls to above.
231         (ppc_size_one_stub): Adjust stub size.
232         (ppc64_elf_size_stubs): Add plt_static_chain param, save to htab.
233         * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
234
235 2011-07-12  Nick Clifton  <[email protected]>
236
237         * elf32-arm.c (elf32_arm_section_flags): Delete.
238         (elf_backend_section_flags): Remove.
239
240 2011-07-11  H.J. Lu  <[email protected]>
241
242         PR ld/12982
243         * elflink.c (bfd_elf_size_dynamic_sections): Also skip BFD_PLUGIN
244         when setting stack_flags.
245
246 2011-07-11  Catherine Moore  <[email protected]>
247
248         * aout-adobe.c (aout_32_bfd_lookup_section_flags): New definition.
249         * aout-target.h (MY_bfd_lookup_section_flags): New definition.
250         * aout-tic30.c (MY_bfd_lookup_section_flags): New definition.
251         * bfd-in2.h: Regenerated.
252         * bfd.c (bfd_lookup_section_flags): New definition.
253         * binary.c (binary_bfd_lookup_section_flags): New definition.
254         * bout.c (b_out_bfd_lookup_section_flags): New definition.
255         * coff-alpha.c (_bfd_ecoff_bfd_lookup_section_flags): New definition.
256         * coff-mips.c (_bfd_ecoff_bfd_lookup_section_flags): New definition.
257         * coff-rs6000.c (rs6000coff_vec): Include
258         bfd_generic_lookup_section_flags.
259         (pmac_xcoff_vec): Likewise.
260         * coffcode.h (coff_bfd_lookup_section_flags): New definition.
261         * coff64-rs6000.c (rs6000coff64_vec): Include
262         bfd_generic_lookup_section_flags.
263         (aix5coff64_vec): Likewise.
264         * ecoff.c (bfd_debug_section): Initialize flag_info field.
265         * elf-bfd.h (elf_backend_lookup_section_flags_hook): Declare.
266         (bfd_elf_lookup_section_flags): Declare.
267         * elflink.c (bfd_elf_lookup_section_flags): New function.
268         * elfxx-target.h (bfd_elfNN_bfd_lookup_section_flags): Define.
269         (elf_backend_lookup_section_flags_hook): Define.
270         (elf_backend_data): Add elf_backend_lookup_section_flags_hook.
271         * i386msdos.c (msdos_bfd_lookup_section_flags): New define.
272         * i386os9k.c (os9k_bfd_lookup_section_flags): New define.
273         * ieee.c (ieee_bfd_lookup_section_flags): New define.
274         * ihex.c (ihex_bfd_lookup_section_flags): New define.
275         * libbfd-in.h (_bfd_nolink_bfd_lookup_section_flags): Declare.
276         (bfd_generic_lookup_section_flags): Declare.
277         * libbfd.h: Regenerated.
278         * mach-o-target.c (bfd_mach_o_bfd_lookup_section_flags): New.
279         * mmo.c (mmo_bfd_lookup_section_flags): New definition.
280         * nlm-target.h (nlm_bfd_lookup_section_flags): New definition.
281         * oasys.c (oasys_bfd_lookup_section_flags): New definition.
282         * pef.c (bfd_pef_bfd_lookup_section_flags): New definition.
283         * plugin.c (bfd_plugin_bfd_lookup_section_flags): New definition.
284         * ppcboot.c (ppcboot_bfd_lookup_section_flags): New definition.
285         * reloc.c (bfd_generic_lookup_section_flags): New function.
286         * som.c (som_bfd_lookup_section_flags): New definition.
287         * srec.c (srec_bfd_lookup_section_flags): New definition.
288         * targets.c (flag_info): Declare.
289         (NAME##_bfd_lookup_section_flags): Add to LINK jump table.
290         (_bfd_lookup_section_flags): New.
291         * tekhex.c (tekhex_bfd_lookup_section_flags): New definition.
292         * versados.c (versados_bfd_lookup_section_flags): New definition.
293         * vms-alpha.c (alpha_vms_bfd_lookup_section_flag): New definition.
294         * xsym.c (bfd_sym_bfd_lookup_section_flags): New definition.
295
296 2011-07-11  H.J. Lu  <[email protected]>
297
298         PR ld/12978
299         * elfnn-ia64.c (count_dyn_reloc): Fix a typo.
300
301 2011-07-09  Alan Modra  <[email protected]>
302
303         PR ld/12942
304         * elflink.c (elf_link_add_object_symbols): Use elf_discarded_section
305         rather than kept_section to determine whether a symbol is from
306         a discarded section.
307         * cofflink.c (coff_link_add_symbols): Make symbols from discarded
308         sections appear undefined.
309
310 2011-07-09  H.J. Lu  <[email protected]>
311
312         PR ld/12942
313         * elf-bfd.h (_bfd_elf_section_already_linked): Replace
314         "asection *" with "struct already_linked *".
315         * libbfd-in.h (_bfd_nolink_section_already_linked): Likewise.
316         (_bfd_generic_section_already_linked): Likewise.
317         (bfd_section_already_linked_table_insert): Likewise.
318         (struct already_linked): New.
319         (struct bfd_section_already_linked): Use it.
320         * elflink.c (_bfd_elf_section_already_linked): Replace.
321         "asection *" with "struct already_linked *".  Replace the plugin
322         dummy with the LTO output.
323         * linker.c (_bfd_generic_section_already_linked): Likewise.
324         * targets.c (struct already_linked): Add forward declaration.
325         (bfd_target): Replace "struct bfd_section *" with
326         "struct already_linked *" in _section_already_linked.
327         * bfd-in2.h: Regenerate.
328         * libbfd.h: Regenerate.
329
330 2011-07-06  Tristan Gingold  <[email protected]>
331
332         * mach-o.h: Move loader related definitions to
333         include/mach-o/loader.h.  Include it.
334
335 2011-07-05  H.J. Lu  <[email protected]>
336
337         * elf64-x86-64.c (elf_backend_post_process_headers): Always
338         define to _bfd_elf_set_osabi.
339
340 2011-07-03  Samuel Thibault  <[email protected]>
341             Thomas Schwinge  <[email protected]>
342
343         PR binutils/12913
344         * elf.c (_bfd_elf_set_osabi): Use ELFOSABI_GNU name instead of
345         ELFOSABI_LINUX alias.
346         * elf32-hppa.c: Likewise.
347         * elf32-i370.c: Likewise.
348         * elf64-hppa.c: Likewise.
349
350 2011-07-01  Ian Lance Taylor  <[email protected]>
351
352         * elf32-i386.c (elf_i386_eh_frame_plt): Correct expression: change
353         DW_OP_lit3 to DW_OP_lit2.
354
355 2011-07-01  Alan Modra  <[email protected]>
356
357         * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't look at
358         dyn relocs when called to copy flags for a weak sym.
359         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
360         (ppc64_elf_merge_private_bfd_data): Delete.
361         (bfd_elf64_bfd_merge_private_bfd_data): Define as
362         _bfd_generic_verify_endian_match.
363
364 2011-06-30  Bernd Schmidt  <[email protected]>
365
366         * bfd/elf32-tic6x.c (elf32_tic6x_set_osabi): Also set it if
367         link_info is NULL.
368
369 2011-06-28  Tristan Gingold  <[email protected]>
370
371         * vms-alpha.c (vms_private_data_struct): Make vms_linkage_index
372         unsigned int.
373         (_bfd_vms_write_etir): Write linkage index from reloc.
374
375 2011-06-28  Fawzi Mohamed <[email protected]>
376
377         * mach-o.c (bfd_mach_o_read_command): Also ignore
378         BFD_MACH_O_LC_ROUTINES_64.
379
380 2011-06-27  Tristan Gingold  <[email protected]>
381
382         * vms-alpha.c (_bfd_vms_write_etir): Use 'section' to get current
383         section target index.
384
385 2011-06-27  Nick Clifton  <[email protected]>
386
387         * cisco-core.c (cisco_core_little_vec): Add initialization of
388         match_priority field.
389
390 2011-06-27  Tristan Gingold  <[email protected]>
391
392         * cache.c: Include bfd_stdint.h.
393         (cache_bmmap): Change profile.  Return region start and size.
394         * bfdio.c (struct bfd_iovec): Change bmmap profile.
395         (bfd_mmap): Change profile and adjust.   Update comment.
396         (memory_bmmap): Change profile.
397         * opncls.c (opncls_bmmap): Change profile.
398         * vms-lib.c (vms_lib_bmmap): Likewise.
399         * libbfd.h: Regenerate.
400         * bfd-in2.h: Regenerate.
401
402 2011-06-27  Tristan Gingold  <[email protected]>
403
404         * vms-misc.c (vms_time_to_time_t): Adjust overflow detection.
405         Add comment.
406
407 2011-06-25  H.J. Lu  <[email protected]>
408
409         * elf64-x86-64.c (elf_backend_post_process_headers): Don't
410         define for FreeBSD/x86-64 nor FreeBSD/L1OM.  Define for L1OM.
411
412 2011-06-25  Jan Kratochvil  <[email protected]>
413
414         * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Initialize
415         PLT_EH_FRAME.
416         * elf32-i386.c (elf_i386_link_hash_table): Likewise.
417
418 2011-06-24  Richard Henderson  <[email protected]>
419
420         PR ld/12928
421         * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Recover the
422         tlsgd insn before swapping adjacent insns.
423
424 2011-06-24  Tristan Gingold  <[email protected]>
425
426         * vms-alpha.c (alpha_vms_slurp_relocs): Add a guard for relocs in the
427         absolute section.
428
429 2011-06-24  Alan Modra  <[email protected]>
430
431         PR ld/12921
432         * elf.c (assign_file_positions_for_load_sections): Don't align
433         sh_offset for all SHT_NOBITS sections here, just .tbss sections
434         that don't get a PT_LOAD.
435
436 2011-06-22  Kaz Kojima  <[email protected]>
437
438         * elf32-sh.c (sh_elf_relocate_section): Allow R_SH_TLS_LE_32 for PIE.
439         (sh_elf_check_relocs): Likewise.
440
441 2011-06-22  Richard Henderson  <[email protected]>
442
443         * elf64-alpha.c (elf64_alpha_check_relocs): No dynamic reloc for
444         TPREL in a PIE image.
445         (alpha_dynamic_entries_for_reloc): Likewise.
446         (elf64_alpha_relocate_section): Allow TPREL in PIE images.
447         (elf64_alpha_relax_got_load): Likewise.
448
449 2011-06-22  Ramana Radhakrishnan  <[email protected]>
450
451         * elf32-arm.c (elf32_arm_final_link_relocate): Allow R_ARM_TLS_LE32
452         for PIE.
453
454 2011-06-22  Alan Modra  <[email protected]>
455
456         * elflink.c (_bfd_elf_merge_symbol): Allow type changes for
457         plugin symbols.  Fix segfault on linker scrip defined syms.
458
459 2011-06-20  Jakub Jelinek  <[email protected]>
460
461         PR ld/12570
462         * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Allow no relocations
463         at all for linker created .eh_frame sections.
464         (_bfd_elf_discard_section_eh_frame): Handle linker created
465         .eh_frame sections with no relocations.
466         * elf64-x86-64.c: Include dwarf2.h.
467         (elf_x86_64_eh_frame_plt): New variable.
468         (PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
469         PLT_FDE_LEN_OFFSET): Define.
470         (struct elf_x86_64_link_hash_table): Add plt_eh_frame field.
471         (elf_x86_64_create_dynamic_sections): Create and fill in
472         .eh_frame section for .plt section.
473         (elf_x86_64_size_dynamic_sections): Write .plt section size
474         into .eh_frame FDE covering .plt section.
475         (elf_x86_64_finish_dynamic_sections): Write .plt section
476         start into .eh_frame FDE covering .plt section.  Call
477         _bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
478         (elf_backend_plt_alignment): Define to 4.
479         * elf32-i386.c: Include dwarf2.h.
480         (elf_i386_eh_frame_plt): New variable.
481         (PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
482         PLT_FDE_LEN_OFFSET): Define.
483         (struct elf_i386_link_hash_table): Add plt_eh_frame field.
484         (elf_i386_create_dynamic_sections): Create and fill in
485         .eh_frame section for .plt section.
486         (elf_i386_size_dynamic_sections): Write .plt section size
487         into .eh_frame FDE covering .plt section.
488         (elf_i386_finish_dynamic_sections): Write .plt section
489         start into .eh_frame FDE covering .plt section.  Call
490         _bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
491         (elf_backend_plt_alignment): Define to 4.
492
493 2011-06-19  H.J. Lu  <[email protected]>
494
495         * elf64-x86-64.c (elf_backend_post_process_headers): Defined
496         for x32.
497
498 2011-06-16  H.J. Lu  <[email protected]>
499
500         * elf64-x86-64.c: Include <stdarg.h> and CORE_HEADER if
501         CORE_HEADER is defined.
502         (elf_x86_64_write_core_note): New.
503         (elf_backend_write_core_note): Likewise.
504
505         * hosts/x86-64linux.h (uint64_t): New.
506         (user_regsx32_struct): Likewise.
507         (elf_gregx32_t): Likewise.
508         (ELF_NGREGX32): Likewise.
509         (elf_gregsetx32_t): Likewise.
510         (elf_prstatusx32): Likewise.
511         (prstatusx32_t): Likewise.
512         (user_fpregs32_struct): Removed.
513         (user_fpxregs32_struct): Likewise.
514         (user32): Likewise.
515         (elf_fpregset32_t): Likewise.
516         (elf_fpxregset32_t): Likewise.
517         (prgregset32_t): Likewise.
518         (prfpregset32_t): Likewise.
519
520 2011-06-16  H.J. Lu  <[email protected]>
521
522         * elf64-x86-64.c (elf_x86_64_grok_prstatus): Support x32.
523         (elf_x86_64_grok_psinfo): Likewise.
524
525 2011-06-16  Nick Clifton  <[email protected]>
526
527         * elf.c (elf_find_function): Fail if not provided with a symbol
528         table.
529
530 2011-06-15  Ulrich Weigand  <[email protected]>
531
532         * elf-bfd.h (elfcore_write_arm_vfp): Add prototype.
533         * elf.c (elfcore_grok_arm_vfp): New function.
534         (elfcore_grok_note): Call it to handle NT_ARM_VFP notes.
535         (elfcore_write_arm_vfp): New function.
536         (elfcore_write_register_note): Call it to handle .reg-arm-vfp.
537
538 2011-06-14  Richard Henderson  <[email protected]>
539
540         * elf64-alpha.c (elf64_alpha_copy_indirect_symbol): Rename from
541         elf64_alpha_merge_ind_symbols; adjust for the generic interface.
542         (elf64_alpha_always_size_sections): Don't call
543         elf64_alpha_merge_ind_symbols.
544         (elf_backend_copy_indirect_symbol): New.
545
546 2011-06-14  Alan Modra  <[email protected]>
547
548         PR ld/12887
549         * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Check sec_info_type
550         before doing anything.
551         (_bfd_elf_discard_section_eh_frame): Likewise.
552
553 2011-06-14  Alan Modra  <[email protected]>
554
555         * Makefile.am: Formatting.
556         * Makefile.in: Regenerate.
557         * configure.in (bfd_elf64_tilegx_vec): Add elfxx-tilegx.lo.
558         * po/SRC-POTFILES.in: Regnerate.
559
560 2011-06-14  Alan Modra  <[email protected]>
561
562         * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Don't use PTR.
563         (allocate_dynrelocs, readonly_dynrelocs): Replace PTR with void *.
564         Don't handle warning symbols here.
565         * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): As above.
566         (allocate_dynrelocs, readonly_dynrelocs): As above.
567
568 2011-06-14  Alan Modra  <[email protected]>
569
570         PR ld/12851
571         * elflink.c (_bfd_elf_gc_mark_extra_sections): New function.
572         (elf_gc_sweep): Don't treat debug and sections like .comment
573         specially here.
574         (bfd_elf_gc_sections): Treat note sections as gc roots only when
575         not part of a group.  Always call gc_mark_extra_sections.
576         * elf-bfd.h (_bfd_elf_gc_mark_extra_sections): Declare.
577         * elfxx-target.h (elf_backend_gc_mark_extra_sections): Default to
578         _bfd_elf_gc_mark_extra_sections.
579         * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Call
580         _bfd_elf_gc_mark_extra_sections.
581         * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): Likewise.
582
583 2011-06-13  Nick Clifton  <[email protected]>
584
585         * elf32-tilepro.c (tilepro_elf_check_relocs): Delete unused local
586         variable 'local_got_offsets'.
587         * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
588         (tilegx_finish_dyn): Delete unused local variable 'abi_64_p'.
589
590 2011-06-13  Walter Lee  <[email protected]>
591
592         * Makefile.am (ALL_MACHINES): Add cpu-tilegx.lo and cpu-tilepro.lo.
593         (ALL_MACHINE_CFILES): Add cpu-tilegx.c and cpu-tilepro.c.
594         (BFD32_BACKENDS): Add elf32-tilegx.lo, elf32-tilepro.lo,
595         and elfxx-tilegx.lo.
596         (BFD32_BACKENDS_CFILES): Add elf32-tilegx.c elf32-tilepro.c, and
597         elfxx-tilegx.c.
598         (BFD64_BACKENDS): Add elf64-tilegx.lo.
599         (BFD64_BACKENDS_CFILES): Add elf64-tilegx.c.
600         * Makefile.in: Regenerate.
601         * arctures.c (bfd_architecture): Define bfd_arch_tilepro,
602         bfd_arch_tilegx, bfd_mach_tilepro, bfd_mach_tilegx.
603         (bfd_arch_info): Add bfd_tilegx_arch, bfd_tilepro_arch.
604         (bfd_archures_list): Add bfd_tilegx_arch, bfd_tilepro_arch.
605         bfd-in2.h: Regenerate.
606         * config.bfd: Handle tilegx-*-* and tilepro-*-*.
607         * configure.in: Handle bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
608         and bfd_elf64_tilegx_vec.
609         * configure: Regenerate.
610         * elf-bfd.h (enum elf_target_id): Define TILEGX_ELF_DATA and
611         TILEPRO_ELF_DATA.
612         * libbfd.h: Regenerate.
613         * reloc.c: Add BFD_RELOC_TILEPRO_{COPY, GLOB_DAT, JMP_SLOT,
614         RELATIVE, BROFF_X1, JOFFLONG_X1, JOFFLONG_X1_PLT, IMM8_X0,
615         IMM8_Y0, IMM8_X1, IMM8_Y1, DEST_IMM8_X1, MT_IMM15_X1, MF_IMM15_X1,
616         IMM16_X0, IMM16_X1, IMM16_X0_LO, IMM16_X1_LO, IMM16_X0_HI,
617         IMM16_X1_HI, IMM16_X0_HA, IMM16_X1_HA, IMM16_X0_PCREL,
618         IMM16_X1_PCREL, IMM16_X0_LO_PCREL, IMM16_X1_LO_PCREL,
619         IMM16_X0_HI_PCREL, IMM16_X1_HI_PCREL, IMM16_X0_HA_PCREL,
620         IMM16_X1_HA_PCREL, IMM16_X0_GOT, IMM16_X1_GOT, IMM16_X0_GOT_LO,
621         IMM16_X1_GOT_LO, IMM16_X0_GOT_HI, IMM16_X1_GOT_HI,
622         IMM16_X0_GOT_HA, IMM16_X1_GOT_HA, MMSTART_X0, MMEND_X0,
623         MMSTART_X1, MMEND_X1, SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1,
624         IMM16_X0_TLS_GD, IMM16_X1_TLS_GD, IMM16_X0_TLS_GD_LO,
625         IMM16_X1_TLS_GD_LO, IMM16_X0_TLS_GD_HI, IMM16_X1_TLS_GD_HI,
626         IMM16_X0_TLS_GD_HA, IMM16_X1_TLS_GD_HA, IMM16_X0_TLS_IE,
627         IMM16_X1_TLS_IE, IMM16_X0_TLS_IE_LO, IMM16_X1_TLS_IE_LO,
628         IMM16_X0_TLS_IE_HI, IMM16_X1_TLS_IE_HI, IMM16_X0_TLS_IE_HA,
629         IMM16_X1_TLS_IE_HA, TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
630         Add BFD_RELOC_TILEGX_{HW0, HW1, HW2, HW3, HW0_LAST, HW1_LAST,
631         HW2_LAST, COPY, GLOB_DAT, JMP_SLOT, RELATIVE, BROFF_X1,
632         JUMPOFF_X1, JUMPOFF_X1_PLT, IMM8_X0, IMM8_Y0, IMM8_X1, IMM8_Y1,
633         DEST_IMM8_X1, MT_IMM14_X1, MF_IMM14_X1, MMSTART_X0, MMEND_X0,
634         SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1, IMM16_X0_HW0,
635         IMM16_X1_HW0, IMM16_X0_HW1, IMM16_X1_HW1, IMM16_X0_HW2,
636         IMM16_X1_HW2, IMM16_X0_HW3, IMM16_X1_HW3, IMM16_X0_HW0_LAST,
637         IMM16_X1_HW0_LAST, IMM16_X0_HW1_LAST, IMM16_X1_HW1_LAST,
638         IMM16_X0_HW2_LAST, IMM16_X1_HW2_LAST, IMM16_X0_HW0_PCREL,
639         IMM16_X1_HW0_PCREL, IMM16_X0_HW1_PCREL, IMM16_X1_HW1_PCREL,
640         IMM16_X0_HW2_PCREL, IMM16_X1_HW2_PCREL, IMM16_X0_HW3_PCREL,
641         IMM16_X1_HW3_PCREL, IMM16_X0_HW0_LAST_PCREL,
642         IMM16_X1_HW0_LAST_PCREL, IMM16_X0_HW1_LAST_PCREL,
643         IMM16_X1_HW1_LAST_PCREL, IMM16_X0_HW2_LAST_PCREL,
644         IMM16_X1_HW2_LAST_PCREL, IMM16_X0_HW0_GOT, IMM16_X1_HW0_GOT,
645         IMM16_X0_HW1_GOT, IMM16_X1_HW1_GOT, IMM16_X0_HW2_GOT,
646         IMM16_X1_HW2_GOT, IMM16_X0_HW3_GOT, IMM16_X1_HW3_GOT,
647         IMM16_X0_HW0_LAST_GOT, IMM16_X1_HW0_LAST_GOT,
648         IMM16_X0_HW1_LAST_GOT, IMM16_X1_HW1_LAST_GOT,
649         IMM16_X0_HW2_LAST_GOT, IMM16_X1_HW2_LAST_GOT, IMM16_X0_HW0_TLS_GD,
650         IMM16_X1_HW0_TLS_GD, IMM16_X0_HW1_TLS_GD, IMM16_X1_HW1_TLS_GD,
651         IMM16_X0_HW2_TLS_GD, IMM16_X1_HW2_TLS_GD, IMM16_X0_HW3_TLS_GD,
652         IMM16_X1_HW3_TLS_GD, IMM16_X0_HW0_LAST_TLS_GD,
653         IMM16_X1_HW0_LAST_TLS_GD, IMM16_X0_HW1_LAST_TLS_GD,
654         IMM16_X1_HW1_LAST_TLS_GD, IMM16_X0_HW2_LAST_TLS_GD,
655         IMM16_X1_HW2_LAST_TLS_GD, IMM16_X0_HW0_TLS_IE,
656         IMM16_X1_HW0_TLS_IE, IMM16_X0_HW1_TLS_IE, IMM16_X1_HW1_TLS_IE,
657         IMM16_X0_HW2_TLS_IE, IMM16_X1_HW2_TLS_IE, IMM16_X0_HW3_TLS_IE,
658         IMM16_X1_HW3_TLS_IE, IMM16_X0_HW0_LAST_TLS_IE,
659         IMM16_X1_HW0_LAST_TLS_IE, IMM16_X0_HW1_LAST_TLS_IE,
660         IMM16_X1_HW1_LAST_TLS_IE, IMM16_X0_HW2_LAST_TLS_IE,
661         IMM16_X1_HW2_LAST_TLS_IE, TLS_DTPMOD64, TLS_DTPOFF64, TLS_TPOFF64,
662         TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
663         * targets.c (bfd_elf32_tilegx_vec): Declare.
664         (bfd_elf32_tilepro_vec): Declare.
665         (bfd_elf64_tilegx_vec): Declare.
666         (bfd_target_vector): Add bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
667         and bfd_elf64_tilegx_vec.
668         * cpu-tilegx.c: New file.
669         * cpu-tilepro.c: New file.
670         * elf32-tilepro.h: New file.
671         * elf32-tilepro.c: New file.
672         * elf32-tilegx.c: New file.
673         * elf32-tilegx.h: New file.
674         * elf64-tilegx.c: New file.
675         * elf64-tilegx.h: New file.
676         * elfxx-tilegx.c: New file.
677         * elfxx-tilegx.h: New file.
678
679 2011-06-13  Alan Modra  <[email protected]>
680
681         * linker.c (bfd_link_hash_traverse): Follow warning symbol link.
682         (_bfd_generic_link_write_global_symbol, fix_syms): Don't handle
683         warning symbols here.
684         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
685         * elf32-arm.c (allocate_dynrelocs_for_symbol,
686         elf32_arm_readonly_dynrelocs): Likewise.
687         * elf32-bfin.c (bfin_discard_copies): Likewise.
688         * elf32-cris.c (elf_cris_adjust_gotplt_to_got,
689         elf_cris_discard_excess_dso_dynamics,
690         elf_cris_discard_excess_program_dynamics): Likewise.
691         * elf32-hppa.c (allocate_plt_static, allocate_dynrelocs,
692         clobber_millicode_symbols, readonly_dynrelocs): Likewise.
693         * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
694         * elf32-i386.c (elf_i386_allocate_dynrelocs,
695         elf_i386_readonly_dynrelocs): Likewise.
696         * elf32-lm32.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
697         * elf32-m32c.c (m32c_relax_plt_check, m32c_relax_plt_realloc): Likewise.
698         * elf32-m32r.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
699         * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
700         * elf32-microblaze.c (allocate_dynrelocs): Likewise.
701         * elf32-ppc.c (allocate_dynrelocs, maybe_set_textrel): Likewise.
702         * elf32-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
703         * elf32-score.c (score_elf_sort_hash_table_f): Likewise.
704         * elf32-score7.c (score_elf_sort_hash_table_f): Likewise.
705         * elf32-sh.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
706         * elf32-tic6x.c (elf32_tic6x_allocate_dynrelocs,
707         elf32_tic6x_readonly_dynrelocs): Likewise.
708         * elf32-vax.c (elf_vax_discard_copies): Likewise.
709         * elf32-xstormy16.c (xstormy16_relax_plt_check,
710         xstormy16_relax_plt_realloc): Likewise.
711         * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Likewise.
712         * elf64-alpha.c (elf64_alpha_output_extsym,
713         elf64_alpha_calc_got_offsets_for_symbol,
714         elf64_alpha_calc_dynrel_sizes, elf64_alpha_size_rela_got_1): Likewise.
715         * elf64-hppa.c (elf64_hppa_mark_exported_functions,
716         allocate_global_data_opd, elf64_hppa_mark_milli_and_exported_functions,
717         elf_hppa_unmark_useless_dynamic_symbols,
718         elf_hppa_remark_useless_dynamic_symbols): Likewise.
719         * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref, func_desc_adjust,
720         adjust_opd_syms, adjust_toc_syms, allocate_dynrelocs,
721         readonly_dynrelocs, merge_global_got, reallocate_got,
722         undo_symbol_twiddle): Likewise.
723         * elf64-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
724         * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
725         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs,
726         elf_x86_64_readonly_dynrelocs): Likewise.
727         * elflink.c (elf_link_renumber_hash_table_dynsyms,
728         elf_link_renumber_local_hash_table_dynsyms, _bfd_elf_export_symbol,
729         _bfd_elf_link_find_version_dependencies,
730         _bfd_elf_link_assign_sym_version, _bfd_elf_adjust_dynamic_symbol,
731         _bfd_elf_link_sec_merge_syms, elf_adjust_dynstr_offsets,
732         elf_collect_hash_codes, elf_collect_gnu_hash_codes,
733         elf_renumber_gnu_hash_syms, elf_gc_sweep_symbol,
734         elf_gc_propagate_vtable_entries_used,
735         elf_gc_smash_unused_vtentry_relocs, bfd_elf_gc_mark_dynamic_ref_symbol,
736         elf_gc_allocate_got_offsets): Likewise.
737         * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free,
738         elfNN_ia64_global_dyn_sym_thunk): Likewise.
739         * elfxx-mips.c (mips_elf_check_symbols, mips_elf_output_extsym,
740         mips_elf_sort_hash_table_f, allocate_dynrelocs): Likewise.
741         * elfxx-sparc.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
742         * i386linux.c (linux_tally_symbols): Likewise.
743         * m68klinux.c (linux_tally_symbols): Likewise.
744         * sparclinux.c (linux_tally_symbols): Likewise.
745         * sunos.c (sunos_scan_dynamic_symbol): Likewise.
746         * xcofflink.c (xcoff_post_gc_symbol): Likewise.
747
748         * elflink.c (elf_link_output_extsym): Make it a bfd_hash_traverse
749         function.  Update all callers.
750         * aoutx.h (aout_link_write_other_symbol): Likewise.
751         * pdp11.c (aout_link_write_other_symbol): Likewise.
752         * cofflink.c (_bfd_coff_write_global_sym): Likewise.
753         * ecoff.c (ecoff_link_write_external): Likewise.
754         * xcofflink.c (xcoff_write_global_symbol): Likewise.
755         * vms-alpha.c (alpha_vms_link_output_symbol): Likewise.  Handle
756         warning symbols.
757         * ecoff.c (ecoff_link_hash_traverse): Delete.
758         * coff-ppc.c (ppc_bfd_coff_final_link): Use bfd_hash_traverse for
759         _bfd_coff_write_global_sym.
760         * libcoff-in.h (_bfd_coff_write_global_sym): Update prototype.
761         * libcoff.h: Regenerate.
762
763 2011-06-10  Nick Clifton  <[email protected]>
764
765         * elflink.c (_bfd_elf_link_create_dynamic_sections): If the
766         backend does not provide a function for creating dynamic sections
767         then fail.
768         (bfd_elf_final_link): Issue a warning message if a dynamic section
769         has the SHT_NOTE type.
770         (bfd_elf_final_link): Do not look for dynamic strings in a section
771         that does not have the SHT_STRTAB type or the name .dynstr.
772         * elf32-arm.c (elf32_arm_finish_dynamic_sections): Fail if the got
773         section is not in the output binary.
774         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Likewise.
775
776 2011-06-09  Tristan Gingold  <[email protected]>
777
778         * elfnn-ia64.c (elfNN_ia64_relax_section, elfNN_ia64_choose_gp)
779         (elfNN_ia64_relocate_section, elfNN_vms_object_p): Remove trailing
780         spaces.
781
782 2011-06-09  Tristan Gingold  <[email protected]>
783
784         * bfd.c (bfd_get_sign_extend_vma): Handle aixcoff.
785
786 2011-06-09  Nick Clifton  <[email protected]>
787
788         PR ld/12845
789         * elf.c (_bfd_elf_init_private_section_data): Add an assertion
790         that the output section has an allocated bfd_elf_section_data
791         structure.
792         * elfxx-mips.c (mips_elf_check_symbols): Do not create a stub for
793         symbols in sections that have been removed by garbage collection.
794
795 2011-06-08  H.J. Lu  <[email protected]>
796
797         * elf64-x86-64.c (elf_x86_64_check_relocs): Allow R_X86_64_64
798         relocations in SEC_DEBUGGING sections when building shared
799         libraries.
800
801 2011-06-08  H.J. Lu  <[email protected]>
802
803         PR ld/12851
804         * elflink.c (elf_gc_sweep): Don't check SHT_NOTE sections here.
805         (bfd_elf_gc_sections): Also check SHT_NOTE sections.
806
807 2011-06-08  Tristan Gingold  <[email protected]>
808
809         * makefile.vms (OBJS): Add elfxx-ia64.obj
810         Remove vax case.
811
812 2011-06-08  Alan Modra  <[email protected]>
813
814         * aix386-core.c, * cisco-core.c, * hpux-core.c, * osf-core.c,
815         * sco5-core.c: Init match_priority field.
816
817 2011-06-08  Alan Modra  <[email protected]>
818
819         * elflink.c (_bfd_elf_archive_symbol_lookup): Follow warning and
820         indirect links here.
821
822 2011-06-07  Joel Brobecker  <[email protected]>
823
824         * irix-core.c (irix_core_vec): Add match_priority field.
825
826 2011-06-06  Alan Modra  <[email protected]>
827
828         * targets.c (bfd_target): Make ar_max_namelen an unsigned char.
829         Add match_priority.
830         * configure.in: Bump bfd version.
831         * elfcode.h (elf_object_p): Delete hacks preventing match of
832         EM_NONE and ELFOSABI_NONE targets when a better match exists.
833         * elfxx-target.h (elf_match_priority): Define and use.
834         * format.c (bfd_check_format_matches): Use target match_priority
835         to choose best of multiple matching targets.  In cases with multiple
836         matches rerun _bfd_check_format if we don't choose the last match.
837         * aout-adobe.c, * aout-arm.c, * aout-target.h, * aout-tic30.c,
838         * binary.c, * bout.c, * coff-alpha.c, * coff-i386.c, * coff-i860.c,
839         * coff-i960.c, * coff-ia64.c, * coff-mips.c, * coff-or32.c,
840         * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic30.c,
841         * coff-tic54x.c, * coff-x86_64.c, * coff64-rs6000.c, * coffcode.h,
842         * i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c, * mach-o-target.c,
843         * mipsbsd.c, * mmo.c, * nlm-target.h, * oasys.c, * pdp11.c,
844         * pe-mips.c, * pef.c, * plugin.c, * ppcboot.c, * som.c, * srec.c,
845         * tekhex.c, * trad-core.c, * verilog.c, * versados.c, * vms-alpha.c,
846         * vms-lib.c, * xsym.c: Init match_priority field.
847         * configure: Regenerate.
848         * bfd-in2.h: Regenerate.
849
850 2011-06-04  H.J. Lu  <[email protected]>
851
852         PR ld/12842
853         * elfcode.h (elf_object_p): Revert the last change.
854
855 2011-06-04  Alan Modra  <[email protected]>
856
857         * archures.c (bfd_arch_get_compatible): If one arch is unknown,
858         return the other arch.
859         * elfcode.h (elf_object_p): Allow explicit match to generic ELF
860         target.
861
862 2011-06-03  Bertram Felgenhauer  <[email protected]>
863
864         PR ld/12682
865         * hash.c (higher_primer_number): Add more, small, prime numbers.
866         (bfd_hash_set_default_size): Likewise.
867
868 2011-06-02  Nick Clifton  <[email protected]>
869
870         * coff-mcore.c: Fix spelling typo.
871         * coff-stgo32.c: Likewise.
872         * elf32-arm.c: Likewise.
873         * elf32-avr.c: Likewise.
874         * elf-m68hc1x.c: Likewise.
875         * elf32-mcore.c: Likewise.
876         * elf32-mep.c: Likewise.
877         * elf32-mt.c: Likewise.
878         * elf32-ppc.c: Likewise.
879         * elf32-xtensa.c: Likewise.
880         * elf64-ppc.c: Likewise.
881         * elfxx-mips.c: Likewise.
882         * netbsd.h: Likewise.
883         * nlmcode.h: Likewise.
884         * vms-alpha.c: Likewise.
885         * po/bfd.pot: Regenerate.
886         * po/SRC-POTFILES.in: Regenerate.
887
888 2011-06-01  DJ Delorie  <[email protected]>
889
890         * config.bfd: Add bfd_elf32_rx_be_ns_vec.
891         * target.c: Likewise.
892         * configure.in: Likewise.
893         * configure.in: Regenerate.
894         * elf32-rx.c: Add elf32-rx-be-ns target.
895         (rx_elf_object_p): Never allow the be-ns target by default,
896         only allow it if the user requests it.
897
898 2011-06-01  H.J. Lu  <[email protected]>
899
900         * elf32-i386.c (elf_i386_size_dynamic_sections): Properly warn
901         relocation in readonly section in a shared object.
902         * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
903
904 2011-05-31  Nick Clifton  <[email protected]>
905
906         * archive.c (adjust_relative_path): Fix comment to prevent it
907         corrupting the auto-generated bfd.h.
908
909 2011-05-31  Paul Brook  <[email protected]>
910
911         * elf32-arm.c (elf32_arm_final_link_relocate): Only do bl conversion
912         for known functions.
913         (elf32_arm_swap_symbol_in): Only set ST_BRANCH_TO_ARM for function
914         symbols.
915
916 2011-05-31  Paul Brook  <[email protected]>
917
918         * elf32-arm.c (arm_stub_is_thumb): Add
919         arm_stub_long_branch_v4t_thumb_tls_pic.
920         (elf32_arm_final_link_relocate): TLS stubs are always ARM.
921         Handle Thumb stubs.
922
923 2011-05-27  Nick Clifton  <[email protected]>
924
925         PR binutils/12710
926         * archive.c (_bfd_get_elt_at_filepos): Set correct error value if
927         unable to read a file pointed to by an entry in a thin archive.
928         (adjust_relative_path): Use lrealpath to canonicalize paths.
929         Handle the case where the reference path is above the current
930         path in the directory tree.
931
932 2011-05-26  H.J. Lu  <[email protected]>
933
934         PR ld/12809
935         * elf64-x86-64.c (elf_x86_64_relocate_section): Handle
936         R_X86_64_TPOFF64 in executable.
937
938 2011-05-26  Alan Modra  <[email protected]>
939
940         * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment.
941         * elflink.c (_bfd_elf_symbol_refs_local_p): Expand
942         local_protected comment.
943
944 2011-05-25  Tristan Gingold  <[email protected]>
945
946         * configure.in (bfd_elf32_ia64_big_vec, bfd_elf32_ia64_hpux_big_vec)
947         (bfd_elf64_ia64_big_vec, bfd_elf64_ia64_hpux_big_vec)
948         (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_vms_vec): Add elfxx-ia64.lo
949         * Makefile.am (BFD64_BACKENDS): Add elfxx-ia64.lo
950         (BFD64_BACKENDS_CFILES): Add elfxx-ia64.c
951         (elf32-ia64.c): Created from elfnn-ia64.c
952         (elf64-ia64.c): Likewise.
953         * elfxx-ia64.h: New file.
954         * elfxx-ia64.c: Split with elfnn-ia64.c.  Keep only the following
955         functions.Includes elfxx-ia64.h.
956         (elfNN_ia64_reloc): Renames to ia64_elf_reloc.  Adjust error message.
957         (IA64_HOWTO): Adjust.
958         (lookup_howto): Renames to ia64_elf_lookup_howto.  Make it public.
959         (elfNN_ia64_reloc_type_lookup): Renames to
960         ia64_elf_reloc_type_lookup. Make it public. Adjust calls.
961         (elfNN_ia64_reloc_name_lookup): Renames to
962         ia64_elf_reloc_name_lookup. Make it public.
963         (elfNN_ia64_relax_br): Renames to ia64_elf_relax_br.  Make it public.
964         (elfNN_ia64_relax_brl): Renames to ia64_elf_relax_brl. Make it
965         public.
966         (elfNN_ia64_relax_ldxmov): Renames to ia64_elf_relax_ldxmov.
967         Move it and make it public.  Move prototype to elfxx-ia64.h
968         (elfNN_ia64_install_value): Renames to ia64_elf_install_value.
969         Move prototype to elfxx-ia64.h
970         * elfnn-ia64.c: New file, split from elfxx-ia64.c.
971         (elfNN_ia64_info_to_howto): Adjust calls.
972         (elfNN_ia64_relax_section): Adjust calls.
973         (count_dyn_reloc): Fix typo.
974         (elfNN_ia64_relocate_section): Adjust calls.
975         (elfNN_ia64_finish_dynamic_symbol): Likewise.
976         (bfd_elfNN_bfd_reloc_type_lookup)
977         (bfd_elfNN_bfd_reloc_name_lookup): Adjust macros.
978         * configure: Regenerate.
979         * Makefile.in: Regenerate.
980
981 2011-05-23  DJ Delorie  <[email protected]>
982
983         * elf32-rx.c (rx_elf_object_p): When reading an RX object in, undo
984         the vma/lma swapping done in elf32_rx_modify_program_headers.
985
986 2011-05-23  Nick Clifton  <[email protected]>
987
988         * elf-m10300.c (mn10300_elf_mkobject): New function.
989         (bfd_elf32_mkobject): Define.
990
991 2011-05-23  Alan Modra  <[email protected]>
992
993         * elf-bfd.h: Comment typo fix.
994         * elf32-ppc.c (struct ppc_elf_dyn_relocs): Delete.  Replace with
995         struct elf_dyn_relocs throughout.
996         * elf64-ppc.c (struct ppc_dyn_relocs): Likewise.
997
998 2011-05-23  Alan Modra  <[email protected]>
999
1000         * elf32-frv.c: Use info->callbacks->einfo throughout file in linker
1001         functions rather than warning callback or _bfd_error_handler.
1002         * elf32-ppc.c: Likewise.
1003         * elf64-ppc.c: Likewise.
1004         * elf32-ppc.c (ppc_elf_tls_optimize): Use %H in __tls_get_addr lost
1005         arg error.
1006         * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
1007
1008 2011-05-23  Alan Modra  <[email protected]>
1009
1010         PR 12763
1011         * elf.c (assign_file_positions_for_load_sections): Set sh_offset for
1012         .tbss, and page align same for all SHT_NOBITS sections.
1013
1014 2011-05-21  Alan Modra  <[email protected]>
1015
1016         PR 12763
1017         * elf.c (_bfd_elf_make_section_from_shdr): Set up TLS section LMAs
1018         from PT_TLS header.
1019         (_bfd_elf_map_sections_to_segments): Don't create a final PT_LOAD
1020         segment if just for .tbss.
1021         (assign_file_positions_for_load_sections): Don't report "can't
1022         allocate in segment" errors for .tbss.
1023         (assign_file_positions_for_non_load_sections): Don't set p_filesz
1024         from SHT_NOBITS section filepos.
1025
1026 2011-05-20  Bernd Schmidt  <[email protected]>
1027
1028         * elf32-tic6x.c (elf32_tic6x_howto_table): Add entries for
1029         R_C6000_PCR_H16 and R_C6000_PCR_L16.
1030         (elf32_tic6x_relocate_section): Handle them.
1031
1032 2011-05-18  Nick Clifton  <[email protected]>
1033
1034         PR ld/12761
1035         * elflink.c (elf_link_add_object_symbols): Process .gnu.warning
1036         sections when building shared libraries.
1037
1038 2011-05-18  Rafał Krypa  <[email protected]>
1039
1040         PR ld/12778
1041         * elf32-arm.c (elf32_arm_gc_sweep_hook): Use the computed dynamic
1042         reloc pointer.
1043
1044 2011-05-18  Tristan Gingold  <[email protected]>
1045
1046         * xcofflink.c (xcoff_link_add_symbols): Handle C_DWARF symbols.
1047         (xcoff_sweep): Always keep dwarf sections.
1048         (xcoff_link_input_bfd): Handle dwarf symbols and sections.
1049
1050 2011-05-18  Tristan Gingold  <[email protected]>
1051
1052         * libxcoff.h (struct xcoff_dwsect_name): New type.
1053         (XCOFF_DWSECT_NBR_NAMES): New macro.
1054         (xcoff_dwsect_names): Declare.
1055         * coffcode.h (sec_to_styp_flags): Handle xcoff dwarf sections.
1056         (styp_to_sec_flags): Ditto.
1057         (coff_new_section_hook): Ditto.
1058         (coff_slurp_symbol_table): Handle C_DWARF and C_INFO.
1059         * coff-rs6000.c (xcoff_dwsect_name): New variable.
1060
1061 2011-05-17  Tomohiro Kashiwada  <[email protected]>
1062
1063         PR ld/12759
1064         * elf32-rx.c (ignore_lma): New variable.
1065         (bfd_elf32_rx_set_target_flags): Add ignore_lma parameter.
1066         (rx_modify_program_headers): Only copy the LMA into the VMA if
1067         ignore_lma is true.
1068
1069 2011-05-17  Alan Modra  <[email protected]>
1070
1071         PR ld/12760
1072         * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Adjust "notice" call.
1073         * elflink.c (elf_link_add_object_symbols): Likewise.
1074         * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1075
1076 2011-05-16  Alan Modra  <[email protected]>
1077
1078         * linker.c (_bfd_generic_link_add_one_symbol): Don't init u.undef.weak.
1079
1080 2011-05-15  Richard Sandiford  <[email protected]>
1081
1082         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and
1083         global GOT entries for GOT_PAGE relocations against global symbols.
1084
1085 2011-05-13  Bernd Schmidt  <[email protected]>
1086
1087         * config.bfd (tic6x-*-elf, tic6x-*-uclinux): New.
1088         (tic6x-*-*): Replaced by these.
1089         * elf32-tic6x.c (elf32_tic6x_set_osabi): New static function.
1090         (elf32_tic6x_check_relocs): Create dynamic sections if -shared.
1091         (elf_backend_relocs_compatible, elf_backend_post_process_headers):
1092         Define.
1093         (elf32_bed, TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM,
1094         TARGET_BIG_NAME, ELF_OSABI): Redefine twice, and include
1095         "elf32-target.h" two more times.
1096         * configure.in: Handle bfd_elf32_tic6x_linux_be_vec,
1097         bfd_elf32_tic6x_linux_le_vec, bfd_elf32_tic6x_elf_be_vec and
1098         bfd_elf32_tic6x_elf_le_vec.
1099         * configure: Regenerate.
1100
1101 2011-05-13  Jan Beulich  <[email protected]>
1102
1103         * config.bfd: Add targets x86_64-*-pe and x86_64-*-pep.
1104
1105 2011-05-12  Jan Kratochvil  <[email protected]>
1106
1107         * config.in: Regenerated.
1108         * configure: Regenerated.
1109         * configure.in: New tests for HAVE_PRPSINFO_T_PR_PID,
1110         HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and
1111         HAVE_PSINFO32_T_PR_PID.
1112         * elf.c (elfcore_grok_psinfo): Protect reading psinfo.pr_pid by
1113         HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID
1114         and HAVE_PSINFO32_T_PR_PID.
1115         * hosts/x86-64linux.h (HAVE_PRPSINFO32_T_PR_PID): New redefinition.
1116
1117 2011-05-10  Jan Kratochvil  <[email protected]>
1118
1119         * elf.c (elfcore_grok_psinfo): Initialize CORE_PID for both native and
1120         32bit psinfo.
1121         * elf32-ppc.c (ppc_elf_grok_psinfo): Initialize core_pid.
1122         * elf64-ppc.c (ppc64_elf_grok_psinfo): Likewise.
1123
1124 2011-05-09  Paul Brook  <[email protected]>
1125
1126         * bfd-in.h (elf32_tic6x_fix_exidx_coverage): Add prototype.
1127         * bfd-in2.h: Regenerate.
1128         * elf32-tic6x.c: Include limits.h.
1129         (tic6x_unwind_edit_type, tic6x_unwind_table_edit,
1130         _tic6x_elf_section_data): New.
1131         (elf32_tic6x_section_data): Define.
1132         (elf32_tic6x_new_section_hook): Allocate target specific data.
1133         (elf32_tic6x_add_unwind_table_edit): New function.
1134         (get_tic6x_elf_section_data, elf32_tic6x_adjust_exidx_size,
1135         elf32_tic6x_insert_cantunwind_after, elf32_tic6x_add_low31,
1136         elf32_tic6x_copy_exidx_entry): New functions.
1137         (elf_backend_write_section): Define.
1138
1139 2011-05-09  Paul Brook  <[email protected]>
1140
1141         * elf32-tic6x.c (is_tic6x_elf_unwind_section_name,
1142         elf32_tic6x_fake_sections): New functions.
1143         (elf_backend_fake_sections): Define.
1144
1145 2011-05-09  Paul Brook  <[email protected]>
1146
1147         * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): New function.
1148         (elf_backend_gc_mark_extra_sections): Define.
1149
1150 2011-05-07  Dave Korn  <[email protected]>
1151
1152         PR ld/12365
1153         * cofflink.c (bfd_coff_link_input_bfd): Check for and warn about
1154         references to symbols defined in discarded sections.
1155
1156 2011-05-07  Dave Korn  <[email protected]>
1157
1158         PR ld/12365
1159         * coffgen.c (coff_write_symbol): Assume input section is its own
1160         output section if output_section member not set.
1161         (coff_write_alien_symbol): Likewise.
1162
1163 2011-05-07  H.J. Lu  <[email protected]>
1164
1165         PR ld/12730
1166         * elf.c (_bfd_elf_section_offset): Check SEC_ELF_REVERSE_COPY.
1167
1168         * elflink.c (elf_link_input_bfd): Reverse copy .ctors/.dtors
1169         sections if needed.
1170
1171         * section.c (SEC_ELF_REVERSE_COPY): New.
1172         * bfd-in2.h: Regenerated.
1173
1174 2011-05-07  Anders Kaseorg  <[email protected]>
1175
1176         PR 12739
1177         * libbfd.c (bfd_get_8, bfd_get_signed_8): Use const cast.
1178         * bfd-in2.h: Regenerate.
1179
1180 2011-05-06  Tristan Gingold  <[email protected]>
1181
1182         * vms-alpha.c (evax_section_flags): Remove SEC_IN_MEMORY.
1183         (_bfd_vms_slurp_egsd): Rename old_flags to vms_flags.  Handle
1184         any code section.  Add comments.
1185         (alpha_vms_object_p): Use void * instead of PTR.
1186         (alpha_vms_create_eisd_for_section): Fix test for setting DZRO.
1187         (build_module_list): Guard against no DST section.  Add comments.
1188         (alpha_vms_link_output_symbol): Discard undefined symbols.
1189         (alpha_vms_get_section_contents): Simply memcpy if the section was
1190         already loaded.  Fix typo.
1191         (vms_new_section_hook): Use void * instead of PTR.
1192         (vms_alpha_vec): Ditto.
1193
1194 2011-05-06  Richard Sandiford  <[email protected]>
1195
1196         * elf32-arm.c (cortex_a8_erratum_scan): If the stub is a Thumb
1197         branch to a PLT entry, redirect it to the PLT's Thumb entry point.
1198
1199 2011-05-05  Bernd Schmidt  <[email protected]>
1200
1201         * elf32-tic6x.c (elf32_tic6x_final_link): New function.
1202         (elf32_tic6x_merge_attributes): Do not warn for PID or PIC
1203         mismatch.  Choose the lower of the two values.
1204         (bfd_elf32_bfd_final_link): New macro.
1205
1206 2011-04-28  Tristan Gingold  <[email protected]>
1207
1208         * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
1209         (bfd_xcoff_swap_aux_out): Ditto.
1210         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
1211         (bfd_xcoff64_swap_aux_out): Ditto.
1212
1213 2011-05-04  Alan Modra  <[email protected]>
1214
1215         PR ld/12727
1216         * elf64-ppc.c (ppc_build_one_stub <ppc_sub_plt_call>): Clear
1217         was_undefined on dot-symbols.
1218
1219 2011-05-03  Paul Brook  <[email protected]>
1220
1221
1222         * elf32-tic6x.c (elf32_tic6x_howto_table,
1223         elf32_tic6x_howto_table_rel, (elf32_tic6x_gc_sweep_hook,
1224         elf32_tic6x_relocate_section, elf32_tic6x_check_relocs):
1225         Add R_C6000_EHTYPE.
1226
1227 2011-05-01  Alan Modra  <[email protected]>
1228
1229         PR ld/12718
1230         * elf32-i386.c (elf_i386_check_relocs): Ensure dynobj set before
1231         creating ifunc sections.
1232         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1233
1234 2011-04-30  H.J. Lu  <[email protected]>
1235
1236         * elf64-x86-64.c (elf_x86_64_merge_symbol): Correct parameter
1237         names.
1238
1239 2011-04-28  Tom Tromey  <[email protected]>
1240
1241         * bfdio.c (memory_bstat): Pass correct size to memset.
1242
1243 2011-04-28  Mike Frysinger  <[email protected]>
1244
1245         * dwarf2.c (dwarf_debug_sections): Mark const.
1246         * elf.c (special_sections): Likewise.
1247         * libbfd-in.h (dwarf_debug_sections): Likewise.
1248         * libbfd.h: Regenerate.
1249
1250 2011-04-26  Kai Tietz  <[email protected]>
1251
1252         * coffcode.h (sec_to_styp_flags): Allow linkonce for
1253         debugging sections.
1254
1255 2011-04-26  Tristan Gingold  <[email protected]>
1256
1257         * coff64-rs6000.c: Convert to ISO-C.  Remove PARAMS and PTR macros.
1258
1259 2011-04-24  Alan Modra  <[email protected]>
1260
1261         PR ld/12365
1262         PR ld/12696
1263         * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call.
1264         * linker.c (_bfd_link_hash_newfunc): Clear bitfields.
1265         (_bfd_generic_link_add_one_symbol): Update "notice" call.
1266         * elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when
1267         it is a redef of an IR symbol in a real BFD.
1268
1269 2011-04-22  H.J. Lu  <[email protected]>
1270
1271         * elf32-i386.c (elf_i386_readonly_dynrelocs): Warn relocation
1272         in readonly section in a shared object.
1273         (elf_i386_size_dynamic_sections): Likewise.
1274         * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
1275         (elf_x86_64_size_dynamic_sections): Likewise.
1276
1277 2011-04-21  H.J. Lu  <[email protected]>
1278
1279         PR ld/12694
1280         * elf32-i386.c (elf_i386_readonly_dynrelocs): Skip local IFUNC
1281         symbols.
1282         * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
1283
1284 2011-04-21  H.J. Lu  <[email protected]>
1285
1286         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Return false
1287         on dynamic symbol error.
1288         * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1289
1290 2011-04-20  Tristan Gingold  <[email protected]>
1291
1292         * config.bfd (alpha*-*-*vms*, ia64*-*-*vms*): Define targ_selvecs.
1293
1294 2011-04-20  Alan Modra  <[email protected]>
1295
1296         * hash.c (bfd_default_hash_table_size): Make it an unsigned long.
1297         (bfd_hash_table_init_n): Overflow checking.
1298         (bfd_hash_set_default_size): Return current size.  Take unsigned long
1299         arg.  Add 65537 to hash_size primes.
1300         * bfd-in.h (bfd_hash_set_default_size): Update prototype.
1301         * bfd-in2.h: Regenerate.
1302
1303 2011-04-20  Jan Kratochvil  <[email protected]>
1304
1305         * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of
1306         memmove elements.
1307
1308 2011-04-20  Alan Modra  <[email protected]>
1309
1310         * libbfd.c (bfd_log2): Do return rounded up value.
1311         * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Replace bfd_log2
1312         call with expanded old round down version of the function.
1313
1314         * archive.c (_bfd_get_elt_at_filepos): Don't release n_nfd.
1315         * elflink.c (elf_link_add_object_symbols): Delete redundant code.
1316
1317 2011-04-20  Alan Modra  <[email protected]>
1318
1319         PR ld/12365
1320         * elfcode.h (elf_slurp_symbol_table): Put common plugin IR symbols
1321         in their own common section.
1322         * elflink.c (elf_link_add_object_symbols): Likewise.
1323         * linker.c (generic_link_check_archive_element): Don't lose flags
1324         if common section is pre-existing.
1325         (_bfd_generic_link_add_one_symbol): Likewise.
1326
1327 2011-04-20  Alan Modra  <[email protected]>
1328
1329         PR ld/12365
1330         * elflink.c (_bfd_elf_merge_symbol): Update multiple_common calls.
1331         * linker.c (_bfd_generic_link_add_one_symbol): Likewise.  Call
1332         multiple_definition regardless of allow_multiple_definition.
1333         * simple.c (simple_dummy_multiple_definition): Update.
1334         * xcofflink.c (xcoff_link_add_symbols): Update multiple_definition
1335         calls.
1336
1337 2011-04-18  Tristan Gingold  <[email protected]>
1338
1339         * coff-rs6000.c: Convert to ISO-C.  Remove PARAMS macro.
1340
1341 2011-04-18  Alan Modra  <[email protected]>
1342
1343         PR ld/12365
1344         PR ld/12672
1345         * bfd.c (BFD_PLUGIN): Define.
1346         (BFD_FLAGS_SAVED, BFD_FLAGS_FOR_BFD_USE_MASK): Add BFD_PLUGIN.
1347         * bfd-in2.h: Regenerate.
1348         * elflink.c (elf_link_output_extsym): Strip undefined plugin syms.
1349         * opncls.c (bfd_make_readable): Don't lose original bfd flags.
1350
1351 2011-04-17  Jan Kratochvil  <[email protected]>
1352
1353         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Do not check for
1354         SEC_LOAD.
1355
1356 2011-04-15  Sergio Durigan Junior  <[email protected]>
1357
1358         * elf-bfd.h (struct sdt_note): New struct.
1359         (struct elf_obj_tdata) <sdt_note_head>: New field.
1360         * elf.c (elfobj_grok_stapsdt_note_1): New function.
1361         (elfobj_grok_stapsdt_note): Likewise.
1362         (elf_parse_notes): Added code to treat SystemTap note
1363         sections.
1364
1365 2011-04-12  Richard Henderson  <[email protected]>
1366
1367         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Do not
1368         exclude empty .got sections.
1369
1370 2011-04-11  H.J. Lu  <[email protected]>
1371
1372         * elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound
1373         array access for BFD_RELOC_386_IRELATIVE.
1374
1375 2011-04-11  Bernd Schmidt  <[email protected]>
1376
1377         * elf32-tic6x.c (elf32_tic6x_check_relocs): Initialize pc_count field.
1378
1379 2011-04-11  Mark Wielaard  <[email protected]>
1380
1381         PR 10549
1382         * elf-bfd.h (has_ifunc_symbols): Renamed to has_gnu_symbols.
1383         (has_gnu_symbols): Renamed from has_ifunc_symbols.
1384         * elf.c (_bfd_elf_set_osabi): Use new has_gnu_symbols name.
1385         * elf32-arm.c (elf32_arm_add_symbol_hook): Set has_gnu_symbols
1386         also if STB_GNU_UNIQUE symbol binding was seen.
1387         * elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
1388         * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1389         * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1390         * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1391         * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1392         * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
1393
1394 2011-04-11  Alan Modra  <[email protected]>
1395
1396         * bfd-in.h (bfd_get_section_limit): Don't use rawsize with output
1397         sections.
1398         * libbfd.c (_bfd_generic_get_section_contents): Likewise.
1399         (_bfd_generic_get_section_contents_in_window): Likewise.
1400         * section.c (bfd_get_section_contents): Likewise.
1401         * compress.c (bfd_get_full_section_contents): Likewise.
1402         * elf32-rx.c (rx_final_link): Ignore rawsize.
1403         * elf32-microblaze.c (microblaze_elf_relocate_section): Use correct
1404         bfd with bfd_get_section_limit.
1405         * elfxx-ia64.c (elfNN_ia64_choose_gp): Add "final" parameter.  Use
1406         os->size during final link.  Update callers.
1407         * bfd-in2.h: Regenerate.
1408
1409 2011-04-10  Richard Sandiford  <[email protected]>
1410
1411         PR ld/12637
1412         * elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count
1413         as the number of global entries when merging with the primary GOT.
1414
1415 2011-04-09  H.J. Lu  <[email protected]>
1416
1417         * elf32-i386.c: Update copyright year.
1418         * elf64-x86-64.c: Likewise.
1419
1420 2011-04-09  Kai Tietz  <[email protected]>
1421
1422         * peXXigen.c (_bfd_XXi_final_link_postscripte): Sort pdata in temporary
1423         buffer and use rawsize for sorting.
1424         * coffcode.h (coff_compute_section_file_positions): Set rawsize
1425         before doing alignment.
1426
1427 2011-04-09  H.J. Lu  <[email protected]>
1428
1429         * elf32-i386.c (elf_i386_relocate_section): Return relocation
1430         error on unsupported relocation.
1431         * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1432
1433 2011-04-09  H.J. Lu  <[email protected]>
1434
1435         PR binutils/12657
1436         * hosts/x86-64linux.h (elf_prstatus32): Replace __pid_t with
1437         pid_t.
1438
1439 2011-04-08  H.J. Lu  <[email protected]>
1440
1441         PR ld/12654
1442         * elf32-i386.c (elf_i386_relocate_section): Check !executable
1443         instead of shared for R_386_TLS_LDO_32.
1444
1445 2011-04-08  Tristan Gingold  <[email protected]>
1446
1447         * Makefile.am (SOURCE_HFILES): Remove xcoff-target.h
1448         * coff-pmac: Remove
1449         * xcoff-target.h: Remove
1450         * Makefile.in: Regenerate.
1451
1452 2011-04-07  Cary Coutant  <[email protected]>
1453
1454         * dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification.
1455
1456 2011-04-07  Paul Brook  <[email protected]>
1457
1458         * elf32-tic6x.c (elf32_tic6x_howto_table): R_C6000_PREL31 is
1459         pc-relative.
1460         (elf32_tic6x_howto_table_rel): Ditto.
1461         (elf32_tic6x_relocate_section): Implement R_C6000_PREL31.
1462         (elf32_tic6x_check_relocs): Ditto.
1463
1464 2011-04-06  Joseph Myers  <[email protected]>
1465
1466         * config.bfd (thumb-*-oabi): Don't handle in list of obsolete
1467         targets.
1468         (strongarm*, thumb*, xscale*): Remove architectures.
1469         (strongarm-*-kaos*, thumb-*-coff, thumb-*-elf, thumb-epoc-pe*,
1470         thumb-*-pe*, strongarm-*-elf, strongarm-*-coff, xscale-*-elf,
1471         xscale-*-coff): Remove targets.
1472
1473 2011-04-01  Tristan Gingold  <[email protected]>
1474
1475         * elfxx-ia64.c: include bfd_stdint.h
1476
1477 2011-03-31  Jan Kratochvil  <[email protected]>
1478
1479         * elf32-tic6x.c (elf32_tic6x_relocate_section): Remove unused variable
1480         dynobj and its initialization.
1481
1482 2011-03-31  Tristan Gingold  <[email protected]>
1483
1484         * makefile.vms (DEFS): Add HAVE_bfd_elf64_ia64_vms_vec.
1485         * configure.com: Set BFD_HOST_64BIT_LONG_LONG and
1486         BFD_HOST_LONG_LONG to 1.
1487
1488 2011-03-31  Tristan Gingold  <[email protected]>
1489
1490         * vms-alpha.c (vms_get_remaining_object_record): Fix dec-c warning.
1491         (_bfd_vms_write_etir): Ditto.
1492         (_bfd_vms_slurp_etir): Avoid to use intptr_t
1493         * configure.com: Generate bfd_stdint.h
1494
1495 2011-03-31  Bernd Schmidt  <[email protected]>
1496
1497         * elf32-tic6x.h (struct elf32_tic6x_params): New.
1498         (elf32_tic6x_setup): Declare.
1499         * elf32-tic6x.c: Include <limits.h>.
1500         (ELF_DYNAMIC_LINKER, DEFAULT_STACK_SIZE, PLT_ENTRY_SIZE): Define.
1501         (struct elf32_tic6x_link_hash_table, struct elf32_link_hash_entry):
1502         New structures.
1503         (elf32_tic6x_link_hash_table, is_tic6x_elf): New macros.
1504         (tic6x_elf_scom_section, tic6x_elf_scom_symbol,
1505         tic6x_elf_scom_symbol_ptr): New static variables.
1506         (elf32_tic6x_howto_table, elf32_tic6x_howto_table_rel,
1507         elf32_tic6x_reloc_map): Add R_C6000_JUMP_SLOT, R_C6000_EHTYPE,
1508         R_C6000_PCR_H16 and R_C6000_PCR_L16.
1509         (elf32_tic6x_link_hash_newfunc, elf32_tic6x_link_hash_table_create,
1510         elf32_tic6x_link_hash_table_free, elf32_tic6x_setup,
1511         elf32_tic6x_using_dsbt, elf32_tic6x_install_rela,
1512         elf32_tic6x_create_dynamic_sections, elf32_tic6x_make_got_dynreloc,
1513         elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_gc_sweep_hook,
1514         elf32_tic6x_adjust_dynamic_symbol): New static functions.
1515         (elf32_tic6x_relocate_section): For R_C6000_PCR_S21, convert branches
1516         to weak symbols as required by the ABI.
1517         Handle GOT and DSBT_INDEX relocs, and copy relocs to the output file
1518         as needed when generating DSBT output.
1519         (elf32_tic6x_check_relocs, elf32_tic6x_add_symbol_hook,
1520         elf32_tic6x_symbol_processing, elf32_tic6x_section_from_bfd_section,
1521         elf32_tic6x_allocate_dynrelocs, elf32_tic6x_size_dynamic_sections,
1522         elf32_tic6x_always_size_sections, elf32_tic6x_modify_program_headers,
1523         elf32_tic6x_finish_dynamic_sections, elf32_tic6x_plt_sym_val,
1524         elf32_tic6x_copy_private_data, elf32_tic6x_link_omit_section_dynsym):
1525         New static functions.
1526         (ELF_MAXPAGESIZE): Define to 0x1000.
1527         (bfd_elf32_bfd_copy_private_bfd_data,
1528         bfd_elf32_bfd_link_hash_table_create,
1529         bfd_elf32_bfd_link_hash_table_free, elf_backend_can_refcount,
1530         elf_backend_want_got_plt, elf_backend_want_dynbss,
1531         elf_backend_plt_readonly, elf_backend_got_header_size,
1532         elf_backend_gc_sweep_hook, elf_backend_modify_program_headers,
1533         elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
1534         elf_backend_check_relocs, elf_backend_add_symbol_hook,
1535         elf_backend_symbol_processing, elf_backend_link_output_symbol_hook,
1536         elf_backend_section_from_bfd_section,
1537         elf_backend_finish_dynamic_symbol, elf_backend_always_size_sections,
1538         elf32_tic6x_size_dynamic_sections, elf_backend_finish_dynamic_sections,
1539         elf_backend_omit_section_dynsym, elf_backend_plt_sym_val): Define.
1540
1541         * bfd/reloc.c (BFD_RELOC_C6000_JUMP_SLOT, BFD_RELOC_C6000_EHTYPE,
1542         BFD_RELOC_C6000_PCR_H16, BFD_RELOC_C6000_PCR_S16): Add.
1543         * bfd/bfd-in2.h: Regenerate.
1544         * bfd/libbfd.h: Regenerate.
1545         * config.bfd: Accept tic6x-*-* instead of tic6x-*-elf.
1546
1547 2011-03-31  Tristan Gingold  <[email protected]>
1548
1549         * coffcode.h (coff_slurp_symbol_table): Silently discard C_NULL
1550         entry on xcoff when value is C_NULL_VALUE.
1551
1552 2011-03-31  Tristan Gingold  <[email protected]>
1553
1554         * libcoff-in.h (exec_hdr): Remove.
1555         * libcoff.h: Regenerate.
1556
1557 2011-03-30  Nick Clifton  <[email protected]>
1558
1559         * po/da.po: Updated Danish translation.
1560
1561 2011-03-29  Richard Henderson  <[email protected]>
1562
1563         * elf64-alpha.c (elf64_alpha_gc_mark_hook): New.
1564         (elf64_alpha_gc_sweep_hook): New.
1565         (elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook): New.
1566         (elf_backend_can_gc_sections): New.
1567
1568 2011-03-26  John Marino  <[email protected]>
1569
1570         * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*.
1571         * configure.in: Delete unused bfd_elf32_i386_dragonfly_vec.
1572         * configure: Regenerate.
1573
1574 2011-03-25  Michael Snyder  <[email protected]>
1575
1576         * coffcode.h (coff_set_alignment_hook): Check return of bfd_seek.
1577
1578 2011-03-25  Tristan Gingold  <[email protected]>
1579
1580         * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Allow the use
1581         of find_nearest_line on object files.
1582
1583 2011-03-25  Tristan Gingold  <[email protected]>
1584
1585         * vms-alpha.c (evax_section_flags): Make $CODE$ section read-only.
1586         Minor reordering.
1587         (alpha_vms_create_eisd_for_section): Make code sections read-only.
1588
1589 2011-03-24  Alan Modra  <[email protected]>
1590
1591         * elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where
1592         old-style __tls_get_addr calls without marker relocs don't match
1593         their arg setup insn one for one.  If such mismatches are found
1594         report the reloc and don't do any tls optimization.
1595         * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
1596
1597 2011-03-22  Eric B. Weddington  <[email protected]>
1598
1599         * bfd-in2.h: Regenerate.
1600
1601 2011-03-22  Eric B. Weddington  <[email protected]>
1602
1603         * archures.c: Add AVR XMEGA architecture information.
1604         * cpu-avr.c (arch_info_struct): Likewise.
1605         * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1606         (elf32_avr_object_p): Likewise.
1607
1608 2011-03-14  Richard Sandiford  <[email protected]>
1609
1610         * reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation.
1611         * bfd-in2.h: Regenerate.
1612         * elf32-arm.c (elf32_arm_howto_table_2): Rename existing definition
1613         to elf32_arm_howto_table_3 and replace with a single R_ARM_IRELATIVE
1614         entry.
1615         (elf32_arm_howto_from_type): Update accordingly.
1616         (elf32_arm_reloc_map): Map BFD_RELOC_ARM_IRELATIVE to R_ARM_IRELATIVE.
1617         (elf32_arm_reloc_name_lookup): Handle elf32_arm_howto_table_3.
1618         (arm_plt_info): New structure, split out from elf32_arm_link_hash_entry
1619         with an extra noncall_refcount field.
1620         (arm_local_iplt_info): New structure.
1621         (elf_arm_obj_tdata): Add local_iplt.
1622         (elf32_arm_local_iplt): New accessor macro.
1623         (elf32_arm_link_hash_entry): Replace plt_thumb_refcount,
1624         plt_maybe_thumb_refcount and plt_got_offset with an arm_plt_info.
1625         Change tls_type to a bitfield and add is_iplt.
1626         (elf32_arm_link_hash_newfunc): Update accordingly.
1627         (elf32_arm_allocate_local_sym_info): New function.
1628         (elf32_arm_create_local_iplt): Likewise.
1629         (elf32_arm_get_plt_info): Likewise.
1630         (elf32_arm_plt_needs_thumb_stub_p): Likewise.
1631         (elf32_arm_get_local_dynreloc_list): Likewise.
1632         (create_ifunc_sections): Likewise.
1633         (elf32_arm_copy_indirect_symbol): Update after the changes to
1634         elf32_arm_link_hash_entry.  Assert the is_iplt has not yet been set.
1635         (arm_type_of_stub): Add an st_type argument.  Use elf32_arm_get_plt_info
1636         to get PLT information.  Assert that all STT_GNU_IFUNC references
1637         are turned into PLT references.
1638         (arm_build_one_stub): Pass the symbol type to
1639         elf32_arm_final_link_relocate.
1640         (elf32_arm_size_stubs): Pass the symbol type to arm_type_of_stub.
1641         (elf32_arm_allocate_irelocs): New function.
1642         (elf32_arm_add_dynreloc): In static objects, use .rel.iplt for
1643         all R_ARM_IRELATIVE.
1644         (elf32_arm_allocate_plt_entry): New function.
1645         (elf32_arm_populate_plt_entry): Likewise.
1646         (elf32_arm_final_link_relocate): Add an st_type parameter.
1647         Set srelgot to null for static objects.  Use separate variables
1648         to record which st_value and st_type should be used when generating
1649         a dynamic relocation.  Use elf32_arm_get_plt_info to find the
1650         symbol's PLT information, setting has_iplt_entry, splt,
1651         plt_offset and gotplt_offset accordingly.  Check whether
1652         STT_GNU_IFUNC symbols should resolve to an .iplt entry, and change
1653         the relocation target accordingly.  Broaden assert to include
1654         .iplts.  Don't set sreloc for static relocations.  Assert that
1655         we only generate dynamic R_ARM_RELATIVE relocations for R_ARM_ABS32
1656         and R_ARM_ABS32_NOI.  Generate R_ARM_IRELATIVE relocations instead
1657         of R_ARM_RELATIVE relocations if the target is an STT_GNU_IFUNC
1658         symbol.  Pass the symbol type to arm_type_of_stub.  Conditionally
1659         resolve GOT references to the .igot.plt entry.
1660         (elf32_arm_relocate_section): Update the call to
1661         elf32_arm_final_link_relocate.
1662         (elf32_arm_gc_sweep_hook): Use elf32_arm_get_plt_info to get PLT
1663         information.  Treat R_ARM_REL32 and R_ARM_REL32_NOI as call
1664         relocations in shared libraries and relocatable executables.
1665         Count non-call PLT references.  Use elf32_arm_get_local_dynreloc_list
1666         to get the list of dynamic relocations for a local symbol.
1667         (elf32_arm_check_relocs): Always create ifunc sections.  Set isym
1668         at the same time as setting h.  Use elf32_arm_allocate_local_sym_info
1669         to allocate local symbol information.  Treat R_ARM_REL32 and
1670         R_ARM_REL32_NOI as call relocations in shared libraries and
1671         relocatable executables.  Record PLT information for local
1672         STT_GNU_IFUNC functions as well as global functions.   Count
1673         non-call PLT references.  Use elf32_arm_get_local_dynreloc_list
1674         to get the list of dynamic relocations for a local symbol.
1675         (elf32_arm_adjust_dynamic_symbol): Handle STT_GNU_IFUNC symbols.
1676         Don't remove STT_GNU_IFUNC PLTs unless all references have been
1677         removed.  Update after the changes to elf32_arm_link_hash_entry.
1678         (allocate_dynrelocs_for_symbol): Decide whether STT_GNU_IFUNC PLT
1679         entries should live in .plt or .iplt.  Check whether the .igot.plt
1680         and .got entries can be combined.  Use elf32_arm_allocate_plt_entry
1681         to allocate .plt and .(i)got.plt entries.  Detect which .got
1682         entries will need R_ARM_IRELATIVE relocations and use
1683         elf32_arm_allocate_irelocs to allocate them.  Likewise other
1684         non-.got dynamic relocations.
1685         (elf32_arm_size_dynamic_sections): Allocate .iplt, .igot.plt
1686         and dynamic relocations for local STT_GNU_IFUNC symbols.
1687         Check whether the .igot.plt and .got entries can be combined.
1688         Detect which .got entries will need R_ARM_IRELATIVE relocations
1689         and use elf32_arm_allocate_irelocs to allocate them.  Use stashed
1690         section pointers intead of strcmp checks.  Handle iplt and igotplt.
1691         (elf32_arm_finish_dynamic_symbol): Use elf32_arm_populate_plt_entry
1692         to fill in .plt, .got.plt and .rel(a).plt entries.  Point
1693         STT_GNU_IFUNC symbols at an .iplt entry if non-call relocations
1694         resolve to it.
1695         (elf32_arm_output_plt_map_1): New function, split out from
1696         elf32_arm_output_plt_map.  Handle .iplt entries.  Use
1697         elf32_arm_plt_needs_thumb_stub_p.
1698         (elf32_arm_output_plt_map): Call it.
1699         (elf32_arm_output_arch_local_syms): Add mapping symbols for
1700         local .iplt entries.
1701         (elf32_arm_swap_symbol_in): Handle Thumb STT_GNU_IFUNC symbols.
1702         (elf32_arm_swap_symbol_out): Likewise.
1703         (elf32_arm_add_symbol_hook): New function.
1704         (elf_backend_add_symbol_hook): Define for all targets.
1705
1706 2011-03-14  Richard Sandiford  <[email protected]>
1707
1708         * elf-bfd.h (elf_link_hash_entry): Add target_internal.
1709         * elf.c (swap_out_syms): Set st_target_internal for each
1710         Elf_Internal_Sym.
1711         * elfcode.h (elf_swap_symbol_in): Likewise.
1712         * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
1713         * elf32-sh-symbian.c (sh_symbian_relocate_section): Likewise.
1714         * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
1715         * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1716         * elflink.c (elf_link_output_extsym): Likewise.
1717         (bfd_elf_final_link): Likewise.
1718         (elf_link_add_object_symbols): Copy st_target_internal
1719         to the hash table if we see a definition.
1720         (_bfd_elf_copy_link_hash_symbol_type): Copy target_internal.
1721         * elf32-arm.c (elf32_arm_stub_hash_entry): Replace st_type with
1722         a branch_type field.
1723         (a8_erratum_fix, a8_erratum_reloc): Likewise.
1724         (arm_type_of_stub): Replace actual_st_type with an
1725         actual_branch_type parameter.
1726         (arm_build_one_stub): Use branch types rather than st_types to
1727         determine the type of branch.
1728         (cortex_a8_erratum_scan): Likewise.
1729         (elf32_arm_size_stubs): Likewise.
1730         (bfd_elf32_arm_process_before_allocation): Likewise.
1731         (allocate_dynrelocs_for_symbol): Likewise.
1732         (elf32_arm_finish_dynamic_sections): Likewise.
1733         (elf32_arm_final_link_relocate): Replace sym_flags parameter with
1734         a branch_type parameter.
1735         (elf32_arm_relocate_section): Update call accordingly.
1736         (elf32_arm_adjust_dynamic_symbol): Don't check STT_ARM_TFUNC.
1737         (elf32_arm_output_map_sym): Initialize st_target_internal.
1738         (elf32_arm_output_stub_sym): Likewise.
1739         (elf32_arm_symbol_processing): Delete.
1740         (elf32_arm_swap_symbol_in): Convert STT_ARM_TFUNCs into STT_FUNCs.
1741         Use st_target_internal to record the branch type.
1742         (elf32_arm_swap_symbol_out): Use st_target_internal to test for
1743         Thumb functions.
1744         (elf32_arm_is_function_type): Delete.
1745         (elf_backend_symbol_processing): Likewise.
1746         (elf_backend_is_function_type): Likewise.
1747
1748 2011-03-14  Richard Sandiford  <[email protected]>
1749
1750         * elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
1751         (elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
1752         into the PLT block.
1753
1754 2011-03-14  Richard Sandiford  <[email protected]>
1755
1756         * elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
1757         may_need_local_target_p and may_become_dynamic_p to classify
1758         the relocation type.  Don't check info->symbolic or h->def_regular
1759         when deciding whether to record a potential dynamic reloc.
1760         Don't treat potential dynamic relocs as PLT references.
1761         (elf32_arm_gc_sweep_hook): Update to match.  Assert that we don't
1762         try to make the PLT reference count go negative.
1763
1764 2011-03-14  Richard Sandiford  <[email protected]>
1765
1766         * elf32-arm.c (elf32_arm_final_link_relocate): Always fill in the
1767         GOT entry here, rather than leaving it to finish_dynamic_symbol.
1768         Only create a dynamic relocation for local references if
1769         info->shared.
1770         (allocate_dynrelocs_for_symbol): Update dynamic relocation
1771         allocation accordingly.
1772         (elf32_arm_finish_dynamic_symbol): Don't initialise the GOT entry here.
1773
1774 2011-03-14  Richard Sandiford  <[email protected]>
1775
1776         * elf32-arm.c (elf32_arm_allocate_dynrelocs): New function.
1777         (elf32_arm_add_dynreloc): Likewise.
1778         (elf32_arm_adjust_dynamic_symbol): Use elf32_arm_allocate_dynrelocs
1779         to allocate dynamic relocations.
1780         (elf32_arm_size_dynamic_sections): Likewise.
1781         (allocate_dynrelocs): Likewise.  Rename to
1782         allocate_dynrelocs_for_symbol.
1783         (elf32_arm_final_link_relocate): Use elf32_arm_add_dynreloc to
1784         create dynamic relocations.
1785         (elf32_arm_finish_dynamic_symbol): Likewise.
1786
1787 2011-03-12  H.J. Lu  <[email protected]>
1788
1789         * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
1790         x32 GD->IE and GD->LE transitions.
1791         (elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE
1792         and LD->LE transitions.
1793
1794 2011-03-10  Alan Modra  <[email protected]>
1795
1796         * elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset
1797         for LO_DS error message and correct multiple.
1798
1799 2011-03-10  Alan Modra  <[email protected]>
1800
1801         * elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define.
1802         (ppc64_elf_link_just_syms): New function.
1803         (opd_entry_value): Don't assume big-endian host.
1804         (get_r2off): New function.
1805         (ppc_build_one_stub, ppc_size_one_stub): Use it here.
1806
1807 2011-03-06  Michael Snyder  <[email protected]>
1808
1809         * compress.c (bfd_compress_section_contents): Check for out of mem.
1810
1811         * elf64-x86-64.c (elf_x86_64_relocate_section): Document
1812         that case statement falls through intentionally.
1813
1814         * elf32-i386.c (elf_i386_relocate_section): Document fall through.
1815
1816 2011-03-04  Alan Modra  <[email protected]>
1817
1818         * archive.c (bsd_write_armap): Don't call stat in deterministic
1819         mode, and don't use st_mtime if stat returns error.
1820
1821 2011-03-03  Michael Snyder  <[email protected]>
1822
1823         * elf64-x86-64.c (elf_x86_64_relocate_section): Remove dead code.
1824
1825         * coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error.
1826
1827         * aoutx.h (aout_final_link): Use sizeof int not sizeof int*.
1828         (aout_link_write_other_symbol): Missing break statement.
1829
1830         * dwarf2.c (scan_unit_for_symbols): Stop memory leak.
1831
1832         * archive.c (_bfd_slurp_extended_name_table): Fail if bfd_seek fails.
1833
1834 2011-03-03  H.J. Lu  <[email protected]>
1835
1836         * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
1837         x32 IE->LE transition.
1838         (elf_x86_64_relocate_section): Likewise.
1839
1840 2011-03-02  Bernd Schmidt  <[email protected]>
1841
1842         * elflink.c (is_reloc_section): Remove function.
1843         (get_dynamic_reloc_section_name): Construct string manually.
1844
1845 2011-02-28  Kai Tietz  <[email protected]>
1846
1847         * archive.c (_bfd_find_nested_archive): Use filename_(n)cmp.
1848         (adjust_relative_path): Likewise.
1849         (_bfd_construct_extended_name_table): Likewise.
1850         * corefile.c (generic_core_file_matches_executable_p): Likewise.
1851         * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
1852         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1853         * elf32-spu.c (sort_bfds): Likewise.
1854         (spu_elf_auto_overlay): Likewise.
1855         * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
1856         * xcofflink.c (xcoff_set_import_path): Likewise.
1857         * xtensa-isa.c (xtensa_regfile_lookup): Likewise.
1858         (xtensa_regfile_lookup_shortname): Likewise.
1859
1860 2011-02-28  Alan Modra  <[email protected]>
1861
1862         PR 12513
1863         * archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and
1864         stringsize.  Properly sanity check symdef_count.  Remove redundant
1865         bfd_release.
1866
1867 2011-02-25  Rafael Ávila de Espíndola <[email protected]>
1868
1869         * plugin.c (bfd_plugin_object_p): Correctly set the filesize
1870         and handle claim_file seeking. Only try to load the plugin once.
1871
1872 2011-02-22  Andreas Schwab  <[email protected]>
1873
1874         * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
1875         relocation read the value from the second GOT slot.
1876
1877 2011-02-15  Tristan Gingold  <[email protected]>
1878
1879         * vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
1880
1881 2011-02-15  Alan Modra  <[email protected]>
1882
1883         * elf64-ppc.c (ppc64_elf_edit_toc): Reinstate second read of
1884         toc relocs.  Fuss over free(NULL).
1885
1886 2011-02-14  Mike Frysinger  <[email protected]>
1887
1888         * elflink.c (bfd_elf_size_dynamic_sections): Add
1889         bfd_get_symbol_leading_char to the start of newname.
1890
1891 2011-02-13  Ralf Wildenhues  <[email protected]>
1892
1893         * configure: Regenerate.
1894
1895 2011-02-09  Alan Modra  <[email protected]>
1896
1897         * elf64-ppc.c (ppc64_elf_edit_toc): Don't free toc relocs until
1898         we are done.  When optimising large toc, check that a global
1899         symbol on a toc reloc is defined in a kept section.
1900
1901 2011-02-08  Nick Clifton  <[email protected]>
1902
1903         PR binutils/12467
1904         * elf.c (assign_file_positions_for_load_sections): Set the program
1905         header offset and entry size to zero if there are no program
1906         headers.
1907
1908 2011-02-08  Alan Modra  <[email protected]>
1909
1910         * elf64-ppc.c (ppc64_elf_edit_toc): Don't segfault on NULL
1911         local_syms when looking for local symbols in .toc.
1912
1913 2011-02-01  Alan Modra  <[email protected]>
1914
1915         * elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value
1916         for toc pointer on any section having makes_toc_func_call set.
1917         (check_pasted_section): Ensure pasted .init/.fini fragments use
1918         the same toc if any has makes_toc_func_call set.
1919
1920 2011-01-28  Joseph Myers  <[email protected]>
1921
1922         * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
1923         field.
1924
1925 2011-01-22  Richard Sandiford  <[email protected]>
1926
1927         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
1928         common sections too.
1929
1930 2011-01-18  H.J. Lu  <[email protected]>
1931
1932         * elf64-x86-64.c (elf_backend_want_plt_sym): Redefine to 0 after
1933         Solaris target.
1934
1935 2011-01-18  Pierre Muller  <[email protected]>
1936
1937         Fix compilation for mingw64.
1938         * coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate
1939         typecast to avoid warning.
1940         * elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type
1941         usage.
1942         * elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead
1943         of long for pointer to avoid warning.
1944         (elfNN_ia64_relax_brl): Idem.
1945         (elfNN_ia64_install_value): Idem.
1946         * vms-alpha.c (_bfd_vms_slurp_etir): Idem.
1947
1948 2011-01-17  Richard Sandiford  <[email protected]>
1949
1950         * elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than
1951         h->needs_plt when deciding whether to record a possible dynamic reloc.
1952
1953 2011-01-17  Richard Sandiford  <[email protected]>
1954
1955         * elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
1956         dynamic relocs for the removed section.
1957
1958 2011-01-15  H.J. Lu  <[email protected]>
1959
1960         * elf64-x86-64.c (elf_x86_64_check_relocs): Check invalid x32
1961         relocations.
1962
1963 2011-01-14  H.J. Lu  <[email protected]>
1964
1965         * elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type.
1966         (elf_x86_64_link_hash_table_create): Set pointer_r_type.
1967         (elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64
1968         for ILP32.  Remove ABI_64_P PIC check for R_X86_64_8,
1969         R_X86_64_16, R_X86_64_32 and R_X86_64_32S.
1970         (elf_x86_64_relocate_section):  Handle R_X86_64_32 like R_X86_64_64
1971         for ILP32.
1972
1973 2011-01-14  Alan Modra  <[email protected]>
1974
1975         * bfd.c (bfd_perror): Flush stdout before and stderr after printing
1976         error.
1977         (_bfd_default_error_handler): Likewise.
1978         * elf.c (print_segment_map): Likewise.
1979         * libbfd.c (warn_deprecated): Likewise.
1980         * som.c (som_sizeof_headers): No need to do so here.
1981         * coff-i860.c: Replace use of printf for error messages with
1982         _bfd_error_handler.
1983         * coff-ppc.c: Likewise.
1984         * coff-sh.c: Likewise.
1985         * elf32-bfin.c: Likewise.
1986         * elf32-dlx.c: Likewise.
1987         * elf32-mep.c: Likewise.
1988         * elf32-v850.c: Likewise.
1989         * mach-o.c: Likewise.
1990         * pef.c: Likewise.
1991
1992 2011-01-13  H.J. Lu  <[email protected]>
1993
1994         * elf64-x86-64.c (elf_x86_64_link_hash_table): Remove
1995         swap_reloca_out.
1996         (elf_x86_64_link_hash_table_create): Don't set swap_reloca_out.
1997         (elf_x86_64_check_relocs): Align relocation section to 4 byte
1998         for 32bit.
1999         (elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with
2000         ELF_ST_TYPE.
2001         (elf_x86_64_finish_dynamic_symbol): Updated.
2002         (elf_x86_64_finish_dynamic_sections): Don't use
2003         Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor
2004         bfd_elf64_swap_dyn_out.
2005
2006 2011-01-14  J. Park  <[email protected]>
2007
2008         PR ld/12339
2009         * elf32-arm.c (allocate_dynrelocs): Don't set up eh before
2010         following bfd_link_hash_warning symbol link.
2011
2012 2011-01-10  Nathan Sidwell  <[email protected]>
2013             Glauber de Oliveira Costa  <[email protected]>
2014
2015         * reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL,
2016         BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ,
2017         BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New
2018         relocations.
2019         * libbfd.h: Rebuilt.
2020         * bfd-in2.h: Rebuilt.
2021         * elf32-arm.c (elf32_arm_howto_table_1): Add new relocations.
2022         (elf32_arm_reloc_map): Likewise.
2023         (tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates.
2024         (elf32_arm_stub_long_branch_any_tls_pic,
2025         elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates.
2026         (DEF_STUBS): Add new stubs.
2027         (struct_elf_arm_obj_data): Add local_tlsdesc_gotent field.
2028         (elf32_arm_local_tlsdesc_gotent): New.
2029         (GOT_TLS_GDESC): New mask.
2030         (GOT_TLS_GD_ANY): Define.
2031         (struct elf32_arm_link_hash_entry): Add tlsdesc_got field.
2032         (elf32_arm_compute_jump_table_size): New.
2033         (struct elf32_arm_link_hash_table): Add next_tls_desc_index,
2034         num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline,
2035         sgotplt_jump_table_size fields.
2036         (elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field.
2037         (elf32_arm_link_hash_table_create): Initialize new fields.
2038         (arm_type_of_stub): Check TLS desc relocs too.
2039         (elf32_arm_stub_name): TLS desc relocs can be shared.
2040         (elf32_arm_tls_transition): Determine relaxation.
2041         (arm_stub_required_alignment): Add tls stubs.
2042         (elf32_arm_size_stubs): Likewise.
2043         (elf32_arm_tls_relax): Perform TLS relaxing.
2044         (elf32_arm_final_link_relocate): Process TLS DESC relocations.
2045         (IS_ARM_TLS_GNU_RELOC): New.
2046         (IS_ARM_TLS_RELOC): Use it.
2047         (elf32_arm_relocate_section): Perform TLS relaxing.
2048         (elf32_arm_check_relocs): Anticipate TLS relaxing, process tls
2049         desc relocations.
2050         (allocate_dynrelocs): Allocate tls desc relcoations.
2051         (elf32_arm_output_arch_local_syms): Emit tls trampoline mapping
2052         symbols.
2053         (elf32_arm_size_dynamic_sections): Allocate tls trampolines and
2054         got slots.
2055         (elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE
2056         symbol.
2057         (elf32_arm_finish_dynamic_symbol): Adjust.
2058         (arm_put_trampoline): New.
2059         (elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls
2060         trampolines.
2061         (elf_backend_always_size_sections): Define.
2062
2063 2011-01-06  H.J. Lu  <[email protected]>
2064
2065         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Optimized.
2066
2067 2011-01-06  H.J. Lu  <[email protected]>
2068
2069         PR ld/12366
2070         PR ld/12371
2071         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
2072         handle symbols marked with regular reference, but not non-GOT
2073         reference when building shared library.
2074
2075         * elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
2076         local and global STT_GNU_IFUNC symols when building shared
2077         library.
2078         * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
2079
2080 2011-01-05  DJ Delorie  <[email protected]>
2081
2082         * reloc.c: Add BFD_RELOC_RX_OP_NEG.
2083         * libbfd.h: Regenerate.
2084         * bfd-in2.h: Regenerate.
2085         * elf32-rx.c: Add it to the list, corresponding to R_RX_OPneg.
2086
2087 2011-01-03  H.J. Lu  <[email protected]>
2088
2089         * cpu-i386.c (bfd_i386_compatible): New.
2090         (bfd_x64_32_arch_intel_syntax): Replace bfd_default_compatible
2091         with bfd_i386_compatible.
2092         (bfd_x86_64_arch_intel_syntax): Likewise.
2093         (bfd_i386_arch_intel_syntax): Likewise.
2094         (i8086_arch): Likewise.
2095         (bfd_x64_32_arch): Likewise.
2096         (bfd_x86_64_arch): Likewise.
2097         (bfd_i386_arch): Likewise.
2098
2099 For older changes see ChangeLog-2010
2100 \f
2101 Local Variables:
2102 mode: change-log
2103 left-margin: 8
2104 fill-column: 74
2105 version-control: never
2106 End:
This page took 0.142758 seconds and 4 git commands to generate.