1 2011-10-21 H.J. Lu <hongjiu.lu@intel.com>
4 * elf32-i386.c (elf_i386_relocate_section): Replace
5 R_386_IRELATIVE with R_386_RELATIVE.
7 * elf64-x86-64.c (elf_x86_64_relocate_section): Replace
8 R_X86_64_IRELATIVE with R_X86_64_RELATIVE.
10 2011-10-21 H.J. Lu <hongjiu.lu@intel.com>.
12 * elf32-i386.c (elf_i386_relocate_section): Fix a typo in
14 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
16 2011-10-21 H.J. Lu <hongjiu.lu@intel.com>
19 * elf32-i386.c (elf_i386_link_hash_table): Add next_jump_slot_index
20 and next_irelative_index.
21 (elf_i386_link_hash_table_create): Initialize next_jump_slot_index
22 and next_irelative_index.
23 (elf_i386_allocate_dynrelocs): Increment reloc_count instead of
25 (elf_i386_size_dynamic_sections): Set next_tls_desc_index and
26 next_irelative_index from reloc_count.
27 (elf_i386_finish_dynamic_symbol): Put R_386_IRELATIVE after
30 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
31 next_jump_slot_index and next_irelative_index.
32 (elf_x86_64_link_hash_table_create): Initialize
33 next_jump_slot_index and next_irelative_index.
34 (elf_x86_64_size_dynamic_sections): Set next_irelative_index
36 (elf_x86_64_finish_dynamic_symbol): Put R_X86_64_IRELATIVE after
39 2011-10-20 Nick Clifton <nickc@redhat.com>
42 * elf32-arm.c (STUB_SUFFIX): Avoid collision with user namespace
44 * elf64-ppc.c (STUB_SUFFIX): Likewise.
45 * elf32-hppa.c (STUB_SUFFIX): Likewise.
47 2011-10-20 Alan Modra <amodra@gmail.com>
49 * elf32-i386.c (i386_opcode16): Delete.
50 (elf_i386_check_tls_transition): Use memcmp to compare contents.
51 * elf64-x86-64.c (x86_64_opcode16, x86_64_opcode32): Delete.
52 (elf_x86_64_check_tls_transition): Use memcmp to compare contents.
54 2011-10-19 Alan Modra <amodra@gmail.com>
57 * elflink.c (_bfd_elf_gc_mark_rsec): Set symbol "mark".
58 (elf_gc_sweep_symbol): Don't test plt/got refcounts, instead test
59 "mark". Hide undefweak too. Clear def_regular and ref_regular.
60 * elf-m10300.c (mn10300_elf_relocate_section): Ignore unresolved
61 reloc errors from garbage-collected code.
62 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
63 * elf32-bfin.c (bfin_relocate_section): Likewise.
64 (bfinfdpic_relocate_section): Likewise.
65 * elf32-cris.c (cris_elf_relocate_section): Likewise.
66 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
67 * elf32-i386.c (elf_i386_relocate_section): Likewise.
68 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
69 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
70 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
71 * elf32-s390.c (elf_s390_relocate_section): Likewise.
72 * elf32-sh.c (sh_elf_relocate_section): Likewise.
73 * elf32-spu.c (spu_elf_relocate_section): Likewise.
74 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
75 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
76 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
77 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
78 * elf64-s390.c (elf_s390_relocate_section): Likewise.
79 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
80 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
81 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
82 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
84 2011-10-19 Alan Modra <amodra@gmail.com>
87 * elflink.c (elf_link_output_extsym): Correct test for warning when
88 forced local executable syms are referenced from shared libraries.
90 2011-10-19 Alan Modra <amodra@gmail.com>
93 * elflink.c (bfd_elf_final_link): Emit error_textrel error.
95 2011-10-18 David S. Miller <davem@davemloft.net>
98 * elfxx-sparc.c (sparc_elf_find_reloc_at_ofs): New function.
99 (_bfd_sparc_elf_relocate_section): Always move the __tls_get_addr
100 call delay slot instruction forward 4 bytes when performing
103 2011-10-17 Alan Modra <amodra@gmail.com>
107 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Apply 2011-09-15
108 and 2011-09-29 bfd_elf_gc_mark_dynamic_ref_symbol changes here too.
110 2011-10-14 Hans-Peter Nilsson <hp@axis.com>
112 * elf32-cris.c (cris_elf_gc_sweep_hook) <R_CRIS_16_GOTPLT>
113 <R_CRIS_32_GOTPLT>: Fix missing update of gotplt refcount for
115 <R_CRIS_8, R_CRIS_16, R_CRIS_32>: New cases for similar missing
116 updates of the plt refcount.
117 (elf_cris_adjust_gotplt_to_got): Assert integrity of the gotplt
118 refcount in relation to the plt refcount.
120 2011-10-13 Richard Sandiford <richard.sandiford@linaro.org>
122 * elf32-arm.c (elf32_arm_final_link_relocate): Mark PLT calls via
125 2011-10-11 Alan Modra <amodra@gmail.com>
128 * archive.c (bfd_generic_archive_p): Only check first element
129 when target_defaulted.
130 (_bfd_construct_extended_name_table): Use ar_maxnamelen.
131 (_bfd_archive_bsd44_construct_extended_name_table): Likewise.
133 2011-10-11 Alan Modra <amodra@gmail.com>
136 * archive.c (_bfd_find_nested_archive, _bfd_get_elt_at_filepos): Open
137 thin archive element using container target if not defaulted.
139 2011-10-10 Nick Clifton <nickc@redhat.com>
141 * po/es.po: Updated Spanish translation.
142 * po/fi.po: Updated Finnish translation.
143 * po/fr.po: Updated French translation.
144 * po/ru.po: Updated Russian translation.
146 2011-10-10 Alan Modra <amodra@gmail.com>
148 * elf64-ppc.c (ppc64_elf_howto_table): Add R_PPC64_TOCSAVE entry.
149 (struct ppc_link_hash_table): Add tocsave_htab.
150 (struct tocsave_entry): New.
151 (tocsave_htab_hash, tocsave_htab_eq, tocsave_find): New functions.
152 (ppc64_elf_link_hash_table_create): Create tocsave_htab..
153 (ppc64_elf_link_hash_table_free): ..and delete it.
154 (build_plt_stub): Always put STD_R2_40R1 first.
155 (ppc64_elf_size_stubs): Check for R_PPC64_TOCSAVE following reloc
156 on plt call. If present add prologue nop location to tocsave_htab.
157 (ppc64_elf_relocate_section): Convert prologue nop to std. Skip
158 first insn of plt call stub when R_PPC64_TOCSAVE present.
160 2011-10-08 H.J. Lu <hongjiu.lu@intel.com>
163 * elflink.c (elf_link_add_object_symbols): Preserve the maximum
164 alignment and size for common symbols.
166 2011-10-08 Alan Modra <amodra@gmail.com>
170 * elflink.c (elf_link_add_object_symbols): Don't make IR symbols
173 2011-10-08 Alan Modra <amodra@gmail.com>
176 * elflink.c (elf_link_output_extsym): Strip defined plugin symbols
177 even when strip_discarded is false.
179 2011-10-05 Kai Tietz <ktietz@redhat.com>
181 * coffgen.c (coff_write_alien_symbol): Don't write
182 symbol for discarded sections, if strip_discarded isn't
183 explicit set to false.
184 (coff_write_native_symbol): Likewise.
186 2011-10-05 DJ Delorie <dj@redhat.com>
187 Nick Clifton <nickc@redhat.com>
189 * elf32-rx.c: Add support for PID mode.
190 (rx_elf_relocate_section): Add checks for unsafe PID relocations.
191 Include addend in R_RX_SYM relocations.
193 2011-09-30 Tristan Gingold <gingold@adacore.com>
195 * dwarf2.c (struct dwarf2_debug): Add field debug_sections.
196 (read_section): Add sec argument. Adjust the code to get section
198 (read_indirect_string): Adjust call to read_section.
199 (read_abbrevs): Ditto.
200 (decode_line_info): Ditto.
201 (read_debug_ranges): Ditto.
202 (DWARF2_DEBUG_INFO, DWARF2_COMPRESSED_DEBUG_INFO): Remove.
203 (find_debug_info): Add debug_sections parameter. Use it instead
205 (place_sections): Get section names from stash.
206 (find_line): Add debug_sections argument. Initialize
207 debug_sections field of stash from it.
208 Adjust calls to find_debug_info.
209 (_bfd_dwarf2_find_nearest_line): Add debug_sections argument.
210 Adjust call to find_line.
211 (_bfd_dwarf2_find_line): Adjust call to find_line.
212 * libcoff-in.h (struct dwarf_debug_section): New declaration.
213 (coff_find_nearest_line_with_names): Likewise.
214 * libcoff.h: Regenerate.
215 * libbfd-in.h (struct dwarf_debug_section): Move declaration.
216 (dwarf_debug_sections): Likewise.
217 (_bfd_dwarf2_find_nearest_line): Add debug_sections argument.
218 * libbfd.h: Regenerate.
219 * elf.c (_bfd_elf_find_nearest_line): Adjust call to
220 _bfd_dwarf2_find_nearest_line.
221 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Ditto.
222 * elf64-alpha.c (elf64_alpha_find_nearest_line): Ditto.
223 * elf32-arm.c (elf32_arm_find_nearest_line): Ditto.
224 * coffgen.c (coff_find_nearest_line_with_names): New function.
225 (coff_find_nearest_line): Calls coff_find_nearest_line_with_names.
226 * coff-rs6000.c (xcoff_debug_sections): New constant.
227 (xcoff_find_nearest_line): New function.
228 (rs6000coff_vec): Use xcoff_find_nearest_line.
229 (pmac_xcoff_vec): Ditto.
231 2011-09-30 Alan Modra <amodra@gmail.com>
234 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add ha_relocs_not_using_r2.
235 (ppc64_elf_edit_toc): Check HA relocs.
236 (ha_reloc_match): Delete function.
237 (ppc64_elf_relocate_section): Remove delayed HA nop optimization.
238 Instead do it and low part optimization based on
239 ha_relocs_not_using_r2.
241 2011-09-29 Alan Modra <amodra@gmail.com>
244 * elflink.c (_bfd_elf_gc_mark_extra_sections): Mark single member
245 debug and special section groups.
247 2011-09-29 H.J. Lu <hongjiu.lu@intel.com>
250 * elflink.c (_bfd_elf_merge_symbol): Don't set dynamic_def when
251 clearing def_dynamic.
252 (elf_link_add_object_symbols): Likewise. Set dynamic_def when
254 (bfd_elf_gc_mark_dynamic_ref_symbol): Check if a symbol is
257 2011-09-27 Kai Tietz <ktietz@redhat.com>
259 * coffcode.h (sec_to_styp_flags): Handle
260 SEC_LINK_DUPLICATES_SAME_CONTENTS, and
261 SEC_LINK_DUPLICATES_SAME_SIZE.
263 2011-09-22 Tristan Gingold <gingold@adacore.com>
265 * configure.in: Bump version to 2.22.51
266 * configure: Regenerate.
268 2011-09-21 David S. Miller <davem@davemloft.net>
270 * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): New.
271 * elfxx-sparc.h: Declare it.
272 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Call it.
273 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
275 2011-09-21 Tristan Gingold <gingold@adacore.com>
277 * mach-o.c (bfd_mach_o_convert_section_name_to_bfd): Add comment.
278 Deals with size limited strings.
279 (bfd_mach_o_build_commands): Initialize more fields.
281 2011-09-15 H.J. Lu <hongjiu.lu@intel.com>
284 * elflink.c (elf_gc_sweep_symbol): Also hide symbols without PLT
287 2011-09-15 H.J. Lu <hongjiu.lu@intel.com>
290 * bfd-in.h (bfd_elf_size_dynamic_sections): Remove pointer
291 to struct bfd_elf_version_tree.
293 * elflink.c (elf_info_failed): Remove verdefs.
294 (_bfd_elf_export_symbol): Updated.
295 _bfd_elf_link_assign_sym_version): Likewise.
296 (bfd_elf_size_dynamic_sections): Remove pointer to struct
297 bfd_elf_version_tree. Updated.
298 (bfd_elf_gc_mark_dynamic_ref_symbol): Check if a symbol is hidden
301 * linker.c (bfd_hide_sym_by_version): New.
303 * bfd-in2.h: Regenerated.
305 2011-09-12 H.J. Lu <hongjiu.lu@intel.com>
308 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Use .got.plt
309 if there are no GOT relocations.
311 2011-09-09 Kai Tietz <ktietz@redhat.com>
313 * peicode.h (pe_ILF_build_a_bfd): Don't remove leading underscore
314 for targets without symbol_leading_char.
316 2011-09-08 Bernd Jendrissek <bernd.jendrissek@gmail.com>
318 * bfdwin.c (bfd_get_file_window): Fix memory leak.
320 2011-09-07 Alan Modra <amodra@gmail.com>
323 * bfd/elf64-ppc.c (adjust_toc_syms): Ensure ppc64_elf_howto_table
326 2011-09-06 Alan Modra <amodra@gmail.com>
329 * elf64-ppc.c (adjust_toc_syms): Delete redundant code.
330 (ppc64_elf_edit_toc): Fix style nit. Report some details
331 on linker failure due to reference in debug or non-alloc
332 sections to optimized away toc entry, and don't abort.
334 2011-09-01 Christophe Lyon <christophe.lyon@st.com>
336 * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip excluded
339 2011-08-26 Nick Clifton <nickc@redhat.com>
341 * po/es.po: Updated Spanish translation.
343 2011-08-19 Alan Modra <amodra@gmail.com>
345 * elf64-ppc.c (ppc64_elf_edit_toc): Ignore can_optimize bit if
346 we haven't seen expected -mcmodel=medium/large code relocs.
348 2011-08-18 Tristan Gingold <gingold@adacore.com>
350 * mach-o.c (bfd_mach_o_read_segment): Initialize list.
352 2011-08-17 Tristan Gingold <gingold@adacore.com>
354 * mach-o.c (bfd_mach_o_write_section_32): Fix typo.
356 2011-08-17 Alan Modra <amodra@gmail.com>
359 * bfd-in.h (struct bfd_section_already_linked): Forward declare.
360 (_bfd_handle_already_linked): Declare.
361 * coff-alpha.c (_bfd_ecoff_section_already_linked): Define as
362 _bfd_coff_section_already_linked.
363 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
364 * coffcode.h (coff_section_already_linked): Likewise.
365 * cofflink.c (coff_link_add_symbols): Revert 2011-07-09 changes.
366 * elf-bfd.h: Likewise.
367 * libbfd-in.h: Likewise.
368 * targets.c: Likewise.
369 * linker.c (bfd_section_already_linked): Likewise.
370 (bfd_section_already_linked_table_lookup): Likewise.
371 (bfd_section_already_linked_table_insert): Likewise.
372 (_bfd_generic_section_already_linked): Likewise. Call
373 _bfd_handle_already_linked.
374 (_bfd_handle_already_linked): New function, split out from..
375 * elflink.c (_bfd_elf_section_already_linked): ..here. Revert
376 2011-07-09 changes. Avoid unnecessary strcmp when matching
377 already_linked_list entries. Match plugin linkonce section.
378 (section_signature): Delete.
379 * coffgen.c (_bfd_coff_section_already_linked): New function.
380 * libcoff-in.h (_bfd_coff_section_already_linked): Declare.
381 * libbfd.h: Regenerate.
382 * libcoff.h: Regenerate.
383 * bfd-in2.h: Regenerate.
385 2011-08-14 Alan Modra <amodra@gmail.com>
387 * elf32-ppc.c (ppc_elf_select_plt_layout): Force bss-plt when
388 shared and call to _mcount will go via plt.
390 2011-08-14 Alan Modra <amodra@gmail.com>
392 * elf64-ppc.c: Prefix all einfo error strings with "%P: ".
393 * elf32-ppc.c: Likewise.
394 (ppc_elf_select_plt_layout): Use einfo rather than info to report
397 2011-08-12 H.J. Lu <hongjiu.lu@intel.com>
400 * elf64-x86-64.c (x86_64_elf_howto_table): Add R_X86_64_RELATIVE64.
401 (elf_x86_64_relocate_section): Treat R_X86_64_64 like R_X86_64_32
402 and zero-extend it to 64bit if addend is zero for x32. Generate
403 R_X86_64_RELATIVE64 for x32.
405 2011-08-09 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
407 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
408 * bfd-in2.h (bfd_elf32_arm_set_target_relocs): Likewise.
409 * elf32-arm.c (elf32_arm_link_hash_table): New field.
410 (elf232_arm_link_hash_table_create): Initialise new field.
411 (check_use_blx): Change test depending on fix_arm1176.
412 (bfd_elf32_arm_set_target_relocs): Set fix_arm1176 from
413 command line options.
415 2011-08-08 Tristan Gingold <gingold@adacore.com>
417 * mach-o.c (struct mach_o_segment_name_xlat): Add comments.
418 (segsec_names_xlat): Reorder elements.
419 (bfd_mach_o_read_section_32): Fix typo.
420 (bfd_mach_o_read_section_64): Fix typo.
422 2011-08-08 Tristan Gingold <gingold@adacore.com>
424 * mach-o.h (BFD_MACH_O_SEGNAME_SIZE): New macro.
425 (BFD_MACH_O_SECTNAME_SIZE): Ditto.
426 (bfd_mach_o_section): Use them. Add next field.
427 (bfd_mach_o_segment_command): Replace sections array by
428 sect_head and sect_tail.
429 (bfd_mach_o_get_mach_o_section): New macro.
430 (bfd_mach_o_lookup_section): Remove.
431 (bfd_mach_o_new_section_hook): New function.
432 * mach-o.c (bfd_mach_o_normalize_section_name): Use strncmp
434 (bfd_mach_o_convert_section_name_to_bfd): Replaces section
435 parameter with segname and sectname parameters. Adjust.
436 (bfd_mach_o_append_section_to_segment): New function. Use a
437 linked list for Mach-O sections.
438 (bfd_mach_o_write_segment_32): Adjust.
439 (bfd_mach_o_write_segment_64): Ditto.
440 (bfd_mach_o_build_commands): Fix comment. Adjust.
441 (bfd_mach_o_flatten_sections): Adjust.
442 (bfd_mach_o_print_section_map): Adjust.
443 (bfd_mach_o_set_section_flags_from_bfd): Ditto.
444 (bfd_mach_o_new_section_hook): New function.
445 (bfd_mach_o_init_section_from_mach_o): Ditto.
446 (bfd_mach_o_read_section_32): Remove section parameter.
447 Return a section instead.
448 (bfd_mach_o_read_section_64): Ditto.
449 (bfd_mach_o_read_section): Ditto.
450 (bfd_mach_o_make_bfd_section): Adjust.
451 (bfd_mach_o_read_segment): Adjust for new profile of
452 bfd_mach_o_read_section.
453 (bfd_mach_o_lookup_section): Remove.
454 * mach-o-target.c (bfd_mach_o_new_section_hook): Remove.
456 2011-08-08 Tristan Gingold <gingold@adacore.com>
458 * mach-o.h (bfd_mach_o_version_min_command): New structure.
459 (bfd_mach_o_load_command): Add version_min.
460 (mach_o_data_struct): Fix comment.
461 * mach-o.c (bfd_mach_o_read_version_min): New function.
462 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_FUNCTION_STARTS,
463 BFD_MACH_O_LC_VERSION_MIN_MACOSX and
464 BFD_MACH_O_LC_VERSION_MIN_IPHONEOS.
465 (bfd_mach_o_get_name_or_null): New function.
466 (bfd_mach_o_get_name): Use the above new one.
467 (bfd_mach_o_load_command_name): Add the above new commands.
468 (bfd_mach_o_bfd_print_private_bfd_data): Display numerically
469 unknown commands. Handle BFD_MACH_O_LC_FUNCTION_STARTS,
470 BFD_MACH_O_LC_VERSION_MIN_MACOSX and
471 BFD_MACH_O_LC_VERSION_MIN_IPHONEOS.
473 2011-08-08 Tristan Gingold <gingold@adacore.com>
475 * mach-o.h: Move size macros to external.h
476 Move reloc macros to reloc.h and x86-64.h.
477 * mach-o-i386.c: Includes mach-o/reloc.h
478 * mach-o-x86-64.c: Ditto and includes mach-o/x86-64.h
479 * mach-o.c: Add includes.
480 (bfd_mach_o_write_header): Use structure from external.h to convert.
481 (bfd_mach_o_write_thread): Ditto.
482 (bfd_mach_o_write_relocs): Ditto.
483 (bfd_mach_o_write_section_32): Ditto.
484 (bfd_mach_o_write_section_64): Ditto.
485 (bfd_mach_o_write_segment_32): Ditto.
486 (bfd_mach_o_write_segment_64): Ditto.
487 (bfd_mach_o_write_symtab): Ditto.
488 (bfd_mach_o_write_contents): Ditto.
489 (bfd_mach_o_read_header): Ditto.
490 (bfd_mach_o_read_section_32): Ditto.
491 (bfd_mach_o_read_section_64): Ditto.
492 (bfd_mach_o_read_symtab_symbol): Ditto.
493 (bfd_mach_o_read_dylinker): Ditto.
494 (bfd_mach_o_read_dylib): Ditto.
495 (bfd_mach_o_read_dysymtab): Ditto.
496 (bfd_mach_o_read_symtab): Ditto.
497 (bfd_mach_o_read_linkedit): Ditto.
498 (bfd_mach_o_read_str): Ditto.
499 (bfd_mach_o_read_dyld_info): Ditto.
500 (bfd_mach_o_read_segment): Ditto.
501 (bfd_mach_o_read_command): Ditto.
502 (bfd_mach_o_archive_p): Ditto.
503 (bfd_mach_o_canonicalize_one_reloc): Ditto. Change the BUF parameter.
504 (bfd_mach_o_canonicalize_relocs): Adjust to call the above function.
505 (bfd_mach_o_read_dysymtab_symbol): Rename BUF variable.
506 (bfd_mach_o_read_uuid): Remove useless cast. Use a macro instead
507 of an hard-coded value.
509 2011-08-08 Tristan Gingold <gingold@adacore.com>
511 * mach-o-x86-64.c (bfd_mach_o_x86_64_mkobject): Fix cut-and-past typos.
512 (bfd_mach_o_x86_64_swap_reloc_out): Handle BFD_RELOC_32_PCREL,
513 BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64 and
514 BFD_RELOC_MACH_O_X86_64_GOT_LOAD. Share common code.
516 2011-08-08 Tristan Gingold <gingold@adacore.com>
518 * mach-o.c (bfd_mach_o_normalize_section_name): New function.
519 (bfd_mach_o_convert_section_name_to_bfd): Use it.
520 (bfd_mach_o_get_section_type_from_name): New function.
521 (bfd_mach_o_get_section_attribute_from_name): Ditto.
522 * mach-o.h (bfd_mach_o_section): Move bfdsection field at the end.
523 Add comments. Add prototypes for the above new functions.
525 2011-08-05 Mark Kettenis <kettenis@gnu.org>
527 * netbsd-core.c (netbsd_core_vec): Init match_priority field.
529 2011-08-05 Alan Modra <amodra@gmail.com>
531 * elf64-ppc.c (maybe_strip_output): New function.
532 (ppc64_elf_size_stubs): Use it to strip .branch_lt and .eh_frame.
534 2011-08-05 Alan Modra <amodra@gmail.com>
537 * elflink.c (_bfd_elf_section_already_linked): Return matched
538 status. Remove COFF comdat section handling.
539 * linker.c (_bfd_generic_section_already_linked): Return matched
540 status. Don't set SEC_GROUP in l_flags for plugin entries.
541 (bfd_section_already_linked): Update prototype.
542 * targets.c (_section_already_linked): Likewise.
543 * elf-bfd.h (_bfd_elf_section_already_linked): Likewise.
544 * libbfd-in.h (_bfd_generic_section_already_linked): Likewise.
545 (_bfd_nolink_section_already_linked): Update.
546 * libbfd.h: Regenerate.
547 * bfd-in2.h: Regenerate.
549 2011-08-05 Alan Modra <amodra@gmail.com>
551 * elf32-ppc.c: Include dwarf2.h.
552 (struct ppc_elf_link_hash_table): Add glink_eh_frame.
553 (ppc_elf_create_glink): Create .eh_frame section.
554 (glink_eh_frame_cie): New array.
555 (ppc_elf_size_dynamic_sections): Size glink_eh_frame.
556 (ppc_elf_finish_dynamic_sections): Write glink_eh_frame.
558 2011-08-04 Tristan Gingold <gingold@adacore.com>
560 * vms-alpha.c (_bfd_vms_write_eeom): Round vms_linkage_index.
561 (_bfd_vms_write_etir): Initialize vms_linkage_index to 0.
563 2011-08-03 Tristan Gingold <gingold@adacore.com>
565 * mach-o.c (bfd_mach_o_canonicalize_symtab): Handle no symbols case.
566 (bfd_mach_o_read_symtab_symbols): Return if no symbols.
568 2011-08-02 Maciej W. Rozycki <macro@codesourcery.com>
570 * elfxx-mips.c (check_4byte_branch): Remove function.
571 (check_relocated_bzc): New function.
572 (_bfd_mips_elf_relax_section): Permit the relaxation of LUI
573 instructions that immediately follow a compact branch
576 2011-08-02 Alan Modra <amodra@gmail.com>
578 * elf64-ppc.c (build_plt_stub): Correct emitted relocs when no
580 (ppc_build_one_stub): Adjust get_relocs call to suit..
581 (ppc_size_one_stub): ..and reloc sizing. Correct plt size corner case.
583 2011-08-01 H.J. Lu <hongjiu.lu@intel.com>
586 * archures.c (bfd_mach_i386_intel_syntax): New.
587 (bfd_mach_i386_i8086): Updated.
588 (bfd_mach_i386_i386): Likewise.
589 (bfd_mach_x86_64): Likewise.
590 (bfd_mach_x64_32): Likewise.
591 (bfd_mach_i386_i386_intel_syntax): Likewise.
592 (bfd_mach_x86_64_intel_syntax): Likewise.
593 (bfd_mach_x64_32_intel_syntax): Likewise.
594 (bfd_mach_l1om): Likewise.
595 (bfd_mach_l1om_intel_syntax): Likewise.
596 (bfd_mach_k1om): Likewise.
597 (bfd_mach_k1om_intel_syntax): Likewise.
599 * bfd-in2.h: Regenerated.
601 * cpu-i386.c (bfd_i386_compatible): Check mach instead of
603 (bfd_x64_32_arch_intel_syntax): Set bits_per_address to 64.
604 (bfd_x64_32_arch): Likewise.
606 * elf64-x86-64.c: Include "libiberty.h".
607 (x86_64_elf_howto_table): Append x32 R_X86_64_32.
608 (elf_x86_64_rtype_to_howto): Support x32 R_X86_64_32.
609 (elf_x86_64_reloc_type_lookup): Likewise.
610 (elf_x86_64_reloc_name_lookup): Likewise.
611 (elf_x86_64_relocate_section): Likewise.
612 (elf_x86_64_check_relocs): Allow R_X86_64_64 relocations for x32.
614 2011-07-29 Maciej W. Rozycki <macro@codesourcery.com>
616 * elfxx-mips.c (check_br32): Fix return type.
618 2011-07-29 Maciej W. Rozycki <macro@codesourcery.com>
620 * elfxx-mips.c (bz_insn_16): Correct opcode mask.
622 2011-07-29 Maciej W. Rozycki <macro@codesourcery.com>
624 * elfxx-mips.c: Adjust comments throughout.
625 (mips_elf_relax_delete_bytes): Reshape code.
626 (_bfd_mips_elf_relax_section): Remove check for
627 R_MICROMIPS_GPREL16 relocations. Reshape code.
629 2011-07-28 Roland McGrath <mcgrathr@google.com>
631 * elf32-i386.c (NACL_PLT_ENTRY_SIZE, NACLMASK): New macros.
632 (elf_i386_nacl_plt0_entry): New variable.
633 (elf_i386_plt_entry): New variable.
634 (elf_i386_nacl_pic_plt0_entry): New variable.
635 (elf_i386_nacl_pic_plt_entry): New variable.
636 (elf_i386_nacl_plt, elf_i386_nacl_arch_bed): New variables.
637 (elf_backend_arch_data): New macro setting for elf_i386_nacl_vec stanza.
638 (elf_backend_plt_alignment): Likewise.
640 * config.bfd: Handle i[3-7]86-*-nacl*.
641 * elf32-i386.c (bfd_elf32_i386_nacl_vec): New backend vector stanza.
642 * targets.c: Support bfd_elf32_i386_nacl_vec.
643 * configure.in: Likewise.
644 * configure: Regenerated.
646 * elf32-i386.c (struct elf_i386_plt_layout): New type.
647 (GET_PLT_ENTRY_SIZE): New macro.
648 (elf_i386_plt): New variable.
649 (struct elf_i386_backend_data): New member `plt'.
650 (elf_i386_arch_bed): Add initializer for it.
651 (elf_i386_vxworks_arch_bed): Likewise.
652 (elf_i386_allocate_dynrelocs): Use GET_PLT_ENTRY_SIZE.
653 (elf_i386_plt_sym_val): Likewise.
654 (elf_i386_relocate_section): Likewise.
655 (elf_i386_finish_dynamic_symbol): Likewise.
656 Also use other elf_i386_plt_layout members for PLT details.
657 (elf_i386_finish_dynamic_sections): Likewise.
659 * elf32-i386.c (struct elf_i386_backend_data): New type.
660 (get_elf_i386_backend_data): New macro.
661 (elf_i386_arch_bed): New variable.
662 (elf_backend_arch_data): New macro.
663 (struct elf_i386_link_hash_table): Remove plt0_pad_byte and is_vxworks.
664 (elf_i386_link_hash_table_create): Don't initialize them.
665 (elf_i386_create_dynamic_sections): Find is_vxworks flags in
666 elf_i386_backend_data, not elf_i386_link_hash_table.
667 (elf_i386_adjust_dynamic_symbol): Likewise.
668 (elf_i386_allocate_dynrelocs): Likewise.
669 (elf_i386_readonly_dynrelocs): Likewise.
670 (elf_i386_size_dynamic_sections): Likewise.
671 (elf_i386_relocate_section): Likewise.
672 (elf_i386_finish_dynamic_symbol): Likewise.
673 (elf_i386_finish_dynamic_sections): Likewise. Same for plt0_pad_byte.
674 (elf_i386_vxworks_link_hash_table_create): Function removed.
675 (elf_i386_vxworks_arch_bed): New variable.
676 (elf_backend_arch_data): New macro in elf32-i386-vxworks stanza.
678 * elf-bfd.h (elf_backend_data): New member arch_backend_data.
679 * elfxx-target.h (elf_backend_arch_data): New macro.
680 (elfNN_bed): Use it as initializer for the new member.
682 2011-07-28 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
684 * elf64-hppa.c (elf_hppa_final_link_relocate): Fix handling of out
687 2011-07-26 Jakub Jelinek <jakub@redhat.com>
689 * dwarf2.c (dwarf_debug_sections): Add .debug_macro
690 and .zdebug_macro entry.
691 (dwarf_debug_section_enum): Add debug_macro.
693 2011-07-26 Alan Modra <amodra@gmail.com>
695 * elf64-ppc.c: Include dwarf2.h.
696 (struct ppc_link_hash_table): Add glink_eh_frame.
697 (create_linkage_sections): Create .eh_frame section.
698 (ppc64_elf_size_dynamic_sections): Arrange to drop unneeded
700 (glink_eh_frame_cie): New array.
701 (ppc64_elf_size_stubs): Size glink_eh_frame.
702 (ppc64_elf_build_stubs): Init glink_eh_frame contents.
703 (ppc64_elf_finish_dynamic_sections): Write glink_eh_frame.
705 2011-07-25 Hans-Peter Nilsson <hp@bitrange.com>
708 * elf64-mmix.c (struct _mmix_elf_section_data): New members
709 has_warned_bpo and has_warned_pushj.
710 (mmix_final_link_relocate): Remove PARAMS and PTR macros,
711 converting to ISO C. Add new parameter error_message. All
713 (mmix_elf_perform_relocation): Ditto.
714 <case R_MMIX_PUSHJ_STUBBABLE, case R_MMIX_BASE_PLUS_OFFSET>:
715 Handle the case where mmix_elf_check_common_relocs has not been
716 called, missing preparations for relocs of the respective type.
718 2011-07-24 Chao-ying Fu <fu@mips.com>
719 Ilie Garbacea <ilie@mips.com>
720 Maciej W. Rozycki <macro@codesourcery.com>
721 Joseph Myers <joseph@codesourcery.com>
722 Catherine Moore <clm@codesourcery.com>
723 Richard Sandiford <rdsandiford@googlemail.com>
725 * archures.c (bfd_mach_mips_micromips): New macro.
726 * cpu-mips.c (I_micromips): New enum value.
727 (arch_info_struct): Add bfd_mach_mips_micromips.
728 * elfxx-mips.h (_bfd_mips_elf_is_target_special_symbol): New
730 (_bfd_mips_elf_relax_section): Likewise.
731 (_bfd_mips16_elf_reloc_unshuffle): Rename to...
732 (_bfd_mips_elf_reloc_unshuffle): ... this. Handle microMIPS
734 (_bfd_mips16_elf_reloc_shuffle): Rename to...
735 (_bfd_mips_elf_reloc_shuffle): ... this. Handle microMIPS ASE.
736 (gprel16_reloc_p): Handle microMIPS ASE.
737 (literal_reloc_p): New function.
738 * elf32-mips.c (elf_micromips_howto_table_rel): New variable.
739 (_bfd_mips_elf32_gprel16_reloc): Handle microMIPS ASE.
740 (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
741 and _bfd_mips_elf_reloc_shuffle changes.
742 (mips_elf_gprel32_reloc): Update comment.
743 (micromips_reloc_map): New variable.
744 (bfd_elf32_bfd_reloc_type_lookup): Handle microMIPS ASE.
745 (mips_elf32_rtype_to_howto): Likewise.
746 (mips_info_to_howto_rel): Likewise.
747 (bfd_elf32_bfd_is_target_special_symbol): Define.
748 (bfd_elf32_bfd_relax_section): Likewise.
749 * elf64-mips.c (micromips_elf64_howto_table_rel): New variable.
750 (micromips_elf64_howto_table_rela): Likewise.
751 (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
752 and _bfd_mips_elf_reloc_shuffle changes.
753 (micromips_reloc_map): Likewise.
754 (bfd_elf64_bfd_reloc_type_lookup): Handle microMIPS ASE.
755 (bfd_elf64_bfd_reloc_name_lookup): Likewise.
756 (mips_elf64_rtype_to_howto): Likewise.
757 (bfd_elf64_bfd_is_target_special_symbol): Define.
758 * elfn32-mips.c (elf_micromips_howto_table_rel): New variable.
759 (elf_micromips_howto_table_rela): Likewise.
760 (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
761 and _bfd_mips_elf_reloc_shuffle changes.
762 (micromips_reloc_map): Likewise.
763 (bfd_elf32_bfd_reloc_type_lookup): Handle microMIPS ASE.
764 (bfd_elf32_bfd_reloc_name_lookup): Likewise.
765 (mips_elf_n32_rtype_to_howto): Likewise.
766 (bfd_elf32_bfd_is_target_special_symbol): Define.
767 * elfxx-mips.c (LA25_LUI_MICROMIPS_1): New macro.
768 (LA25_LUI_MICROMIPS_2): Likewise.
769 (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise.
770 (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise.
771 (TLS_RELOC_P): Handle microMIPS ASE.
772 (mips_elf_create_stub_symbol): Adjust value of stub symbol if
773 target is a microMIPS function.
774 (micromips_reloc_p): New function.
775 (micromips_reloc_shuffle_p): Likewise.
776 (got16_reloc_p, call16_reloc_p): Handle microMIPS ASE.
777 (got_disp_reloc_p, got_page_reloc_p): New functions.
778 (got_ofst_reloc_p): Likewise.
779 (got_hi16_reloc_p, got_lo16_reloc_p): Likewise.
780 (call_hi16_reloc_p, call_lo16_reloc_p): Likewise.
781 (hi16_reloc_p, lo16_reloc_p, jal_reloc_p): Handle microMIPS ASE.
782 (micromips_branch_reloc_p): New function.
783 (tls_gd_reloc_p, tls_ldm_reloc_p): Likewise.
784 (tls_gottprel_reloc_p): Likewise.
785 (_bfd_mips16_elf_reloc_unshuffle): Rename to...
786 (_bfd_mips_elf_reloc_unshuffle): ... this. Handle microMIPS
788 (_bfd_mips16_elf_reloc_shuffle): Rename to...
789 (_bfd_mips_elf_reloc_shuffle): ... this. Handle microMIPS ASE.
790 (_bfd_mips_elf_lo16_reloc): Handle microMIPS ASE.
791 (mips_tls_got_index, mips_elf_got_page): Likewise.
792 (mips_elf_create_local_got_entry): Likewise.
793 (mips_elf_relocation_needs_la25_stub): Likewise.
794 (mips_elf_calculate_relocation): Likewise.
795 (mips_elf_perform_relocation): Likewise.
796 (_bfd_mips_elf_symbol_processing): Likewise.
797 (_bfd_mips_elf_add_symbol_hook): Likewise.
798 (_bfd_mips_elf_link_output_symbol_hook): Likewise.
799 (mips_elf_add_lo16_rel_addend): Likewise.
800 (_bfd_mips_elf_check_relocs): Likewise.
801 (mips_elf_adjust_addend): Likewise.
802 (_bfd_mips_elf_relocate_section): Likewise.
803 (mips_elf_create_la25_stub): Likewise.
804 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
805 (_bfd_mips_elf_gc_sweep_hook): Likewise.
806 (_bfd_mips_elf_is_target_special_symbol): New function.
807 (mips_elf_relax_delete_bytes): Likewise.
808 (opcode_descriptor): New structure.
810 (OP32_SREG, OP32_TREG, OP16_VALID_REG): Likewise.
811 (b_insns_32, bc_insn_32, bz_insn_32, bzal_insn_32): New variables.
812 (beq_insn_32): Likewise.
813 (b_insn_16, bz_insn_16): New variables.
814 (BZC32_REG_FIELD): New macro.
815 (bz_rs_insns_32, bz_rt_insns_32): New variables.
816 (bzc_insns_32, bz_insns_16):Likewise.
817 (BZ16_REG, BZ16_REG_FIELD): New macros.
818 (jal_insn_32_bd16, jal_insn_32_bd32): New variables.
819 (jal_x_insn_32_bd32): Likewise.
820 (j_insn_32, jalr_insn_32): Likewise.
821 (ds_insns_32_bd16, ds_insns_32_bd32): Likewise.
822 (jalr_insn_16_bd16, jalr_insn_16_bd32, jr_insn_16): Likewise.
823 (JR16_REG): New macro.
824 (ds_insns_16_bd16): New variable.
825 (lui_insn): Likewise.
826 (addiu_insn, addiupc_insn): Likewise.
827 (ADDIUPC_REG_FIELD): New macro.
828 (MOVE32_RD, MOVE32_RS): Likewise.
829 (MOVE16_RD_FIELD, MOVE16_RS_FIELD): Likewise.
830 (move_insns_32, move_insns_16): New variables.
831 (nop_insn_32, nop_insn_16): Likewise.
833 (find_match): New function.
834 (check_br16_dslot, check_br32_dslot): Likewise.
835 (check_br16, check_br32): Likewise.
836 (IS_BITSIZE): New macro.
837 (check_4byte_branch): New function.
838 (_bfd_mips_elf_relax_section): Likewise.
839 (_bfd_mips_elf_merge_private_bfd_data): Disallow linking MIPS16
840 and microMIPS modules together.
841 (_bfd_mips_elf_print_private_bfd_data): Handle microMIPS ASE.
842 * reloc.c (BFD_RELOC_MICROMIPS_7_PCREL_S1): New relocation.
843 (BFD_RELOC_MICROMIPS_10_PCREL_S1): Likewise.
844 (BFD_RELOC_MICROMIPS_16_PCREL_S1): Likewise.
845 (BFD_RELOC_MICROMIPS_GPREL16): Likewise.
846 (BFD_RELOC_MICROMIPS_JMP, BFD_RELOC_MICROMIPS_HI16): Likewise.
847 (BFD_RELOC_MICROMIPS_HI16_S): Likewise.
848 (BFD_RELOC_MICROMIPS_LO16): Likewise.
849 (BFD_RELOC_MICROMIPS_LITERAL): Likewise.
850 (BFD_RELOC_MICROMIPS_GOT16): Likewise.
851 (BFD_RELOC_MICROMIPS_CALL16): Likewise.
852 (BFD_RELOC_MICROMIPS_GOT_HI16): Likewise.
853 (BFD_RELOC_MICROMIPS_GOT_LO16): Likewise.
854 (BFD_RELOC_MICROMIPS_CALL_HI16): Likewise.
855 (BFD_RELOC_MICROMIPS_CALL_LO16): Likewise.
856 (BFD_RELOC_MICROMIPS_SUB): Likewise.
857 (BFD_RELOC_MICROMIPS_GOT_PAGE): Likewise.
858 (BFD_RELOC_MICROMIPS_GOT_OFST): Likewise.
859 (BFD_RELOC_MICROMIPS_GOT_DISP): Likewise.
860 (BFD_RELOC_MICROMIPS_HIGHEST): Likewise.
861 (BFD_RELOC_MICROMIPS_HIGHER): Likewise.
862 (BFD_RELOC_MICROMIPS_SCN_DISP): Likewise.
863 (BFD_RELOC_MICROMIPS_JALR): Likewise.
864 (BFD_RELOC_MICROMIPS_TLS_GD): Likewise.
865 (BFD_RELOC_MICROMIPS_TLS_LDM): Likewise.
866 (BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16): Likewise.
867 (BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16): Likewise.
868 (BFD_RELOC_MICROMIPS_TLS_GOTTPREL): Likewise.
869 (BFD_RELOC_MICROMIPS_TLS_TPREL_HI16): Likewise.
870 (BFD_RELOC_MICROMIPS_TLS_TPREL_LO16): Likewise.
871 * bfd-in2.h: Regenerate.
872 * libbfd.h: Regenerate.
874 2011-07-22 H.J. Lu <hongjiu.lu@intel.com>
876 * Makefile.am (ALL_MACHINES): Add cpu-k1om.lo.
877 (ALL_MACHINES_CFILES): Add cpu-k1om.c.
878 * Makefile.in: Regenerated.
880 * archures.c (bfd_architecture): Add bfd_arch_k1om.
881 (bfd_k1om_arch): New.
882 (bfd_archures_list): Add &bfd_k1om_arch.
883 * bfd-in2.h: Regenerated.
885 * config.bfd (targ64_selvecs): Add bfd_elf64_k1om_vec if
886 bfd_elf64_x86_64_vec is supported. Add bfd_elf64_k1om_freebsd_vec
887 if bfd_elf64_x86_64_freebsd_vec is supported.
888 (targ_selvecs): Likewise.
890 * configure.in: Support bfd_elf64_k1om_vec and
891 bfd_elf64_k1om_freebsd_vec.
892 * configure: Regenerated.
896 * elf64-x86-64.c (elf64_k1om_elf_object_p): New.
897 (bfd_elf64_k1om_vec): Likewise.
898 (bfd_elf64_k1om_freebsd_vec): Likewise.
900 * targets.c (bfd_elf64_k1om_vec): New.
901 (bfd_elf64_k1om_freebsd_vec): Likewise.
902 (_bfd_target_vector): Add bfd_elf64_k1om_vec and
903 bfd_elf64_k1om_freebsd_vec.
905 2011-07-20 Jan Kratochvil <jan.kratochvil@redhat.com>
907 Fix false coff-go32-exe matches.
908 * coff-i386.c (TARGET_SYM) <_bfd_check_format>: Conditionally use
910 * coff-stgo32.c (go32_check_format): New forward declaration.
911 (COFF_CHECK_FORMAT): New defintion.
912 (go32_check_format): New function.
914 2011-07-15 Alan Modra <amodra@gmail.com>
916 * configure.in: Bump version.
917 * configure: Regenerate.
919 2011-07-14 Alan Modra <amodra@gmail.com>
921 * linker.c (_bfd_generic_section_already_linked): Set l_flags.
922 * elf-bfd.h (struct already_linked): Forward declare.
924 2011-07-14 Alan Modra <amodra@gmail.com>
926 * elflink.c (_bfd_elf_fix_symbol_flags): Loop on indirect syms.
927 (_bfd_elf_adjust_dynamic_symbol): Remove FIXME.
929 2011-07-14 Alan Modra <amodra@gmail.com>
931 * elf64-ppc.c (struct ppc_link_hash_table): Add plt_static_chain.
932 (build_plt_stub): Add plt_static_chain param, don't load r11 if false.
933 (build_tls_get_addr_stub): Likewise.
934 (ppc_build_one_stub): Update calls to above.
935 (ppc_size_one_stub): Adjust stub size.
936 (ppc64_elf_size_stubs): Add plt_static_chain param, save to htab.
937 * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
939 2011-07-12 Nick Clifton <nickc@redhat.com>
941 * elf32-arm.c (elf32_arm_section_flags): Delete.
942 (elf_backend_section_flags): Remove.
944 2011-07-11 H.J. Lu <hongjiu.lu@intel.com>
947 * elflink.c (bfd_elf_size_dynamic_sections): Also skip BFD_PLUGIN
948 when setting stack_flags.
950 2011-07-11 Catherine Moore <clm@codesourcery.com>
952 * aout-adobe.c (aout_32_bfd_lookup_section_flags): New definition.
953 * aout-target.h (MY_bfd_lookup_section_flags): New definition.
954 * aout-tic30.c (MY_bfd_lookup_section_flags): New definition.
955 * bfd-in2.h: Regenerated.
956 * bfd.c (bfd_lookup_section_flags): New definition.
957 * binary.c (binary_bfd_lookup_section_flags): New definition.
958 * bout.c (b_out_bfd_lookup_section_flags): New definition.
959 * coff-alpha.c (_bfd_ecoff_bfd_lookup_section_flags): New definition.
960 * coff-mips.c (_bfd_ecoff_bfd_lookup_section_flags): New definition.
961 * coff-rs6000.c (rs6000coff_vec): Include
962 bfd_generic_lookup_section_flags.
963 (pmac_xcoff_vec): Likewise.
964 * coffcode.h (coff_bfd_lookup_section_flags): New definition.
965 * coff64-rs6000.c (rs6000coff64_vec): Include
966 bfd_generic_lookup_section_flags.
967 (aix5coff64_vec): Likewise.
968 * ecoff.c (bfd_debug_section): Initialize flag_info field.
969 * elf-bfd.h (elf_backend_lookup_section_flags_hook): Declare.
970 (bfd_elf_lookup_section_flags): Declare.
971 * elflink.c (bfd_elf_lookup_section_flags): New function.
972 * elfxx-target.h (bfd_elfNN_bfd_lookup_section_flags): Define.
973 (elf_backend_lookup_section_flags_hook): Define.
974 (elf_backend_data): Add elf_backend_lookup_section_flags_hook.
975 * i386msdos.c (msdos_bfd_lookup_section_flags): New define.
976 * i386os9k.c (os9k_bfd_lookup_section_flags): New define.
977 * ieee.c (ieee_bfd_lookup_section_flags): New define.
978 * ihex.c (ihex_bfd_lookup_section_flags): New define.
979 * libbfd-in.h (_bfd_nolink_bfd_lookup_section_flags): Declare.
980 (bfd_generic_lookup_section_flags): Declare.
981 * libbfd.h: Regenerated.
982 * mach-o-target.c (bfd_mach_o_bfd_lookup_section_flags): New.
983 * mmo.c (mmo_bfd_lookup_section_flags): New definition.
984 * nlm-target.h (nlm_bfd_lookup_section_flags): New definition.
985 * oasys.c (oasys_bfd_lookup_section_flags): New definition.
986 * pef.c (bfd_pef_bfd_lookup_section_flags): New definition.
987 * plugin.c (bfd_plugin_bfd_lookup_section_flags): New definition.
988 * ppcboot.c (ppcboot_bfd_lookup_section_flags): New definition.
989 * reloc.c (bfd_generic_lookup_section_flags): New function.
990 * som.c (som_bfd_lookup_section_flags): New definition.
991 * srec.c (srec_bfd_lookup_section_flags): New definition.
992 * targets.c (flag_info): Declare.
993 (NAME##_bfd_lookup_section_flags): Add to LINK jump table.
994 (_bfd_lookup_section_flags): New.
995 * tekhex.c (tekhex_bfd_lookup_section_flags): New definition.
996 * versados.c (versados_bfd_lookup_section_flags): New definition.
997 * vms-alpha.c (alpha_vms_bfd_lookup_section_flag): New definition.
998 * xsym.c (bfd_sym_bfd_lookup_section_flags): New definition.
1000 2011-07-11 H.J. Lu <hongjiu.lu@intel.com>
1003 * elfnn-ia64.c (count_dyn_reloc): Fix a typo.
1005 2011-07-09 Alan Modra <amodra@gmail.com>
1008 * elflink.c (elf_link_add_object_symbols): Use elf_discarded_section
1009 rather than kept_section to determine whether a symbol is from
1010 a discarded section.
1011 * cofflink.c (coff_link_add_symbols): Make symbols from discarded
1012 sections appear undefined.
1014 2011-07-09 H.J. Lu <hongjiu.lu@intel.com>
1017 * elf-bfd.h (_bfd_elf_section_already_linked): Replace
1018 "asection *" with "struct already_linked *".
1019 * libbfd-in.h (_bfd_nolink_section_already_linked): Likewise.
1020 (_bfd_generic_section_already_linked): Likewise.
1021 (bfd_section_already_linked_table_insert): Likewise.
1022 (struct already_linked): New.
1023 (struct bfd_section_already_linked): Use it.
1024 * elflink.c (_bfd_elf_section_already_linked): Replace.
1025 "asection *" with "struct already_linked *". Replace the plugin
1026 dummy with the LTO output.
1027 * linker.c (_bfd_generic_section_already_linked): Likewise.
1028 * targets.c (struct already_linked): Add forward declaration.
1029 (bfd_target): Replace "struct bfd_section *" with
1030 "struct already_linked *" in _section_already_linked.
1031 * bfd-in2.h: Regenerate.
1032 * libbfd.h: Regenerate.
1034 2011-07-06 Tristan Gingold <gingold@adacore.com>
1036 * mach-o.h: Move loader related definitions to
1037 include/mach-o/loader.h. Include it.
1039 2011-07-05 H.J. Lu <hongjiu.lu@intel.com>
1041 * elf64-x86-64.c (elf_backend_post_process_headers): Always
1042 define to _bfd_elf_set_osabi.
1044 2011-07-03 Samuel Thibault <samuel.thibault@gnu.org>
1045 Thomas Schwinge <thomas@schwinge.name>
1048 * elf.c (_bfd_elf_set_osabi): Use ELFOSABI_GNU name instead of
1049 ELFOSABI_LINUX alias.
1050 * elf32-hppa.c: Likewise.
1051 * elf32-i370.c: Likewise.
1052 * elf64-hppa.c: Likewise.
1054 2011-07-01 Ian Lance Taylor <iant@google.com>
1056 * elf32-i386.c (elf_i386_eh_frame_plt): Correct expression: change
1057 DW_OP_lit3 to DW_OP_lit2.
1059 2011-07-01 Alan Modra <amodra@gmail.com>
1061 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't look at
1062 dyn relocs when called to copy flags for a weak sym.
1063 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1064 (ppc64_elf_merge_private_bfd_data): Delete.
1065 (bfd_elf64_bfd_merge_private_bfd_data): Define as
1066 _bfd_generic_verify_endian_match.
1068 2011-06-30 Bernd Schmidt <bernds@codesourcery.com>
1070 * bfd/elf32-tic6x.c (elf32_tic6x_set_osabi): Also set it if
1073 2011-06-28 Tristan Gingold <gingold@adacore.com>
1075 * vms-alpha.c (vms_private_data_struct): Make vms_linkage_index
1077 (_bfd_vms_write_etir): Write linkage index from reloc.
1079 2011-06-28 Fawzi Mohamed <fawzi.mohamed@nokia.com>
1081 * mach-o.c (bfd_mach_o_read_command): Also ignore
1082 BFD_MACH_O_LC_ROUTINES_64.
1084 2011-06-27 Tristan Gingold <gingold@adacore.com>
1086 * vms-alpha.c (_bfd_vms_write_etir): Use 'section' to get current
1087 section target index.
1089 2011-06-27 Nick Clifton <nickc@redhat.com>
1091 * cisco-core.c (cisco_core_little_vec): Add initialization of
1092 match_priority field.
1094 2011-06-27 Tristan Gingold <gingold@adacore.com>
1096 * cache.c: Include bfd_stdint.h.
1097 (cache_bmmap): Change profile. Return region start and size.
1098 * bfdio.c (struct bfd_iovec): Change bmmap profile.
1099 (bfd_mmap): Change profile and adjust. Update comment.
1100 (memory_bmmap): Change profile.
1101 * opncls.c (opncls_bmmap): Change profile.
1102 * vms-lib.c (vms_lib_bmmap): Likewise.
1103 * libbfd.h: Regenerate.
1104 * bfd-in2.h: Regenerate.
1106 2011-06-27 Tristan Gingold <gingold@adacore.com>
1108 * vms-misc.c (vms_time_to_time_t): Adjust overflow detection.
1111 2011-06-25 H.J. Lu <hongjiu.lu@intel.com>
1113 * elf64-x86-64.c (elf_backend_post_process_headers): Don't
1114 define for FreeBSD/x86-64 nor FreeBSD/L1OM. Define for L1OM.
1116 2011-06-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1118 * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Initialize
1120 * elf32-i386.c (elf_i386_link_hash_table): Likewise.
1122 2011-06-24 Richard Henderson <rth@redhat.com>
1125 * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Recover the
1126 tlsgd insn before swapping adjacent insns.
1128 2011-06-24 Tristan Gingold <gingold@adacore.com>
1130 * vms-alpha.c (alpha_vms_slurp_relocs): Add a guard for relocs in the
1133 2011-06-24 Alan Modra <amodra@gmail.com>
1136 * elf.c (assign_file_positions_for_load_sections): Don't align
1137 sh_offset for all SHT_NOBITS sections here, just .tbss sections
1138 that don't get a PT_LOAD.
1140 2011-06-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1142 * elf32-sh.c (sh_elf_relocate_section): Allow R_SH_TLS_LE_32 for PIE.
1143 (sh_elf_check_relocs): Likewise.
1145 2011-06-22 Richard Henderson <rth@redhat.com>
1147 * elf64-alpha.c (elf64_alpha_check_relocs): No dynamic reloc for
1148 TPREL in a PIE image.
1149 (alpha_dynamic_entries_for_reloc): Likewise.
1150 (elf64_alpha_relocate_section): Allow TPREL in PIE images.
1151 (elf64_alpha_relax_got_load): Likewise.
1153 2011-06-22 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
1155 * elf32-arm.c (elf32_arm_final_link_relocate): Allow R_ARM_TLS_LE32
1158 2011-06-22 Alan Modra <amodra@gmail.com>
1160 * elflink.c (_bfd_elf_merge_symbol): Allow type changes for
1161 plugin symbols. Fix segfault on linker scrip defined syms.
1163 2011-06-20 Jakub Jelinek <jakub@redhat.com>
1166 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Allow no relocations
1167 at all for linker created .eh_frame sections.
1168 (_bfd_elf_discard_section_eh_frame): Handle linker created
1169 .eh_frame sections with no relocations.
1170 * elf64-x86-64.c: Include dwarf2.h.
1171 (elf_x86_64_eh_frame_plt): New variable.
1172 (PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
1173 PLT_FDE_LEN_OFFSET): Define.
1174 (struct elf_x86_64_link_hash_table): Add plt_eh_frame field.
1175 (elf_x86_64_create_dynamic_sections): Create and fill in
1176 .eh_frame section for .plt section.
1177 (elf_x86_64_size_dynamic_sections): Write .plt section size
1178 into .eh_frame FDE covering .plt section.
1179 (elf_x86_64_finish_dynamic_sections): Write .plt section
1180 start into .eh_frame FDE covering .plt section. Call
1181 _bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
1182 (elf_backend_plt_alignment): Define to 4.
1183 * elf32-i386.c: Include dwarf2.h.
1184 (elf_i386_eh_frame_plt): New variable.
1185 (PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
1186 PLT_FDE_LEN_OFFSET): Define.
1187 (struct elf_i386_link_hash_table): Add plt_eh_frame field.
1188 (elf_i386_create_dynamic_sections): Create and fill in
1189 .eh_frame section for .plt section.
1190 (elf_i386_size_dynamic_sections): Write .plt section size
1191 into .eh_frame FDE covering .plt section.
1192 (elf_i386_finish_dynamic_sections): Write .plt section
1193 start into .eh_frame FDE covering .plt section. Call
1194 _bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
1195 (elf_backend_plt_alignment): Define to 4.
1197 2011-06-19 H.J. Lu <hongjiu.lu@intel.com>
1199 * elf64-x86-64.c (elf_backend_post_process_headers): Defined
1202 2011-06-16 H.J. Lu <hongjiu.lu@intel.com>
1204 * elf64-x86-64.c: Include <stdarg.h> and CORE_HEADER if
1205 CORE_HEADER is defined.
1206 (elf_x86_64_write_core_note): New.
1207 (elf_backend_write_core_note): Likewise.
1209 * hosts/x86-64linux.h (uint64_t): New.
1210 (user_regsx32_struct): Likewise.
1211 (elf_gregx32_t): Likewise.
1212 (ELF_NGREGX32): Likewise.
1213 (elf_gregsetx32_t): Likewise.
1214 (elf_prstatusx32): Likewise.
1215 (prstatusx32_t): Likewise.
1216 (user_fpregs32_struct): Removed.
1217 (user_fpxregs32_struct): Likewise.
1219 (elf_fpregset32_t): Likewise.
1220 (elf_fpxregset32_t): Likewise.
1221 (prgregset32_t): Likewise.
1222 (prfpregset32_t): Likewise.
1224 2011-06-16 H.J. Lu <hongjiu.lu@intel.com>
1226 * elf64-x86-64.c (elf_x86_64_grok_prstatus): Support x32.
1227 (elf_x86_64_grok_psinfo): Likewise.
1229 2011-06-16 Nick Clifton <nickc@redhat.com>
1231 * elf.c (elf_find_function): Fail if not provided with a symbol
1234 2011-06-15 Ulrich Weigand <ulrich.weigand@linaro.org>
1236 * elf-bfd.h (elfcore_write_arm_vfp): Add prototype.
1237 * elf.c (elfcore_grok_arm_vfp): New function.
1238 (elfcore_grok_note): Call it to handle NT_ARM_VFP notes.
1239 (elfcore_write_arm_vfp): New function.
1240 (elfcore_write_register_note): Call it to handle .reg-arm-vfp.
1242 2011-06-14 Richard Henderson <rth@redhat.com>
1244 * elf64-alpha.c (elf64_alpha_copy_indirect_symbol): Rename from
1245 elf64_alpha_merge_ind_symbols; adjust for the generic interface.
1246 (elf64_alpha_always_size_sections): Don't call
1247 elf64_alpha_merge_ind_symbols.
1248 (elf_backend_copy_indirect_symbol): New.
1250 2011-06-14 Alan Modra <amodra@gmail.com>
1253 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Check sec_info_type
1254 before doing anything.
1255 (_bfd_elf_discard_section_eh_frame): Likewise.
1257 2011-06-14 Alan Modra <amodra@gmail.com>
1259 * Makefile.am: Formatting.
1260 * Makefile.in: Regenerate.
1261 * configure.in (bfd_elf64_tilegx_vec): Add elfxx-tilegx.lo.
1262 * po/SRC-POTFILES.in: Regnerate.
1264 2011-06-14 Alan Modra <amodra@gmail.com>
1266 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Don't use PTR.
1267 (allocate_dynrelocs, readonly_dynrelocs): Replace PTR with void *.
1268 Don't handle warning symbols here.
1269 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): As above.
1270 (allocate_dynrelocs, readonly_dynrelocs): As above.
1272 2011-06-14 Alan Modra <amodra@gmail.com>
1275 * elflink.c (_bfd_elf_gc_mark_extra_sections): New function.
1276 (elf_gc_sweep): Don't treat debug and sections like .comment
1278 (bfd_elf_gc_sections): Treat note sections as gc roots only when
1279 not part of a group. Always call gc_mark_extra_sections.
1280 * elf-bfd.h (_bfd_elf_gc_mark_extra_sections): Declare.
1281 * elfxx-target.h (elf_backend_gc_mark_extra_sections): Default to
1282 _bfd_elf_gc_mark_extra_sections.
1283 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Call
1284 _bfd_elf_gc_mark_extra_sections.
1285 * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): Likewise.
1287 2011-06-13 Nick Clifton <nickc@redhat.com>
1289 * elf32-tilepro.c (tilepro_elf_check_relocs): Delete unused local
1290 variable 'local_got_offsets'.
1291 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1292 (tilegx_finish_dyn): Delete unused local variable 'abi_64_p'.
1294 2011-06-13 Walter Lee <walt@tilera.com>
1296 * Makefile.am (ALL_MACHINES): Add cpu-tilegx.lo and cpu-tilepro.lo.
1297 (ALL_MACHINE_CFILES): Add cpu-tilegx.c and cpu-tilepro.c.
1298 (BFD32_BACKENDS): Add elf32-tilegx.lo, elf32-tilepro.lo,
1299 and elfxx-tilegx.lo.
1300 (BFD32_BACKENDS_CFILES): Add elf32-tilegx.c elf32-tilepro.c, and
1302 (BFD64_BACKENDS): Add elf64-tilegx.lo.
1303 (BFD64_BACKENDS_CFILES): Add elf64-tilegx.c.
1304 * Makefile.in: Regenerate.
1305 * arctures.c (bfd_architecture): Define bfd_arch_tilepro,
1306 bfd_arch_tilegx, bfd_mach_tilepro, bfd_mach_tilegx.
1307 (bfd_arch_info): Add bfd_tilegx_arch, bfd_tilepro_arch.
1308 (bfd_archures_list): Add bfd_tilegx_arch, bfd_tilepro_arch.
1309 bfd-in2.h: Regenerate.
1310 * config.bfd: Handle tilegx-*-* and tilepro-*-*.
1311 * configure.in: Handle bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
1312 and bfd_elf64_tilegx_vec.
1313 * configure: Regenerate.
1314 * elf-bfd.h (enum elf_target_id): Define TILEGX_ELF_DATA and
1316 * libbfd.h: Regenerate.
1317 * reloc.c: Add BFD_RELOC_TILEPRO_{COPY, GLOB_DAT, JMP_SLOT,
1318 RELATIVE, BROFF_X1, JOFFLONG_X1, JOFFLONG_X1_PLT, IMM8_X0,
1319 IMM8_Y0, IMM8_X1, IMM8_Y1, DEST_IMM8_X1, MT_IMM15_X1, MF_IMM15_X1,
1320 IMM16_X0, IMM16_X1, IMM16_X0_LO, IMM16_X1_LO, IMM16_X0_HI,
1321 IMM16_X1_HI, IMM16_X0_HA, IMM16_X1_HA, IMM16_X0_PCREL,
1322 IMM16_X1_PCREL, IMM16_X0_LO_PCREL, IMM16_X1_LO_PCREL,
1323 IMM16_X0_HI_PCREL, IMM16_X1_HI_PCREL, IMM16_X0_HA_PCREL,
1324 IMM16_X1_HA_PCREL, IMM16_X0_GOT, IMM16_X1_GOT, IMM16_X0_GOT_LO,
1325 IMM16_X1_GOT_LO, IMM16_X0_GOT_HI, IMM16_X1_GOT_HI,
1326 IMM16_X0_GOT_HA, IMM16_X1_GOT_HA, MMSTART_X0, MMEND_X0,
1327 MMSTART_X1, MMEND_X1, SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1,
1328 IMM16_X0_TLS_GD, IMM16_X1_TLS_GD, IMM16_X0_TLS_GD_LO,
1329 IMM16_X1_TLS_GD_LO, IMM16_X0_TLS_GD_HI, IMM16_X1_TLS_GD_HI,
1330 IMM16_X0_TLS_GD_HA, IMM16_X1_TLS_GD_HA, IMM16_X0_TLS_IE,
1331 IMM16_X1_TLS_IE, IMM16_X0_TLS_IE_LO, IMM16_X1_TLS_IE_LO,
1332 IMM16_X0_TLS_IE_HI, IMM16_X1_TLS_IE_HI, IMM16_X0_TLS_IE_HA,
1333 IMM16_X1_TLS_IE_HA, TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
1334 Add BFD_RELOC_TILEGX_{HW0, HW1, HW2, HW3, HW0_LAST, HW1_LAST,
1335 HW2_LAST, COPY, GLOB_DAT, JMP_SLOT, RELATIVE, BROFF_X1,
1336 JUMPOFF_X1, JUMPOFF_X1_PLT, IMM8_X0, IMM8_Y0, IMM8_X1, IMM8_Y1,
1337 DEST_IMM8_X1, MT_IMM14_X1, MF_IMM14_X1, MMSTART_X0, MMEND_X0,
1338 SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1, IMM16_X0_HW0,
1339 IMM16_X1_HW0, IMM16_X0_HW1, IMM16_X1_HW1, IMM16_X0_HW2,
1340 IMM16_X1_HW2, IMM16_X0_HW3, IMM16_X1_HW3, IMM16_X0_HW0_LAST,
1341 IMM16_X1_HW0_LAST, IMM16_X0_HW1_LAST, IMM16_X1_HW1_LAST,
1342 IMM16_X0_HW2_LAST, IMM16_X1_HW2_LAST, IMM16_X0_HW0_PCREL,
1343 IMM16_X1_HW0_PCREL, IMM16_X0_HW1_PCREL, IMM16_X1_HW1_PCREL,
1344 IMM16_X0_HW2_PCREL, IMM16_X1_HW2_PCREL, IMM16_X0_HW3_PCREL,
1345 IMM16_X1_HW3_PCREL, IMM16_X0_HW0_LAST_PCREL,
1346 IMM16_X1_HW0_LAST_PCREL, IMM16_X0_HW1_LAST_PCREL,
1347 IMM16_X1_HW1_LAST_PCREL, IMM16_X0_HW2_LAST_PCREL,
1348 IMM16_X1_HW2_LAST_PCREL, IMM16_X0_HW0_GOT, IMM16_X1_HW0_GOT,
1349 IMM16_X0_HW1_GOT, IMM16_X1_HW1_GOT, IMM16_X0_HW2_GOT,
1350 IMM16_X1_HW2_GOT, IMM16_X0_HW3_GOT, IMM16_X1_HW3_GOT,
1351 IMM16_X0_HW0_LAST_GOT, IMM16_X1_HW0_LAST_GOT,
1352 IMM16_X0_HW1_LAST_GOT, IMM16_X1_HW1_LAST_GOT,
1353 IMM16_X0_HW2_LAST_GOT, IMM16_X1_HW2_LAST_GOT, IMM16_X0_HW0_TLS_GD,
1354 IMM16_X1_HW0_TLS_GD, IMM16_X0_HW1_TLS_GD, IMM16_X1_HW1_TLS_GD,
1355 IMM16_X0_HW2_TLS_GD, IMM16_X1_HW2_TLS_GD, IMM16_X0_HW3_TLS_GD,
1356 IMM16_X1_HW3_TLS_GD, IMM16_X0_HW0_LAST_TLS_GD,
1357 IMM16_X1_HW0_LAST_TLS_GD, IMM16_X0_HW1_LAST_TLS_GD,
1358 IMM16_X1_HW1_LAST_TLS_GD, IMM16_X0_HW2_LAST_TLS_GD,
1359 IMM16_X1_HW2_LAST_TLS_GD, IMM16_X0_HW0_TLS_IE,
1360 IMM16_X1_HW0_TLS_IE, IMM16_X0_HW1_TLS_IE, IMM16_X1_HW1_TLS_IE,
1361 IMM16_X0_HW2_TLS_IE, IMM16_X1_HW2_TLS_IE, IMM16_X0_HW3_TLS_IE,
1362 IMM16_X1_HW3_TLS_IE, IMM16_X0_HW0_LAST_TLS_IE,
1363 IMM16_X1_HW0_LAST_TLS_IE, IMM16_X0_HW1_LAST_TLS_IE,
1364 IMM16_X1_HW1_LAST_TLS_IE, IMM16_X0_HW2_LAST_TLS_IE,
1365 IMM16_X1_HW2_LAST_TLS_IE, TLS_DTPMOD64, TLS_DTPOFF64, TLS_TPOFF64,
1366 TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
1367 * targets.c (bfd_elf32_tilegx_vec): Declare.
1368 (bfd_elf32_tilepro_vec): Declare.
1369 (bfd_elf64_tilegx_vec): Declare.
1370 (bfd_target_vector): Add bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
1371 and bfd_elf64_tilegx_vec.
1372 * cpu-tilegx.c: New file.
1373 * cpu-tilepro.c: New file.
1374 * elf32-tilepro.h: New file.
1375 * elf32-tilepro.c: New file.
1376 * elf32-tilegx.c: New file.
1377 * elf32-tilegx.h: New file.
1378 * elf64-tilegx.c: New file.
1379 * elf64-tilegx.h: New file.
1380 * elfxx-tilegx.c: New file.
1381 * elfxx-tilegx.h: New file.
1383 2011-06-13 Alan Modra <amodra@gmail.com>
1385 * linker.c (bfd_link_hash_traverse): Follow warning symbol link.
1386 (_bfd_generic_link_write_global_symbol, fix_syms): Don't handle
1387 warning symbols here.
1388 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
1389 * elf32-arm.c (allocate_dynrelocs_for_symbol,
1390 elf32_arm_readonly_dynrelocs): Likewise.
1391 * elf32-bfin.c (bfin_discard_copies): Likewise.
1392 * elf32-cris.c (elf_cris_adjust_gotplt_to_got,
1393 elf_cris_discard_excess_dso_dynamics,
1394 elf_cris_discard_excess_program_dynamics): Likewise.
1395 * elf32-hppa.c (allocate_plt_static, allocate_dynrelocs,
1396 clobber_millicode_symbols, readonly_dynrelocs): Likewise.
1397 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
1398 * elf32-i386.c (elf_i386_allocate_dynrelocs,
1399 elf_i386_readonly_dynrelocs): Likewise.
1400 * elf32-lm32.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1401 * elf32-m32c.c (m32c_relax_plt_check, m32c_relax_plt_realloc): Likewise.
1402 * elf32-m32r.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1403 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
1404 * elf32-microblaze.c (allocate_dynrelocs): Likewise.
1405 * elf32-ppc.c (allocate_dynrelocs, maybe_set_textrel): Likewise.
1406 * elf32-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1407 * elf32-score.c (score_elf_sort_hash_table_f): Likewise.
1408 * elf32-score7.c (score_elf_sort_hash_table_f): Likewise.
1409 * elf32-sh.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1410 * elf32-tic6x.c (elf32_tic6x_allocate_dynrelocs,
1411 elf32_tic6x_readonly_dynrelocs): Likewise.
1412 * elf32-vax.c (elf_vax_discard_copies): Likewise.
1413 * elf32-xstormy16.c (xstormy16_relax_plt_check,
1414 xstormy16_relax_plt_realloc): Likewise.
1415 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Likewise.
1416 * elf64-alpha.c (elf64_alpha_output_extsym,
1417 elf64_alpha_calc_got_offsets_for_symbol,
1418 elf64_alpha_calc_dynrel_sizes, elf64_alpha_size_rela_got_1): Likewise.
1419 * elf64-hppa.c (elf64_hppa_mark_exported_functions,
1420 allocate_global_data_opd, elf64_hppa_mark_milli_and_exported_functions,
1421 elf_hppa_unmark_useless_dynamic_symbols,
1422 elf_hppa_remark_useless_dynamic_symbols): Likewise.
1423 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref, func_desc_adjust,
1424 adjust_opd_syms, adjust_toc_syms, allocate_dynrelocs,
1425 readonly_dynrelocs, merge_global_got, reallocate_got,
1426 undo_symbol_twiddle): Likewise.
1427 * elf64-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1428 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
1429 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs,
1430 elf_x86_64_readonly_dynrelocs): Likewise.
1431 * elflink.c (elf_link_renumber_hash_table_dynsyms,
1432 elf_link_renumber_local_hash_table_dynsyms, _bfd_elf_export_symbol,
1433 _bfd_elf_link_find_version_dependencies,
1434 _bfd_elf_link_assign_sym_version, _bfd_elf_adjust_dynamic_symbol,
1435 _bfd_elf_link_sec_merge_syms, elf_adjust_dynstr_offsets,
1436 elf_collect_hash_codes, elf_collect_gnu_hash_codes,
1437 elf_renumber_gnu_hash_syms, elf_gc_sweep_symbol,
1438 elf_gc_propagate_vtable_entries_used,
1439 elf_gc_smash_unused_vtentry_relocs, bfd_elf_gc_mark_dynamic_ref_symbol,
1440 elf_gc_allocate_got_offsets): Likewise.
1441 * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free,
1442 elfNN_ia64_global_dyn_sym_thunk): Likewise.
1443 * elfxx-mips.c (mips_elf_check_symbols, mips_elf_output_extsym,
1444 mips_elf_sort_hash_table_f, allocate_dynrelocs): Likewise.
1445 * elfxx-sparc.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1446 * i386linux.c (linux_tally_symbols): Likewise.
1447 * m68klinux.c (linux_tally_symbols): Likewise.
1448 * sparclinux.c (linux_tally_symbols): Likewise.
1449 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
1450 * xcofflink.c (xcoff_post_gc_symbol): Likewise.
1452 * elflink.c (elf_link_output_extsym): Make it a bfd_hash_traverse
1453 function. Update all callers.
1454 * aoutx.h (aout_link_write_other_symbol): Likewise.
1455 * pdp11.c (aout_link_write_other_symbol): Likewise.
1456 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1457 * ecoff.c (ecoff_link_write_external): Likewise.
1458 * xcofflink.c (xcoff_write_global_symbol): Likewise.
1459 * vms-alpha.c (alpha_vms_link_output_symbol): Likewise. Handle
1461 * ecoff.c (ecoff_link_hash_traverse): Delete.
1462 * coff-ppc.c (ppc_bfd_coff_final_link): Use bfd_hash_traverse for
1463 _bfd_coff_write_global_sym.
1464 * libcoff-in.h (_bfd_coff_write_global_sym): Update prototype.
1465 * libcoff.h: Regenerate.
1467 2011-06-10 Nick Clifton <nickc@redhat.com>
1469 * elflink.c (_bfd_elf_link_create_dynamic_sections): If the
1470 backend does not provide a function for creating dynamic sections
1472 (bfd_elf_final_link): Issue a warning message if a dynamic section
1473 has the SHT_NOTE type.
1474 (bfd_elf_final_link): Do not look for dynamic strings in a section
1475 that does not have the SHT_STRTAB type or the name .dynstr.
1476 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Fail if the got
1477 section is not in the output binary.
1478 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Likewise.
1480 2011-06-09 Tristan Gingold <gingold@adacore.com>
1482 * elfnn-ia64.c (elfNN_ia64_relax_section, elfNN_ia64_choose_gp)
1483 (elfNN_ia64_relocate_section, elfNN_vms_object_p): Remove trailing
1486 2011-06-09 Tristan Gingold <gingold@adacore.com>
1488 * bfd.c (bfd_get_sign_extend_vma): Handle aixcoff.
1490 2011-06-09 Nick Clifton <nickc@redhat.com>
1493 * elf.c (_bfd_elf_init_private_section_data): Add an assertion
1494 that the output section has an allocated bfd_elf_section_data
1496 * elfxx-mips.c (mips_elf_check_symbols): Do not create a stub for
1497 symbols in sections that have been removed by garbage collection.
1499 2011-06-08 H.J. Lu <hongjiu.lu@intel.com>
1501 * elf64-x86-64.c (elf_x86_64_check_relocs): Allow R_X86_64_64
1502 relocations in SEC_DEBUGGING sections when building shared
1505 2011-06-08 H.J. Lu <hongjiu.lu@intel.com>
1508 * elflink.c (elf_gc_sweep): Don't check SHT_NOTE sections here.
1509 (bfd_elf_gc_sections): Also check SHT_NOTE sections.
1511 2011-06-08 Tristan Gingold <gingold@adacore.com>
1513 * makefile.vms (OBJS): Add elfxx-ia64.obj
1516 2011-06-08 Alan Modra <amodra@gmail.com>
1518 * aix386-core.c, * cisco-core.c, * hpux-core.c, * osf-core.c,
1519 * sco5-core.c: Init match_priority field.
1521 2011-06-08 Alan Modra <amodra@gmail.com>
1523 * elflink.c (_bfd_elf_archive_symbol_lookup): Follow warning and
1524 indirect links here.
1526 2011-06-07 Joel Brobecker <brobecker@adacore.com>
1528 * irix-core.c (irix_core_vec): Add match_priority field.
1530 2011-06-06 Alan Modra <amodra@gmail.com>
1532 * targets.c (bfd_target): Make ar_max_namelen an unsigned char.
1534 * configure.in: Bump bfd version.
1535 * elfcode.h (elf_object_p): Delete hacks preventing match of
1536 EM_NONE and ELFOSABI_NONE targets when a better match exists.
1537 * elfxx-target.h (elf_match_priority): Define and use.
1538 * format.c (bfd_check_format_matches): Use target match_priority
1539 to choose best of multiple matching targets. In cases with multiple
1540 matches rerun _bfd_check_format if we don't choose the last match.
1541 * aout-adobe.c, * aout-arm.c, * aout-target.h, * aout-tic30.c,
1542 * binary.c, * bout.c, * coff-alpha.c, * coff-i386.c, * coff-i860.c,
1543 * coff-i960.c, * coff-ia64.c, * coff-mips.c, * coff-or32.c,
1544 * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic30.c,
1545 * coff-tic54x.c, * coff-x86_64.c, * coff64-rs6000.c, * coffcode.h,
1546 * i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c, * mach-o-target.c,
1547 * mipsbsd.c, * mmo.c, * nlm-target.h, * oasys.c, * pdp11.c,
1548 * pe-mips.c, * pef.c, * plugin.c, * ppcboot.c, * som.c, * srec.c,
1549 * tekhex.c, * trad-core.c, * verilog.c, * versados.c, * vms-alpha.c,
1550 * vms-lib.c, * xsym.c: Init match_priority field.
1551 * configure: Regenerate.
1552 * bfd-in2.h: Regenerate.
1554 2011-06-04 H.J. Lu <hongjiu.lu@intel.com>
1557 * elfcode.h (elf_object_p): Revert the last change.
1559 2011-06-04 Alan Modra <amodra@gmail.com>
1561 * archures.c (bfd_arch_get_compatible): If one arch is unknown,
1562 return the other arch.
1563 * elfcode.h (elf_object_p): Allow explicit match to generic ELF
1566 2011-06-03 Bertram Felgenhauer <bertram.felgenhauer@gmail.com>
1569 * hash.c (higher_primer_number): Add more, small, prime numbers.
1570 (bfd_hash_set_default_size): Likewise.
1572 2011-06-02 Nick Clifton <nickc@redhat.com>
1574 * coff-mcore.c: Fix spelling typo.
1575 * coff-stgo32.c: Likewise.
1576 * elf32-arm.c: Likewise.
1577 * elf32-avr.c: Likewise.
1578 * elf-m68hc1x.c: Likewise.
1579 * elf32-mcore.c: Likewise.
1580 * elf32-mep.c: Likewise.
1581 * elf32-mt.c: Likewise.
1582 * elf32-ppc.c: Likewise.
1583 * elf32-xtensa.c: Likewise.
1584 * elf64-ppc.c: Likewise.
1585 * elfxx-mips.c: Likewise.
1586 * netbsd.h: Likewise.
1587 * nlmcode.h: Likewise.
1588 * vms-alpha.c: Likewise.
1589 * po/bfd.pot: Regenerate.
1590 * po/SRC-POTFILES.in: Regenerate.
1592 2011-06-01 DJ Delorie <dj@redhat.com>
1594 * config.bfd: Add bfd_elf32_rx_be_ns_vec.
1595 * target.c: Likewise.
1596 * configure.in: Likewise.
1597 * configure.in: Regenerate.
1598 * elf32-rx.c: Add elf32-rx-be-ns target.
1599 (rx_elf_object_p): Never allow the be-ns target by default,
1600 only allow it if the user requests it.
1602 2011-06-01 H.J. Lu <hongjiu.lu@intel.com>
1604 * elf32-i386.c (elf_i386_size_dynamic_sections): Properly warn
1605 relocation in readonly section in a shared object.
1606 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
1608 2011-05-31 Nick Clifton <nickc@redhat.com>
1610 * archive.c (adjust_relative_path): Fix comment to prevent it
1611 corrupting the auto-generated bfd.h.
1613 2011-05-31 Paul Brook <paul@codesourcery.com>
1615 * elf32-arm.c (elf32_arm_final_link_relocate): Only do bl conversion
1616 for known functions.
1617 (elf32_arm_swap_symbol_in): Only set ST_BRANCH_TO_ARM for function
1620 2011-05-31 Paul Brook <paul@codesourcery.com>
1622 * elf32-arm.c (arm_stub_is_thumb): Add
1623 arm_stub_long_branch_v4t_thumb_tls_pic.
1624 (elf32_arm_final_link_relocate): TLS stubs are always ARM.
1627 2011-05-27 Nick Clifton <nickc@redhat.com>
1630 * archive.c (_bfd_get_elt_at_filepos): Set correct error value if
1631 unable to read a file pointed to by an entry in a thin archive.
1632 (adjust_relative_path): Use lrealpath to canonicalize paths.
1633 Handle the case where the reference path is above the current
1634 path in the directory tree.
1636 2011-05-26 H.J. Lu <hongjiu.lu@intel.com>
1639 * elf64-x86-64.c (elf_x86_64_relocate_section): Handle
1640 R_X86_64_TPOFF64 in executable.
1642 2011-05-26 Alan Modra <amodra@gmail.com>
1644 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment.
1645 * elflink.c (_bfd_elf_symbol_refs_local_p): Expand
1646 local_protected comment.
1648 2011-05-25 Tristan Gingold <gingold@adacore.com>
1650 * configure.in (bfd_elf32_ia64_big_vec, bfd_elf32_ia64_hpux_big_vec)
1651 (bfd_elf64_ia64_big_vec, bfd_elf64_ia64_hpux_big_vec)
1652 (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_vms_vec): Add elfxx-ia64.lo
1653 * Makefile.am (BFD64_BACKENDS): Add elfxx-ia64.lo
1654 (BFD64_BACKENDS_CFILES): Add elfxx-ia64.c
1655 (elf32-ia64.c): Created from elfnn-ia64.c
1656 (elf64-ia64.c): Likewise.
1657 * elfxx-ia64.h: New file.
1658 * elfxx-ia64.c: Split with elfnn-ia64.c. Keep only the following
1659 functions.Includes elfxx-ia64.h.
1660 (elfNN_ia64_reloc): Renames to ia64_elf_reloc. Adjust error message.
1661 (IA64_HOWTO): Adjust.
1662 (lookup_howto): Renames to ia64_elf_lookup_howto. Make it public.
1663 (elfNN_ia64_reloc_type_lookup): Renames to
1664 ia64_elf_reloc_type_lookup. Make it public. Adjust calls.
1665 (elfNN_ia64_reloc_name_lookup): Renames to
1666 ia64_elf_reloc_name_lookup. Make it public.
1667 (elfNN_ia64_relax_br): Renames to ia64_elf_relax_br. Make it public.
1668 (elfNN_ia64_relax_brl): Renames to ia64_elf_relax_brl. Make it
1670 (elfNN_ia64_relax_ldxmov): Renames to ia64_elf_relax_ldxmov.
1671 Move it and make it public. Move prototype to elfxx-ia64.h
1672 (elfNN_ia64_install_value): Renames to ia64_elf_install_value.
1673 Move prototype to elfxx-ia64.h
1674 * elfnn-ia64.c: New file, split from elfxx-ia64.c.
1675 (elfNN_ia64_info_to_howto): Adjust calls.
1676 (elfNN_ia64_relax_section): Adjust calls.
1677 (count_dyn_reloc): Fix typo.
1678 (elfNN_ia64_relocate_section): Adjust calls.
1679 (elfNN_ia64_finish_dynamic_symbol): Likewise.
1680 (bfd_elfNN_bfd_reloc_type_lookup)
1681 (bfd_elfNN_bfd_reloc_name_lookup): Adjust macros.
1682 * configure: Regenerate.
1683 * Makefile.in: Regenerate.
1685 2011-05-23 DJ Delorie <dj@redhat.com>
1687 * elf32-rx.c (rx_elf_object_p): When reading an RX object in, undo
1688 the vma/lma swapping done in elf32_rx_modify_program_headers.
1690 2011-05-23 Nick Clifton <nickc@redhat.com>
1692 * elf-m10300.c (mn10300_elf_mkobject): New function.
1693 (bfd_elf32_mkobject): Define.
1695 2011-05-23 Alan Modra <amodra@gmail.com>
1697 * elf-bfd.h: Comment typo fix.
1698 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Delete. Replace with
1699 struct elf_dyn_relocs throughout.
1700 * elf64-ppc.c (struct ppc_dyn_relocs): Likewise.
1702 2011-05-23 Alan Modra <amodra@gmail.com>
1704 * elf32-frv.c: Use info->callbacks->einfo throughout file in linker
1705 functions rather than warning callback or _bfd_error_handler.
1706 * elf32-ppc.c: Likewise.
1707 * elf64-ppc.c: Likewise.
1708 * elf32-ppc.c (ppc_elf_tls_optimize): Use %H in __tls_get_addr lost
1710 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
1712 2011-05-23 Alan Modra <amodra@gmail.com>
1715 * elf.c (assign_file_positions_for_load_sections): Set sh_offset for
1716 .tbss, and page align same for all SHT_NOBITS sections.
1718 2011-05-21 Alan Modra <amodra@gmail.com>
1721 * elf.c (_bfd_elf_make_section_from_shdr): Set up TLS section LMAs
1723 (_bfd_elf_map_sections_to_segments): Don't create a final PT_LOAD
1724 segment if just for .tbss.
1725 (assign_file_positions_for_load_sections): Don't report "can't
1726 allocate in segment" errors for .tbss.
1727 (assign_file_positions_for_non_load_sections): Don't set p_filesz
1728 from SHT_NOBITS section filepos.
1730 2011-05-20 Bernd Schmidt <bernds@codesourcery.com>
1732 * elf32-tic6x.c (elf32_tic6x_howto_table): Add entries for
1733 R_C6000_PCR_H16 and R_C6000_PCR_L16.
1734 (elf32_tic6x_relocate_section): Handle them.
1736 2011-05-18 Nick Clifton <nickc@redhat.com>
1739 * elflink.c (elf_link_add_object_symbols): Process .gnu.warning
1740 sections when building shared libraries.
1742 2011-05-18 Rafał Krypa <r.krypa@samsung.com>
1745 * elf32-arm.c (elf32_arm_gc_sweep_hook): Use the computed dynamic
1748 2011-05-18 Tristan Gingold <gingold@adacore.com>
1750 * xcofflink.c (xcoff_link_add_symbols): Handle C_DWARF symbols.
1751 (xcoff_sweep): Always keep dwarf sections.
1752 (xcoff_link_input_bfd): Handle dwarf symbols and sections.
1754 2011-05-18 Tristan Gingold <gingold@adacore.com>
1756 * libxcoff.h (struct xcoff_dwsect_name): New type.
1757 (XCOFF_DWSECT_NBR_NAMES): New macro.
1758 (xcoff_dwsect_names): Declare.
1759 * coffcode.h (sec_to_styp_flags): Handle xcoff dwarf sections.
1760 (styp_to_sec_flags): Ditto.
1761 (coff_new_section_hook): Ditto.
1762 (coff_slurp_symbol_table): Handle C_DWARF and C_INFO.
1763 * coff-rs6000.c (xcoff_dwsect_name): New variable.
1765 2011-05-17 Tomohiro Kashiwada <kikairoya@gmail.com>
1768 * elf32-rx.c (ignore_lma): New variable.
1769 (bfd_elf32_rx_set_target_flags): Add ignore_lma parameter.
1770 (rx_modify_program_headers): Only copy the LMA into the VMA if
1773 2011-05-17 Alan Modra <amodra@gmail.com>
1776 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Adjust "notice" call.
1777 * elflink.c (elf_link_add_object_symbols): Likewise.
1778 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1780 2011-05-16 Alan Modra <amodra@gmail.com>
1782 * linker.c (_bfd_generic_link_add_one_symbol): Don't init u.undef.weak.
1784 2011-05-15 Richard Sandiford <rdsandiford@googlemail.com>
1786 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and
1787 global GOT entries for GOT_PAGE relocations against global symbols.
1789 2011-05-13 Bernd Schmidt <bernds@codesourcery.com>
1791 * config.bfd (tic6x-*-elf, tic6x-*-uclinux): New.
1792 (tic6x-*-*): Replaced by these.
1793 * elf32-tic6x.c (elf32_tic6x_set_osabi): New static function.
1794 (elf32_tic6x_check_relocs): Create dynamic sections if -shared.
1795 (elf_backend_relocs_compatible, elf_backend_post_process_headers):
1797 (elf32_bed, TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM,
1798 TARGET_BIG_NAME, ELF_OSABI): Redefine twice, and include
1799 "elf32-target.h" two more times.
1800 * configure.in: Handle bfd_elf32_tic6x_linux_be_vec,
1801 bfd_elf32_tic6x_linux_le_vec, bfd_elf32_tic6x_elf_be_vec and
1802 bfd_elf32_tic6x_elf_le_vec.
1803 * configure: Regenerate.
1805 2011-05-13 Jan Beulich <jbeulich@novell.com>
1807 * config.bfd: Add targets x86_64-*-pe and x86_64-*-pep.
1809 2011-05-12 Jan Kratochvil <jan.kratochvil@redhat.com>
1811 * config.in: Regenerated.
1812 * configure: Regenerated.
1813 * configure.in: New tests for HAVE_PRPSINFO_T_PR_PID,
1814 HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and
1815 HAVE_PSINFO32_T_PR_PID.
1816 * elf.c (elfcore_grok_psinfo): Protect reading psinfo.pr_pid by
1817 HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID
1818 and HAVE_PSINFO32_T_PR_PID.
1819 * hosts/x86-64linux.h (HAVE_PRPSINFO32_T_PR_PID): New redefinition.
1821 2011-05-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1823 * elf.c (elfcore_grok_psinfo): Initialize CORE_PID for both native and
1825 * elf32-ppc.c (ppc_elf_grok_psinfo): Initialize core_pid.
1826 * elf64-ppc.c (ppc64_elf_grok_psinfo): Likewise.
1828 2011-05-09 Paul Brook <paul@codesourcery.com>
1830 * bfd-in.h (elf32_tic6x_fix_exidx_coverage): Add prototype.
1831 * bfd-in2.h: Regenerate.
1832 * elf32-tic6x.c: Include limits.h.
1833 (tic6x_unwind_edit_type, tic6x_unwind_table_edit,
1834 _tic6x_elf_section_data): New.
1835 (elf32_tic6x_section_data): Define.
1836 (elf32_tic6x_new_section_hook): Allocate target specific data.
1837 (elf32_tic6x_add_unwind_table_edit): New function.
1838 (get_tic6x_elf_section_data, elf32_tic6x_adjust_exidx_size,
1839 elf32_tic6x_insert_cantunwind_after, elf32_tic6x_add_low31,
1840 elf32_tic6x_copy_exidx_entry): New functions.
1841 (elf_backend_write_section): Define.
1843 2011-05-09 Paul Brook <paul@codesourcery.com>
1845 * elf32-tic6x.c (is_tic6x_elf_unwind_section_name,
1846 elf32_tic6x_fake_sections): New functions.
1847 (elf_backend_fake_sections): Define.
1849 2011-05-09 Paul Brook <paul@codesourcery.com>
1851 * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): New function.
1852 (elf_backend_gc_mark_extra_sections): Define.
1854 2011-05-07 Dave Korn <dave.korn.cygwin@gmail.com>
1857 * cofflink.c (bfd_coff_link_input_bfd): Check for and warn about
1858 references to symbols defined in discarded sections.
1860 2011-05-07 Dave Korn <dave.korn.cygwin@gmail.com>
1863 * coffgen.c (coff_write_symbol): Assume input section is its own
1864 output section if output_section member not set.
1865 (coff_write_alien_symbol): Likewise.
1867 2011-05-07 H.J. Lu <hongjiu.lu@intel.com>
1870 * elf.c (_bfd_elf_section_offset): Check SEC_ELF_REVERSE_COPY.
1872 * elflink.c (elf_link_input_bfd): Reverse copy .ctors/.dtors
1875 * section.c (SEC_ELF_REVERSE_COPY): New.
1876 * bfd-in2.h: Regenerated.
1878 2011-05-07 Anders Kaseorg <andersk@ksplice.com>
1881 * libbfd.c (bfd_get_8, bfd_get_signed_8): Use const cast.
1882 * bfd-in2.h: Regenerate.
1884 2011-05-06 Tristan Gingold <gingold@adacore.com>
1886 * vms-alpha.c (evax_section_flags): Remove SEC_IN_MEMORY.
1887 (_bfd_vms_slurp_egsd): Rename old_flags to vms_flags. Handle
1888 any code section. Add comments.
1889 (alpha_vms_object_p): Use void * instead of PTR.
1890 (alpha_vms_create_eisd_for_section): Fix test for setting DZRO.
1891 (build_module_list): Guard against no DST section. Add comments.
1892 (alpha_vms_link_output_symbol): Discard undefined symbols.
1893 (alpha_vms_get_section_contents): Simply memcpy if the section was
1894 already loaded. Fix typo.
1895 (vms_new_section_hook): Use void * instead of PTR.
1896 (vms_alpha_vec): Ditto.
1898 2011-05-06 Richard Sandiford <richard.sandiford@linaro.org>
1900 * elf32-arm.c (cortex_a8_erratum_scan): If the stub is a Thumb
1901 branch to a PLT entry, redirect it to the PLT's Thumb entry point.
1903 2011-05-05 Bernd Schmidt <bernds@codesourcery.com>
1905 * elf32-tic6x.c (elf32_tic6x_final_link): New function.
1906 (elf32_tic6x_merge_attributes): Do not warn for PID or PIC
1907 mismatch. Choose the lower of the two values.
1908 (bfd_elf32_bfd_final_link): New macro.
1910 2011-04-28 Tristan Gingold <gingold@adacore.com>
1912 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
1913 (bfd_xcoff_swap_aux_out): Ditto.
1914 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
1915 (bfd_xcoff64_swap_aux_out): Ditto.
1917 2011-05-04 Alan Modra <amodra@gmail.com>
1920 * elf64-ppc.c (ppc_build_one_stub <ppc_sub_plt_call>): Clear
1921 was_undefined on dot-symbols.
1923 2011-05-03 Paul Brook <paul@codesourcery.com>
1926 * elf32-tic6x.c (elf32_tic6x_howto_table,
1927 elf32_tic6x_howto_table_rel, (elf32_tic6x_gc_sweep_hook,
1928 elf32_tic6x_relocate_section, elf32_tic6x_check_relocs):
1931 2011-05-01 Alan Modra <amodra@gmail.com>
1934 * elf32-i386.c (elf_i386_check_relocs): Ensure dynobj set before
1935 creating ifunc sections.
1936 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1938 2011-04-30 H.J. Lu <hongjiu.lu@intel.com>
1940 * elf64-x86-64.c (elf_x86_64_merge_symbol): Correct parameter
1943 2011-04-28 Tom Tromey <tromey@redhat.com>
1945 * bfdio.c (memory_bstat): Pass correct size to memset.
1947 2011-04-28 Mike Frysinger <vapier@gentoo.org>
1949 * dwarf2.c (dwarf_debug_sections): Mark const.
1950 * elf.c (special_sections): Likewise.
1951 * libbfd-in.h (dwarf_debug_sections): Likewise.
1952 * libbfd.h: Regenerate.
1954 2011-04-26 Kai Tietz <ktietz@redhat.com>
1956 * coffcode.h (sec_to_styp_flags): Allow linkonce for
1959 2011-04-26 Tristan Gingold <gingold@adacore.com>
1961 * coff64-rs6000.c: Convert to ISO-C. Remove PARAMS and PTR macros.
1963 2011-04-24 Alan Modra <amodra@gmail.com>
1967 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call.
1968 * linker.c (_bfd_link_hash_newfunc): Clear bitfields.
1969 (_bfd_generic_link_add_one_symbol): Update "notice" call.
1970 * elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when
1971 it is a redef of an IR symbol in a real BFD.
1973 2011-04-22 H.J. Lu <hongjiu.lu@intel.com>
1975 * elf32-i386.c (elf_i386_readonly_dynrelocs): Warn relocation
1976 in readonly section in a shared object.
1977 (elf_i386_size_dynamic_sections): Likewise.
1978 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
1979 (elf_x86_64_size_dynamic_sections): Likewise.
1981 2011-04-21 H.J. Lu <hongjiu.lu@intel.com>
1984 * elf32-i386.c (elf_i386_readonly_dynrelocs): Skip local IFUNC
1986 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
1988 2011-04-21 H.J. Lu <hongjiu.lu@intel.com>
1990 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Return false
1991 on dynamic symbol error.
1992 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1994 2011-04-20 Tristan Gingold <gingold@adacore.com>
1996 * config.bfd (alpha*-*-*vms*, ia64*-*-*vms*): Define targ_selvecs.
1998 2011-04-20 Alan Modra <amodra@gmail.com>
2000 * hash.c (bfd_default_hash_table_size): Make it an unsigned long.
2001 (bfd_hash_table_init_n): Overflow checking.
2002 (bfd_hash_set_default_size): Return current size. Take unsigned long
2003 arg. Add 65537 to hash_size primes.
2004 * bfd-in.h (bfd_hash_set_default_size): Update prototype.
2005 * bfd-in2.h: Regenerate.
2007 2011-04-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2009 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of
2012 2011-04-20 Alan Modra <amodra@gmail.com>
2014 * libbfd.c (bfd_log2): Do return rounded up value.
2015 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Replace bfd_log2
2016 call with expanded old round down version of the function.
2018 * archive.c (_bfd_get_elt_at_filepos): Don't release n_nfd.
2019 * elflink.c (elf_link_add_object_symbols): Delete redundant code.
2021 2011-04-20 Alan Modra <amodra@gmail.com>
2024 * elfcode.h (elf_slurp_symbol_table): Put common plugin IR symbols
2025 in their own common section.
2026 * elflink.c (elf_link_add_object_symbols): Likewise.
2027 * linker.c (generic_link_check_archive_element): Don't lose flags
2028 if common section is pre-existing.
2029 (_bfd_generic_link_add_one_symbol): Likewise.
2031 2011-04-20 Alan Modra <amodra@gmail.com>
2034 * elflink.c (_bfd_elf_merge_symbol): Update multiple_common calls.
2035 * linker.c (_bfd_generic_link_add_one_symbol): Likewise. Call
2036 multiple_definition regardless of allow_multiple_definition.
2037 * simple.c (simple_dummy_multiple_definition): Update.
2038 * xcofflink.c (xcoff_link_add_symbols): Update multiple_definition
2041 2011-04-18 Tristan Gingold <gingold@adacore.com>
2043 * coff-rs6000.c: Convert to ISO-C. Remove PARAMS macro.
2045 2011-04-18 Alan Modra <amodra@gmail.com>
2049 * bfd.c (BFD_PLUGIN): Define.
2050 (BFD_FLAGS_SAVED, BFD_FLAGS_FOR_BFD_USE_MASK): Add BFD_PLUGIN.
2051 * bfd-in2.h: Regenerate.
2052 * elflink.c (elf_link_output_extsym): Strip undefined plugin syms.
2053 * opncls.c (bfd_make_readable): Don't lose original bfd flags.
2055 2011-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
2057 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Do not check for
2060 2011-04-15 Sergio Durigan Junior <sergiodj@redhat.com>
2062 * elf-bfd.h (struct sdt_note): New struct.
2063 (struct elf_obj_tdata) <sdt_note_head>: New field.
2064 * elf.c (elfobj_grok_stapsdt_note_1): New function.
2065 (elfobj_grok_stapsdt_note): Likewise.
2066 (elf_parse_notes): Added code to treat SystemTap note
2069 2011-04-12 Richard Henderson <rth@redhat.com>
2071 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Do not
2072 exclude empty .got sections.
2074 2011-04-11 H.J. Lu <hongjiu.lu@intel.com>
2076 * elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound
2077 array access for BFD_RELOC_386_IRELATIVE.
2079 2011-04-11 Bernd Schmidt <bernds@codesourcery.com>
2081 * elf32-tic6x.c (elf32_tic6x_check_relocs): Initialize pc_count field.
2083 2011-04-11 Mark Wielaard <mjw@redhat.com>
2086 * elf-bfd.h (has_ifunc_symbols): Renamed to has_gnu_symbols.
2087 (has_gnu_symbols): Renamed from has_ifunc_symbols.
2088 * elf.c (_bfd_elf_set_osabi): Use new has_gnu_symbols name.
2089 * elf32-arm.c (elf32_arm_add_symbol_hook): Set has_gnu_symbols
2090 also if STB_GNU_UNIQUE symbol binding was seen.
2091 * elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
2092 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
2093 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
2094 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
2095 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
2096 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
2098 2011-04-11 Alan Modra <amodra@gmail.com>
2100 * bfd-in.h (bfd_get_section_limit): Don't use rawsize with output
2102 * libbfd.c (_bfd_generic_get_section_contents): Likewise.
2103 (_bfd_generic_get_section_contents_in_window): Likewise.
2104 * section.c (bfd_get_section_contents): Likewise.
2105 * compress.c (bfd_get_full_section_contents): Likewise.
2106 * elf32-rx.c (rx_final_link): Ignore rawsize.
2107 * elf32-microblaze.c (microblaze_elf_relocate_section): Use correct
2108 bfd with bfd_get_section_limit.
2109 * elfxx-ia64.c (elfNN_ia64_choose_gp): Add "final" parameter. Use
2110 os->size during final link. Update callers.
2111 * bfd-in2.h: Regenerate.
2113 2011-04-10 Richard Sandiford <rdsandiford@googlemail.com>
2116 * elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count
2117 as the number of global entries when merging with the primary GOT.
2119 2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
2121 * elf32-i386.c: Update copyright year.
2122 * elf64-x86-64.c: Likewise.
2124 2011-04-09 Kai Tietz <ktietz@redhat.com>
2126 * peXXigen.c (_bfd_XXi_final_link_postscripte): Sort pdata in temporary
2127 buffer and use rawsize for sorting.
2128 * coffcode.h (coff_compute_section_file_positions): Set rawsize
2129 before doing alignment.
2131 2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
2133 * elf32-i386.c (elf_i386_relocate_section): Return relocation
2134 error on unsupported relocation.
2135 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2137 2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
2140 * hosts/x86-64linux.h (elf_prstatus32): Replace __pid_t with
2143 2011-04-08 H.J. Lu <hongjiu.lu@intel.com>
2146 * elf32-i386.c (elf_i386_relocate_section): Check !executable
2147 instead of shared for R_386_TLS_LDO_32.
2149 2011-04-08 Tristan Gingold <gingold@adacore.com>
2151 * Makefile.am (SOURCE_HFILES): Remove xcoff-target.h
2153 * xcoff-target.h: Remove
2154 * Makefile.in: Regenerate.
2156 2011-04-07 Cary Coutant <ccoutant@google.com>
2158 * dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification.
2160 2011-04-07 Paul Brook <paul@codesourcery.com>
2162 * elf32-tic6x.c (elf32_tic6x_howto_table): R_C6000_PREL31 is
2164 (elf32_tic6x_howto_table_rel): Ditto.
2165 (elf32_tic6x_relocate_section): Implement R_C6000_PREL31.
2166 (elf32_tic6x_check_relocs): Ditto.
2168 2011-04-06 Joseph Myers <joseph@codesourcery.com>
2170 * config.bfd (thumb-*-oabi): Don't handle in list of obsolete
2172 (strongarm*, thumb*, xscale*): Remove architectures.
2173 (strongarm-*-kaos*, thumb-*-coff, thumb-*-elf, thumb-epoc-pe*,
2174 thumb-*-pe*, strongarm-*-elf, strongarm-*-coff, xscale-*-elf,
2175 xscale-*-coff): Remove targets.
2177 2011-04-01 Tristan Gingold <gingold@adacore.com>
2179 * elfxx-ia64.c: include bfd_stdint.h
2181 2011-03-31 Jan Kratochvil <jan.kratochvil@redhat.com>
2183 * elf32-tic6x.c (elf32_tic6x_relocate_section): Remove unused variable
2184 dynobj and its initialization.
2186 2011-03-31 Tristan Gingold <gingold@adacore.com>
2188 * makefile.vms (DEFS): Add HAVE_bfd_elf64_ia64_vms_vec.
2189 * configure.com: Set BFD_HOST_64BIT_LONG_LONG and
2190 BFD_HOST_LONG_LONG to 1.
2192 2011-03-31 Tristan Gingold <gingold@adacore.com>
2194 * vms-alpha.c (vms_get_remaining_object_record): Fix dec-c warning.
2195 (_bfd_vms_write_etir): Ditto.
2196 (_bfd_vms_slurp_etir): Avoid to use intptr_t
2197 * configure.com: Generate bfd_stdint.h
2199 2011-03-31 Bernd Schmidt <bernds@codesourcery.com>
2201 * elf32-tic6x.h (struct elf32_tic6x_params): New.
2202 (elf32_tic6x_setup): Declare.
2203 * elf32-tic6x.c: Include <limits.h>.
2204 (ELF_DYNAMIC_LINKER, DEFAULT_STACK_SIZE, PLT_ENTRY_SIZE): Define.
2205 (struct elf32_tic6x_link_hash_table, struct elf32_link_hash_entry):
2207 (elf32_tic6x_link_hash_table, is_tic6x_elf): New macros.
2208 (tic6x_elf_scom_section, tic6x_elf_scom_symbol,
2209 tic6x_elf_scom_symbol_ptr): New static variables.
2210 (elf32_tic6x_howto_table, elf32_tic6x_howto_table_rel,
2211 elf32_tic6x_reloc_map): Add R_C6000_JUMP_SLOT, R_C6000_EHTYPE,
2212 R_C6000_PCR_H16 and R_C6000_PCR_L16.
2213 (elf32_tic6x_link_hash_newfunc, elf32_tic6x_link_hash_table_create,
2214 elf32_tic6x_link_hash_table_free, elf32_tic6x_setup,
2215 elf32_tic6x_using_dsbt, elf32_tic6x_install_rela,
2216 elf32_tic6x_create_dynamic_sections, elf32_tic6x_make_got_dynreloc,
2217 elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_gc_sweep_hook,
2218 elf32_tic6x_adjust_dynamic_symbol): New static functions.
2219 (elf32_tic6x_relocate_section): For R_C6000_PCR_S21, convert branches
2220 to weak symbols as required by the ABI.
2221 Handle GOT and DSBT_INDEX relocs, and copy relocs to the output file
2222 as needed when generating DSBT output.
2223 (elf32_tic6x_check_relocs, elf32_tic6x_add_symbol_hook,
2224 elf32_tic6x_symbol_processing, elf32_tic6x_section_from_bfd_section,
2225 elf32_tic6x_allocate_dynrelocs, elf32_tic6x_size_dynamic_sections,
2226 elf32_tic6x_always_size_sections, elf32_tic6x_modify_program_headers,
2227 elf32_tic6x_finish_dynamic_sections, elf32_tic6x_plt_sym_val,
2228 elf32_tic6x_copy_private_data, elf32_tic6x_link_omit_section_dynsym):
2229 New static functions.
2230 (ELF_MAXPAGESIZE): Define to 0x1000.
2231 (bfd_elf32_bfd_copy_private_bfd_data,
2232 bfd_elf32_bfd_link_hash_table_create,
2233 bfd_elf32_bfd_link_hash_table_free, elf_backend_can_refcount,
2234 elf_backend_want_got_plt, elf_backend_want_dynbss,
2235 elf_backend_plt_readonly, elf_backend_got_header_size,
2236 elf_backend_gc_sweep_hook, elf_backend_modify_program_headers,
2237 elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
2238 elf_backend_check_relocs, elf_backend_add_symbol_hook,
2239 elf_backend_symbol_processing, elf_backend_link_output_symbol_hook,
2240 elf_backend_section_from_bfd_section,
2241 elf_backend_finish_dynamic_symbol, elf_backend_always_size_sections,
2242 elf32_tic6x_size_dynamic_sections, elf_backend_finish_dynamic_sections,
2243 elf_backend_omit_section_dynsym, elf_backend_plt_sym_val): Define.
2245 * bfd/reloc.c (BFD_RELOC_C6000_JUMP_SLOT, BFD_RELOC_C6000_EHTYPE,
2246 BFD_RELOC_C6000_PCR_H16, BFD_RELOC_C6000_PCR_S16): Add.
2247 * bfd/bfd-in2.h: Regenerate.
2248 * bfd/libbfd.h: Regenerate.
2249 * config.bfd: Accept tic6x-*-* instead of tic6x-*-elf.
2251 2011-03-31 Tristan Gingold <gingold@adacore.com>
2253 * coffcode.h (coff_slurp_symbol_table): Silently discard C_NULL
2254 entry on xcoff when value is C_NULL_VALUE.
2256 2011-03-31 Tristan Gingold <gingold@adacore.com>
2258 * libcoff-in.h (exec_hdr): Remove.
2259 * libcoff.h: Regenerate.
2261 2011-03-30 Nick Clifton <nickc@redhat.com>
2263 * po/da.po: Updated Danish translation.
2265 2011-03-29 Richard Henderson <rth@redhat.com>
2267 * elf64-alpha.c (elf64_alpha_gc_mark_hook): New.
2268 (elf64_alpha_gc_sweep_hook): New.
2269 (elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook): New.
2270 (elf_backend_can_gc_sections): New.
2272 2011-03-26 John Marino <binutils@marino.st>
2274 * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*.
2275 * configure.in: Delete unused bfd_elf32_i386_dragonfly_vec.
2276 * configure: Regenerate.
2278 2011-03-25 Michael Snyder <msnyder@vmware.com>
2280 * coffcode.h (coff_set_alignment_hook): Check return of bfd_seek.
2282 2011-03-25 Tristan Gingold <gingold@adacore.com>
2284 * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Allow the use
2285 of find_nearest_line on object files.
2287 2011-03-25 Tristan Gingold <gingold@adacore.com>
2289 * vms-alpha.c (evax_section_flags): Make $CODE$ section read-only.
2291 (alpha_vms_create_eisd_for_section): Make code sections read-only.
2293 2011-03-24 Alan Modra <amodra@gmail.com>
2295 * elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where
2296 old-style __tls_get_addr calls without marker relocs don't match
2297 their arg setup insn one for one. If such mismatches are found
2298 report the reloc and don't do any tls optimization.
2299 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
2301 2011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
2303 * bfd-in2.h: Regenerate.
2305 2011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
2307 * archures.c: Add AVR XMEGA architecture information.
2308 * cpu-avr.c (arch_info_struct): Likewise.
2309 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
2310 (elf32_avr_object_p): Likewise.
2312 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2314 * reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation.
2315 * bfd-in2.h: Regenerate.
2316 * elf32-arm.c (elf32_arm_howto_table_2): Rename existing definition
2317 to elf32_arm_howto_table_3 and replace with a single R_ARM_IRELATIVE
2319 (elf32_arm_howto_from_type): Update accordingly.
2320 (elf32_arm_reloc_map): Map BFD_RELOC_ARM_IRELATIVE to R_ARM_IRELATIVE.
2321 (elf32_arm_reloc_name_lookup): Handle elf32_arm_howto_table_3.
2322 (arm_plt_info): New structure, split out from elf32_arm_link_hash_entry
2323 with an extra noncall_refcount field.
2324 (arm_local_iplt_info): New structure.
2325 (elf_arm_obj_tdata): Add local_iplt.
2326 (elf32_arm_local_iplt): New accessor macro.
2327 (elf32_arm_link_hash_entry): Replace plt_thumb_refcount,
2328 plt_maybe_thumb_refcount and plt_got_offset with an arm_plt_info.
2329 Change tls_type to a bitfield and add is_iplt.
2330 (elf32_arm_link_hash_newfunc): Update accordingly.
2331 (elf32_arm_allocate_local_sym_info): New function.
2332 (elf32_arm_create_local_iplt): Likewise.
2333 (elf32_arm_get_plt_info): Likewise.
2334 (elf32_arm_plt_needs_thumb_stub_p): Likewise.
2335 (elf32_arm_get_local_dynreloc_list): Likewise.
2336 (create_ifunc_sections): Likewise.
2337 (elf32_arm_copy_indirect_symbol): Update after the changes to
2338 elf32_arm_link_hash_entry. Assert the is_iplt has not yet been set.
2339 (arm_type_of_stub): Add an st_type argument. Use elf32_arm_get_plt_info
2340 to get PLT information. Assert that all STT_GNU_IFUNC references
2341 are turned into PLT references.
2342 (arm_build_one_stub): Pass the symbol type to
2343 elf32_arm_final_link_relocate.
2344 (elf32_arm_size_stubs): Pass the symbol type to arm_type_of_stub.
2345 (elf32_arm_allocate_irelocs): New function.
2346 (elf32_arm_add_dynreloc): In static objects, use .rel.iplt for
2347 all R_ARM_IRELATIVE.
2348 (elf32_arm_allocate_plt_entry): New function.
2349 (elf32_arm_populate_plt_entry): Likewise.
2350 (elf32_arm_final_link_relocate): Add an st_type parameter.
2351 Set srelgot to null for static objects. Use separate variables
2352 to record which st_value and st_type should be used when generating
2353 a dynamic relocation. Use elf32_arm_get_plt_info to find the
2354 symbol's PLT information, setting has_iplt_entry, splt,
2355 plt_offset and gotplt_offset accordingly. Check whether
2356 STT_GNU_IFUNC symbols should resolve to an .iplt entry, and change
2357 the relocation target accordingly. Broaden assert to include
2358 .iplts. Don't set sreloc for static relocations. Assert that
2359 we only generate dynamic R_ARM_RELATIVE relocations for R_ARM_ABS32
2360 and R_ARM_ABS32_NOI. Generate R_ARM_IRELATIVE relocations instead
2361 of R_ARM_RELATIVE relocations if the target is an STT_GNU_IFUNC
2362 symbol. Pass the symbol type to arm_type_of_stub. Conditionally
2363 resolve GOT references to the .igot.plt entry.
2364 (elf32_arm_relocate_section): Update the call to
2365 elf32_arm_final_link_relocate.
2366 (elf32_arm_gc_sweep_hook): Use elf32_arm_get_plt_info to get PLT
2367 information. Treat R_ARM_REL32 and R_ARM_REL32_NOI as call
2368 relocations in shared libraries and relocatable executables.
2369 Count non-call PLT references. Use elf32_arm_get_local_dynreloc_list
2370 to get the list of dynamic relocations for a local symbol.
2371 (elf32_arm_check_relocs): Always create ifunc sections. Set isym
2372 at the same time as setting h. Use elf32_arm_allocate_local_sym_info
2373 to allocate local symbol information. Treat R_ARM_REL32 and
2374 R_ARM_REL32_NOI as call relocations in shared libraries and
2375 relocatable executables. Record PLT information for local
2376 STT_GNU_IFUNC functions as well as global functions. Count
2377 non-call PLT references. Use elf32_arm_get_local_dynreloc_list
2378 to get the list of dynamic relocations for a local symbol.
2379 (elf32_arm_adjust_dynamic_symbol): Handle STT_GNU_IFUNC symbols.
2380 Don't remove STT_GNU_IFUNC PLTs unless all references have been
2381 removed. Update after the changes to elf32_arm_link_hash_entry.
2382 (allocate_dynrelocs_for_symbol): Decide whether STT_GNU_IFUNC PLT
2383 entries should live in .plt or .iplt. Check whether the .igot.plt
2384 and .got entries can be combined. Use elf32_arm_allocate_plt_entry
2385 to allocate .plt and .(i)got.plt entries. Detect which .got
2386 entries will need R_ARM_IRELATIVE relocations and use
2387 elf32_arm_allocate_irelocs to allocate them. Likewise other
2388 non-.got dynamic relocations.
2389 (elf32_arm_size_dynamic_sections): Allocate .iplt, .igot.plt
2390 and dynamic relocations for local STT_GNU_IFUNC symbols.
2391 Check whether the .igot.plt and .got entries can be combined.
2392 Detect which .got entries will need R_ARM_IRELATIVE relocations
2393 and use elf32_arm_allocate_irelocs to allocate them. Use stashed
2394 section pointers intead of strcmp checks. Handle iplt and igotplt.
2395 (elf32_arm_finish_dynamic_symbol): Use elf32_arm_populate_plt_entry
2396 to fill in .plt, .got.plt and .rel(a).plt entries. Point
2397 STT_GNU_IFUNC symbols at an .iplt entry if non-call relocations
2399 (elf32_arm_output_plt_map_1): New function, split out from
2400 elf32_arm_output_plt_map. Handle .iplt entries. Use
2401 elf32_arm_plt_needs_thumb_stub_p.
2402 (elf32_arm_output_plt_map): Call it.
2403 (elf32_arm_output_arch_local_syms): Add mapping symbols for
2404 local .iplt entries.
2405 (elf32_arm_swap_symbol_in): Handle Thumb STT_GNU_IFUNC symbols.
2406 (elf32_arm_swap_symbol_out): Likewise.
2407 (elf32_arm_add_symbol_hook): New function.
2408 (elf_backend_add_symbol_hook): Define for all targets.
2410 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2412 * elf-bfd.h (elf_link_hash_entry): Add target_internal.
2413 * elf.c (swap_out_syms): Set st_target_internal for each
2415 * elfcode.h (elf_swap_symbol_in): Likewise.
2416 * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
2417 * elf32-sh-symbian.c (sh_symbian_relocate_section): Likewise.
2418 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
2419 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
2420 * elflink.c (elf_link_output_extsym): Likewise.
2421 (bfd_elf_final_link): Likewise.
2422 (elf_link_add_object_symbols): Copy st_target_internal
2423 to the hash table if we see a definition.
2424 (_bfd_elf_copy_link_hash_symbol_type): Copy target_internal.
2425 * elf32-arm.c (elf32_arm_stub_hash_entry): Replace st_type with
2426 a branch_type field.
2427 (a8_erratum_fix, a8_erratum_reloc): Likewise.
2428 (arm_type_of_stub): Replace actual_st_type with an
2429 actual_branch_type parameter.
2430 (arm_build_one_stub): Use branch types rather than st_types to
2431 determine the type of branch.
2432 (cortex_a8_erratum_scan): Likewise.
2433 (elf32_arm_size_stubs): Likewise.
2434 (bfd_elf32_arm_process_before_allocation): Likewise.
2435 (allocate_dynrelocs_for_symbol): Likewise.
2436 (elf32_arm_finish_dynamic_sections): Likewise.
2437 (elf32_arm_final_link_relocate): Replace sym_flags parameter with
2438 a branch_type parameter.
2439 (elf32_arm_relocate_section): Update call accordingly.
2440 (elf32_arm_adjust_dynamic_symbol): Don't check STT_ARM_TFUNC.
2441 (elf32_arm_output_map_sym): Initialize st_target_internal.
2442 (elf32_arm_output_stub_sym): Likewise.
2443 (elf32_arm_symbol_processing): Delete.
2444 (elf32_arm_swap_symbol_in): Convert STT_ARM_TFUNCs into STT_FUNCs.
2445 Use st_target_internal to record the branch type.
2446 (elf32_arm_swap_symbol_out): Use st_target_internal to test for
2448 (elf32_arm_is_function_type): Delete.
2449 (elf_backend_symbol_processing): Likewise.
2450 (elf_backend_is_function_type): Likewise.
2452 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2454 * elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
2455 (elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
2458 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2460 * elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
2461 may_need_local_target_p and may_become_dynamic_p to classify
2462 the relocation type. Don't check info->symbolic or h->def_regular
2463 when deciding whether to record a potential dynamic reloc.
2464 Don't treat potential dynamic relocs as PLT references.
2465 (elf32_arm_gc_sweep_hook): Update to match. Assert that we don't
2466 try to make the PLT reference count go negative.
2468 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2470 * elf32-arm.c (elf32_arm_final_link_relocate): Always fill in the
2471 GOT entry here, rather than leaving it to finish_dynamic_symbol.
2472 Only create a dynamic relocation for local references if
2474 (allocate_dynrelocs_for_symbol): Update dynamic relocation
2475 allocation accordingly.
2476 (elf32_arm_finish_dynamic_symbol): Don't initialise the GOT entry here.
2478 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2480 * elf32-arm.c (elf32_arm_allocate_dynrelocs): New function.
2481 (elf32_arm_add_dynreloc): Likewise.
2482 (elf32_arm_adjust_dynamic_symbol): Use elf32_arm_allocate_dynrelocs
2483 to allocate dynamic relocations.
2484 (elf32_arm_size_dynamic_sections): Likewise.
2485 (allocate_dynrelocs): Likewise. Rename to
2486 allocate_dynrelocs_for_symbol.
2487 (elf32_arm_final_link_relocate): Use elf32_arm_add_dynreloc to
2488 create dynamic relocations.
2489 (elf32_arm_finish_dynamic_symbol): Likewise.
2491 2011-03-12 H.J. Lu <hongjiu.lu@intel.com>
2493 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
2494 x32 GD->IE and GD->LE transitions.
2495 (elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE
2496 and LD->LE transitions.
2498 2011-03-10 Alan Modra <amodra@gmail.com>
2500 * elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset
2501 for LO_DS error message and correct multiple.
2503 2011-03-10 Alan Modra <amodra@gmail.com>
2505 * elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define.
2506 (ppc64_elf_link_just_syms): New function.
2507 (opd_entry_value): Don't assume big-endian host.
2508 (get_r2off): New function.
2509 (ppc_build_one_stub, ppc_size_one_stub): Use it here.
2511 2011-03-06 Michael Snyder <msnyder@vmware.com>
2513 * compress.c (bfd_compress_section_contents): Check for out of mem.
2515 * elf64-x86-64.c (elf_x86_64_relocate_section): Document
2516 that case statement falls through intentionally.
2518 * elf32-i386.c (elf_i386_relocate_section): Document fall through.
2520 2011-03-04 Alan Modra <amodra@gmail.com>
2522 * archive.c (bsd_write_armap): Don't call stat in deterministic
2523 mode, and don't use st_mtime if stat returns error.
2525 2011-03-03 Michael Snyder <msnyder@vmware.com>
2527 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove dead code.
2529 * coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error.
2531 * aoutx.h (aout_final_link): Use sizeof int not sizeof int*.
2532 (aout_link_write_other_symbol): Missing break statement.
2534 * dwarf2.c (scan_unit_for_symbols): Stop memory leak.
2536 * archive.c (_bfd_slurp_extended_name_table): Fail if bfd_seek fails.
2538 2011-03-03 H.J. Lu <hongjiu.lu@intel.com>
2540 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
2541 x32 IE->LE transition.
2542 (elf_x86_64_relocate_section): Likewise.
2544 2011-03-02 Bernd Schmidt <bernds@codesourcery.com>
2546 * elflink.c (is_reloc_section): Remove function.
2547 (get_dynamic_reloc_section_name): Construct string manually.
2549 2011-02-28 Kai Tietz <kai.tietz@onevision.com>
2551 * archive.c (_bfd_find_nested_archive): Use filename_(n)cmp.
2552 (adjust_relative_path): Likewise.
2553 (_bfd_construct_extended_name_table): Likewise.
2554 * corefile.c (generic_core_file_matches_executable_p): Likewise.
2555 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
2556 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2557 * elf32-spu.c (sort_bfds): Likewise.
2558 (spu_elf_auto_overlay): Likewise.
2559 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
2560 * xcofflink.c (xcoff_set_import_path): Likewise.
2561 * xtensa-isa.c (xtensa_regfile_lookup): Likewise.
2562 (xtensa_regfile_lookup_shortname): Likewise.
2564 2011-02-28 Alan Modra <amodra@gmail.com>
2567 * archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and
2568 stringsize. Properly sanity check symdef_count. Remove redundant
2571 2011-02-25 Rafael Ávila de Espíndola <respindola@mozilla.com>
2573 * plugin.c (bfd_plugin_object_p): Correctly set the filesize
2574 and handle claim_file seeking. Only try to load the plugin once.
2576 2011-02-22 Andreas Schwab <schwab@redhat.com>
2578 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
2579 relocation read the value from the second GOT slot.
2581 2011-02-15 Tristan Gingold <gingold@adacore.com>
2583 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
2585 2011-02-15 Alan Modra <amodra@gmail.com>
2587 * elf64-ppc.c (ppc64_elf_edit_toc): Reinstate second read of
2588 toc relocs. Fuss over free(NULL).
2590 2011-02-14 Mike Frysinger <vapier@gentoo.org>
2592 * elflink.c (bfd_elf_size_dynamic_sections): Add
2593 bfd_get_symbol_leading_char to the start of newname.
2595 2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2597 * configure: Regenerate.
2599 2011-02-09 Alan Modra <amodra@gmail.com>
2601 * elf64-ppc.c (ppc64_elf_edit_toc): Don't free toc relocs until
2602 we are done. When optimising large toc, check that a global
2603 symbol on a toc reloc is defined in a kept section.
2605 2011-02-08 Nick Clifton <nickc@redhat.com>
2608 * elf.c (assign_file_positions_for_load_sections): Set the program
2609 header offset and entry size to zero if there are no program
2612 2011-02-08 Alan Modra <amodra@gmail.com>
2614 * elf64-ppc.c (ppc64_elf_edit_toc): Don't segfault on NULL
2615 local_syms when looking for local symbols in .toc.
2617 2011-02-01 Alan Modra <amodra@gmail.com>
2619 * elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value
2620 for toc pointer on any section having makes_toc_func_call set.
2621 (check_pasted_section): Ensure pasted .init/.fini fragments use
2622 the same toc if any has makes_toc_func_call set.
2624 2011-01-28 Joseph Myers <joseph@codesourcery.com>
2626 * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
2629 2011-01-22 Richard Sandiford <rdsandiford@googlemail.com>
2631 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
2632 common sections too.
2634 2011-01-18 H.J. Lu <hongjiu.lu@intel.com>
2636 * elf64-x86-64.c (elf_backend_want_plt_sym): Redefine to 0 after
2639 2011-01-18 Pierre Muller <muller@ics.u-strasbg.fr>
2641 Fix compilation for mingw64.
2642 * coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate
2643 typecast to avoid warning.
2644 * elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type
2646 * elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead
2647 of long for pointer to avoid warning.
2648 (elfNN_ia64_relax_brl): Idem.
2649 (elfNN_ia64_install_value): Idem.
2650 * vms-alpha.c (_bfd_vms_slurp_etir): Idem.
2652 2011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
2654 * elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than
2655 h->needs_plt when deciding whether to record a possible dynamic reloc.
2657 2011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
2659 * elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
2660 dynamic relocs for the removed section.
2662 2011-01-15 H.J. Lu <hongjiu.lu@intel.com>
2664 * elf64-x86-64.c (elf_x86_64_check_relocs): Check invalid x32
2667 2011-01-14 H.J. Lu <hongjiu.lu@intel.com>
2669 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type.
2670 (elf_x86_64_link_hash_table_create): Set pointer_r_type.
2671 (elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64
2672 for ILP32. Remove ABI_64_P PIC check for R_X86_64_8,
2673 R_X86_64_16, R_X86_64_32 and R_X86_64_32S.
2674 (elf_x86_64_relocate_section): Handle R_X86_64_32 like R_X86_64_64
2677 2011-01-14 Alan Modra <amodra@gmail.com>
2679 * bfd.c (bfd_perror): Flush stdout before and stderr after printing
2681 (_bfd_default_error_handler): Likewise.
2682 * elf.c (print_segment_map): Likewise.
2683 * libbfd.c (warn_deprecated): Likewise.
2684 * som.c (som_sizeof_headers): No need to do so here.
2685 * coff-i860.c: Replace use of printf for error messages with
2687 * coff-ppc.c: Likewise.
2688 * coff-sh.c: Likewise.
2689 * elf32-bfin.c: Likewise.
2690 * elf32-dlx.c: Likewise.
2691 * elf32-mep.c: Likewise.
2692 * elf32-v850.c: Likewise.
2693 * mach-o.c: Likewise.
2696 2011-01-13 H.J. Lu <hongjiu.lu@intel.com>
2698 * elf64-x86-64.c (elf_x86_64_link_hash_table): Remove
2700 (elf_x86_64_link_hash_table_create): Don't set swap_reloca_out.
2701 (elf_x86_64_check_relocs): Align relocation section to 4 byte
2703 (elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with
2705 (elf_x86_64_finish_dynamic_symbol): Updated.
2706 (elf_x86_64_finish_dynamic_sections): Don't use
2707 Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor
2708 bfd_elf64_swap_dyn_out.
2710 2011-01-14 J. Park <grassman@gmail.com>
2713 * elf32-arm.c (allocate_dynrelocs): Don't set up eh before
2714 following bfd_link_hash_warning symbol link.
2716 2011-01-10 Nathan Sidwell <nathan@codesourcery.com>
2717 Glauber de Oliveira Costa <glommer@gmail.com>
2719 * reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL,
2720 BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ,
2721 BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New
2723 * libbfd.h: Rebuilt.
2724 * bfd-in2.h: Rebuilt.
2725 * elf32-arm.c (elf32_arm_howto_table_1): Add new relocations.
2726 (elf32_arm_reloc_map): Likewise.
2727 (tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates.
2728 (elf32_arm_stub_long_branch_any_tls_pic,
2729 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates.
2730 (DEF_STUBS): Add new stubs.
2731 (struct_elf_arm_obj_data): Add local_tlsdesc_gotent field.
2732 (elf32_arm_local_tlsdesc_gotent): New.
2733 (GOT_TLS_GDESC): New mask.
2734 (GOT_TLS_GD_ANY): Define.
2735 (struct elf32_arm_link_hash_entry): Add tlsdesc_got field.
2736 (elf32_arm_compute_jump_table_size): New.
2737 (struct elf32_arm_link_hash_table): Add next_tls_desc_index,
2738 num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline,
2739 sgotplt_jump_table_size fields.
2740 (elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field.
2741 (elf32_arm_link_hash_table_create): Initialize new fields.
2742 (arm_type_of_stub): Check TLS desc relocs too.
2743 (elf32_arm_stub_name): TLS desc relocs can be shared.
2744 (elf32_arm_tls_transition): Determine relaxation.
2745 (arm_stub_required_alignment): Add tls stubs.
2746 (elf32_arm_size_stubs): Likewise.
2747 (elf32_arm_tls_relax): Perform TLS relaxing.
2748 (elf32_arm_final_link_relocate): Process TLS DESC relocations.
2749 (IS_ARM_TLS_GNU_RELOC): New.
2750 (IS_ARM_TLS_RELOC): Use it.
2751 (elf32_arm_relocate_section): Perform TLS relaxing.
2752 (elf32_arm_check_relocs): Anticipate TLS relaxing, process tls
2754 (allocate_dynrelocs): Allocate tls desc relcoations.
2755 (elf32_arm_output_arch_local_syms): Emit tls trampoline mapping
2757 (elf32_arm_size_dynamic_sections): Allocate tls trampolines and
2759 (elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE
2761 (elf32_arm_finish_dynamic_symbol): Adjust.
2762 (arm_put_trampoline): New.
2763 (elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls
2765 (elf_backend_always_size_sections): Define.
2767 2011-01-06 H.J. Lu <hongjiu.lu@intel.com>
2769 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Optimized.
2771 2011-01-06 H.J. Lu <hongjiu.lu@intel.com>
2775 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
2776 handle symbols marked with regular reference, but not non-GOT
2777 reference when building shared library.
2779 * elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
2780 local and global STT_GNU_IFUNC symols when building shared
2782 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
2784 2011-01-05 DJ Delorie <dj@redhat.com>
2786 * reloc.c: Add BFD_RELOC_RX_OP_NEG.
2787 * libbfd.h: Regenerate.
2788 * bfd-in2.h: Regenerate.
2789 * elf32-rx.c: Add it to the list, corresponding to R_RX_OPneg.
2791 2011-01-03 H.J. Lu <hongjiu.lu@intel.com>
2793 * cpu-i386.c (bfd_i386_compatible): New.
2794 (bfd_x64_32_arch_intel_syntax): Replace bfd_default_compatible
2795 with bfd_i386_compatible.
2796 (bfd_x86_64_arch_intel_syntax): Likewise.
2797 (bfd_i386_arch_intel_syntax): Likewise.
2798 (i8086_arch): Likewise.
2799 (bfd_x64_32_arch): Likewise.
2800 (bfd_x86_64_arch): Likewise.
2801 (bfd_i386_arch): Likewise.
2803 For older changes see ChangeLog-2010
2809 version-control: never