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