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