4 * elf.c (_bfd_elf_make_section_from_shdr): Set up TLS section LMAs
6 (_bfd_elf_map_sections_to_segments): Don't create a final PT_LOAD
7 segment if just for .tbss.
8 (assign_file_positions_for_load_sections): Don't report "can't
9 allocate in segment" errors for .tbss.
10 (assign_file_positions_for_non_load_sections): Don't set p_filesz
11 from SHT_NOBITS section filepos.
15 * elf32-tic6x.c (elf32_tic6x_howto_table): Add entries for
16 R_C6000_PCR_H16 and R_C6000_PCR_L16.
17 (elf32_tic6x_relocate_section): Handle them.
22 * elflink.c (elf_link_add_object_symbols): Process .gnu.warning
23 sections when building shared libraries.
28 * elf32-arm.c (elf32_arm_gc_sweep_hook): Use the computed dynamic
33 * xcofflink.c (xcoff_link_add_symbols): Handle C_DWARF symbols.
34 (xcoff_sweep): Always keep dwarf sections.
35 (xcoff_link_input_bfd): Handle dwarf symbols and sections.
39 * libxcoff.h (struct xcoff_dwsect_name): New type.
40 (XCOFF_DWSECT_NBR_NAMES): New macro.
41 (xcoff_dwsect_names): Declare.
42 * coffcode.h (sec_to_styp_flags): Handle xcoff dwarf sections.
43 (styp_to_sec_flags): Ditto.
44 (coff_new_section_hook): Ditto.
45 (coff_slurp_symbol_table): Handle C_DWARF and C_INFO.
46 * coff-rs6000.c (xcoff_dwsect_name): New variable.
51 * elf32-rx.c (ignore_lma): New variable.
52 (bfd_elf32_rx_set_target_flags): Add ignore_lma parameter.
53 (rx_modify_program_headers): Only copy the LMA into the VMA if
59 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Adjust "notice" call.
60 * elflink.c (elf_link_add_object_symbols): Likewise.
61 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
65 * linker.c (_bfd_generic_link_add_one_symbol): Don't init u.undef.weak.
69 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and
70 global GOT entries for GOT_PAGE relocations against global symbols.
74 * config.bfd (tic6x-*-elf, tic6x-*-uclinux): New.
75 (tic6x-*-*): Replaced by these.
76 * elf32-tic6x.c (elf32_tic6x_set_osabi): New static function.
77 (elf32_tic6x_check_relocs): Create dynamic sections if -shared.
78 (elf_backend_relocs_compatible, elf_backend_post_process_headers):
80 (elf32_bed, TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM,
81 TARGET_BIG_NAME, ELF_OSABI): Redefine twice, and include
82 "elf32-target.h" two more times.
83 * configure.in: Handle bfd_elf32_tic6x_linux_be_vec,
84 bfd_elf32_tic6x_linux_le_vec, bfd_elf32_tic6x_elf_be_vec and
85 bfd_elf32_tic6x_elf_le_vec.
86 * configure: Regenerate.
90 * config.bfd: Add targets x86_64-*-pe and x86_64-*-pep.
94 * config.in: Regenerated.
95 * configure: Regenerated.
96 * configure.in: New tests for HAVE_PRPSINFO_T_PR_PID,
97 HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and
98 HAVE_PSINFO32_T_PR_PID.
99 * elf.c (elfcore_grok_psinfo): Protect reading psinfo.pr_pid by
100 HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID
101 and HAVE_PSINFO32_T_PR_PID.
102 * hosts/x86-64linux.h (HAVE_PRPSINFO32_T_PR_PID): New redefinition.
106 * elf.c (elfcore_grok_psinfo): Initialize CORE_PID for both native and
108 * elf32-ppc.c (ppc_elf_grok_psinfo): Initialize core_pid.
109 * elf64-ppc.c (ppc64_elf_grok_psinfo): Likewise.
113 * bfd-in.h (elf32_tic6x_fix_exidx_coverage): Add prototype.
114 * bfd-in2.h: Regenerate.
115 * elf32-tic6x.c: Include limits.h.
116 (tic6x_unwind_edit_type, tic6x_unwind_table_edit,
117 _tic6x_elf_section_data): New.
118 (elf32_tic6x_section_data): Define.
119 (elf32_tic6x_new_section_hook): Allocate target specific data.
120 (elf32_tic6x_add_unwind_table_edit): New function.
121 (get_tic6x_elf_section_data, elf32_tic6x_adjust_exidx_size,
122 elf32_tic6x_insert_cantunwind_after, elf32_tic6x_add_low31,
123 elf32_tic6x_copy_exidx_entry): New functions.
124 (elf_backend_write_section): Define.
128 * elf32-tic6x.c (is_tic6x_elf_unwind_section_name,
129 elf32_tic6x_fake_sections): New functions.
130 (elf_backend_fake_sections): Define.
134 * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): New function.
135 (elf_backend_gc_mark_extra_sections): Define.
140 * cofflink.c (bfd_coff_link_input_bfd): Check for and warn about
141 references to symbols defined in discarded sections.
146 * coffgen.c (coff_write_symbol): Assume input section is its own
147 output section if output_section member not set.
148 (coff_write_alien_symbol): Likewise.
153 * elf.c (_bfd_elf_section_offset): Check SEC_ELF_REVERSE_COPY.
155 * elflink.c (elf_link_input_bfd): Reverse copy .ctors/.dtors
158 * section.c (SEC_ELF_REVERSE_COPY): New.
159 * bfd-in2.h: Regenerated.
164 * libbfd.c (bfd_get_8, bfd_get_signed_8): Use const cast.
165 * bfd-in2.h: Regenerate.
169 * vms-alpha.c (evax_section_flags): Remove SEC_IN_MEMORY.
170 (_bfd_vms_slurp_egsd): Rename old_flags to vms_flags. Handle
171 any code section. Add comments.
172 (alpha_vms_object_p): Use void * instead of PTR.
173 (alpha_vms_create_eisd_for_section): Fix test for setting DZRO.
174 (build_module_list): Guard against no DST section. Add comments.
175 (alpha_vms_link_output_symbol): Discard undefined symbols.
176 (alpha_vms_get_section_contents): Simply memcpy if the section was
177 already loaded. Fix typo.
178 (vms_new_section_hook): Use void * instead of PTR.
179 (vms_alpha_vec): Ditto.
183 * elf32-arm.c (cortex_a8_erratum_scan): If the stub is a Thumb
184 branch to a PLT entry, redirect it to the PLT's Thumb entry point.
188 * elf32-tic6x.c (elf32_tic6x_final_link): New function.
189 (elf32_tic6x_merge_attributes): Do not warn for PID or PIC
190 mismatch. Choose the lower of the two values.
191 (bfd_elf32_bfd_final_link): New macro.
195 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
196 (bfd_xcoff_swap_aux_out): Ditto.
197 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
198 (bfd_xcoff64_swap_aux_out): Ditto.
203 * elf64-ppc.c (ppc_build_one_stub <ppc_sub_plt_call>): Clear
204 was_undefined on dot-symbols.
209 * elf32-tic6x.c (elf32_tic6x_howto_table,
210 elf32_tic6x_howto_table_rel, (elf32_tic6x_gc_sweep_hook,
211 elf32_tic6x_relocate_section, elf32_tic6x_check_relocs):
217 * elf32-i386.c (elf_i386_check_relocs): Ensure dynobj set before
218 creating ifunc sections.
219 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
223 * elf64-x86-64.c (elf_x86_64_merge_symbol): Correct parameter
228 * bfdio.c (memory_bstat): Pass correct size to memset.
232 * dwarf2.c (dwarf_debug_sections): Mark const.
233 * elf.c (special_sections): Likewise.
234 * libbfd-in.h (dwarf_debug_sections): Likewise.
235 * libbfd.h: Regenerate.
239 * coffcode.h (sec_to_styp_flags): Allow linkonce for
244 * coff64-rs6000.c: Convert to ISO-C. Remove PARAMS and PTR macros.
250 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call.
251 * linker.c (_bfd_link_hash_newfunc): Clear bitfields.
252 (_bfd_generic_link_add_one_symbol): Update "notice" call.
253 * elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when
254 it is a redef of an IR symbol in a real BFD.
258 * elf32-i386.c (elf_i386_readonly_dynrelocs): Warn relocation
259 in readonly section in a shared object.
260 (elf_i386_size_dynamic_sections): Likewise.
261 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
262 (elf_x86_64_size_dynamic_sections): Likewise.
267 * elf32-i386.c (elf_i386_readonly_dynrelocs): Skip local IFUNC
269 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
273 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Return false
274 on dynamic symbol error.
275 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
279 * config.bfd (alpha*-*-*vms*, ia64*-*-*vms*): Define targ_selvecs.
283 * hash.c (bfd_default_hash_table_size): Make it an unsigned long.
284 (bfd_hash_table_init_n): Overflow checking.
285 (bfd_hash_set_default_size): Return current size. Take unsigned long
286 arg. Add 65537 to hash_size primes.
287 * bfd-in.h (bfd_hash_set_default_size): Update prototype.
288 * bfd-in2.h: Regenerate.
292 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of
297 * libbfd.c (bfd_log2): Do return rounded up value.
298 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Replace bfd_log2
299 call with expanded old round down version of the function.
301 * archive.c (_bfd_get_elt_at_filepos): Don't release n_nfd.
302 * elflink.c (elf_link_add_object_symbols): Delete redundant code.
307 * elfcode.h (elf_slurp_symbol_table): Put common plugin IR symbols
308 in their own common section.
309 * elflink.c (elf_link_add_object_symbols): Likewise.
310 * linker.c (generic_link_check_archive_element): Don't lose flags
311 if common section is pre-existing.
312 (_bfd_generic_link_add_one_symbol): Likewise.
317 * elflink.c (_bfd_elf_merge_symbol): Update multiple_common calls.
318 * linker.c (_bfd_generic_link_add_one_symbol): Likewise. Call
319 multiple_definition regardless of allow_multiple_definition.
320 * simple.c (simple_dummy_multiple_definition): Update.
321 * xcofflink.c (xcoff_link_add_symbols): Update multiple_definition
326 * coff-rs6000.c: Convert to ISO-C. Remove PARAMS macro.
332 * bfd.c (BFD_PLUGIN): Define.
333 (BFD_FLAGS_SAVED, BFD_FLAGS_FOR_BFD_USE_MASK): Add BFD_PLUGIN.
334 * bfd-in2.h: Regenerate.
335 * elflink.c (elf_link_output_extsym): Strip undefined plugin syms.
336 * opncls.c (bfd_make_readable): Don't lose original bfd flags.
340 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Do not check for
345 * elf-bfd.h (struct sdt_note): New struct.
346 (struct elf_obj_tdata) <sdt_note_head>: New field.
347 * elf.c (elfobj_grok_stapsdt_note_1): New function.
348 (elfobj_grok_stapsdt_note): Likewise.
349 (elf_parse_notes): Added code to treat SystemTap note
354 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Do not
355 exclude empty .got sections.
359 * elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound
360 array access for BFD_RELOC_386_IRELATIVE.
364 * elf32-tic6x.c (elf32_tic6x_check_relocs): Initialize pc_count field.
369 * elf-bfd.h (has_ifunc_symbols): Renamed to has_gnu_symbols.
370 (has_gnu_symbols): Renamed from has_ifunc_symbols.
371 * elf.c (_bfd_elf_set_osabi): Use new has_gnu_symbols name.
372 * elf32-arm.c (elf32_arm_add_symbol_hook): Set has_gnu_symbols
373 also if STB_GNU_UNIQUE symbol binding was seen.
374 * elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
375 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
376 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
377 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
378 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
379 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
383 * bfd-in.h (bfd_get_section_limit): Don't use rawsize with output
385 * libbfd.c (_bfd_generic_get_section_contents): Likewise.
386 (_bfd_generic_get_section_contents_in_window): Likewise.
387 * section.c (bfd_get_section_contents): Likewise.
388 * compress.c (bfd_get_full_section_contents): Likewise.
389 * elf32-rx.c (rx_final_link): Ignore rawsize.
390 * elf32-microblaze.c (microblaze_elf_relocate_section): Use correct
391 bfd with bfd_get_section_limit.
392 * elfxx-ia64.c (elfNN_ia64_choose_gp): Add "final" parameter. Use
393 os->size during final link. Update callers.
394 * bfd-in2.h: Regenerate.
399 * elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count
400 as the number of global entries when merging with the primary GOT.
404 * elf32-i386.c: Update copyright year.
405 * elf64-x86-64.c: Likewise.
409 * peXXigen.c (_bfd_XXi_final_link_postscripte): Sort pdata in temporary
410 buffer and use rawsize for sorting.
411 * coffcode.h (coff_compute_section_file_positions): Set rawsize
412 before doing alignment.
416 * elf32-i386.c (elf_i386_relocate_section): Return relocation
417 error on unsupported relocation.
418 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
423 * hosts/x86-64linux.h (elf_prstatus32): Replace __pid_t with
429 * elf32-i386.c (elf_i386_relocate_section): Check !executable
430 instead of shared for R_386_TLS_LDO_32.
434 * Makefile.am (SOURCE_HFILES): Remove xcoff-target.h
436 * xcoff-target.h: Remove
437 * Makefile.in: Regenerate.
441 * dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification.
445 * elf32-tic6x.c (elf32_tic6x_howto_table): R_C6000_PREL31 is
447 (elf32_tic6x_howto_table_rel): Ditto.
448 (elf32_tic6x_relocate_section): Implement R_C6000_PREL31.
449 (elf32_tic6x_check_relocs): Ditto.
453 * config.bfd (thumb-*-oabi): Don't handle in list of obsolete
455 (strongarm*, thumb*, xscale*): Remove architectures.
456 (strongarm-*-kaos*, thumb-*-coff, thumb-*-elf, thumb-epoc-pe*,
457 thumb-*-pe*, strongarm-*-elf, strongarm-*-coff, xscale-*-elf,
458 xscale-*-coff): Remove targets.
462 * elfxx-ia64.c: include bfd_stdint.h
466 * elf32-tic6x.c (elf32_tic6x_relocate_section): Remove unused variable
467 dynobj and its initialization.
471 * makefile.vms (DEFS): Add HAVE_bfd_elf64_ia64_vms_vec.
472 * configure.com: Set BFD_HOST_64BIT_LONG_LONG and
473 BFD_HOST_LONG_LONG to 1.
477 * vms-alpha.c (vms_get_remaining_object_record): Fix dec-c warning.
478 (_bfd_vms_write_etir): Ditto.
479 (_bfd_vms_slurp_etir): Avoid to use intptr_t
480 * configure.com: Generate bfd_stdint.h
484 * elf32-tic6x.h (struct elf32_tic6x_params): New.
485 (elf32_tic6x_setup): Declare.
486 * elf32-tic6x.c: Include <limits.h>.
487 (ELF_DYNAMIC_LINKER, DEFAULT_STACK_SIZE, PLT_ENTRY_SIZE): Define.
488 (struct elf32_tic6x_link_hash_table, struct elf32_link_hash_entry):
490 (elf32_tic6x_link_hash_table, is_tic6x_elf): New macros.
491 (tic6x_elf_scom_section, tic6x_elf_scom_symbol,
492 tic6x_elf_scom_symbol_ptr): New static variables.
493 (elf32_tic6x_howto_table, elf32_tic6x_howto_table_rel,
494 elf32_tic6x_reloc_map): Add R_C6000_JUMP_SLOT, R_C6000_EHTYPE,
495 R_C6000_PCR_H16 and R_C6000_PCR_L16.
496 (elf32_tic6x_link_hash_newfunc, elf32_tic6x_link_hash_table_create,
497 elf32_tic6x_link_hash_table_free, elf32_tic6x_setup,
498 elf32_tic6x_using_dsbt, elf32_tic6x_install_rela,
499 elf32_tic6x_create_dynamic_sections, elf32_tic6x_make_got_dynreloc,
500 elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_gc_sweep_hook,
501 elf32_tic6x_adjust_dynamic_symbol): New static functions.
502 (elf32_tic6x_relocate_section): For R_C6000_PCR_S21, convert branches
503 to weak symbols as required by the ABI.
504 Handle GOT and DSBT_INDEX relocs, and copy relocs to the output file
505 as needed when generating DSBT output.
506 (elf32_tic6x_check_relocs, elf32_tic6x_add_symbol_hook,
507 elf32_tic6x_symbol_processing, elf32_tic6x_section_from_bfd_section,
508 elf32_tic6x_allocate_dynrelocs, elf32_tic6x_size_dynamic_sections,
509 elf32_tic6x_always_size_sections, elf32_tic6x_modify_program_headers,
510 elf32_tic6x_finish_dynamic_sections, elf32_tic6x_plt_sym_val,
511 elf32_tic6x_copy_private_data, elf32_tic6x_link_omit_section_dynsym):
512 New static functions.
513 (ELF_MAXPAGESIZE): Define to 0x1000.
514 (bfd_elf32_bfd_copy_private_bfd_data,
515 bfd_elf32_bfd_link_hash_table_create,
516 bfd_elf32_bfd_link_hash_table_free, elf_backend_can_refcount,
517 elf_backend_want_got_plt, elf_backend_want_dynbss,
518 elf_backend_plt_readonly, elf_backend_got_header_size,
519 elf_backend_gc_sweep_hook, elf_backend_modify_program_headers,
520 elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
521 elf_backend_check_relocs, elf_backend_add_symbol_hook,
522 elf_backend_symbol_processing, elf_backend_link_output_symbol_hook,
523 elf_backend_section_from_bfd_section,
524 elf_backend_finish_dynamic_symbol, elf_backend_always_size_sections,
525 elf32_tic6x_size_dynamic_sections, elf_backend_finish_dynamic_sections,
526 elf_backend_omit_section_dynsym, elf_backend_plt_sym_val): Define.
528 * bfd/reloc.c (BFD_RELOC_C6000_JUMP_SLOT, BFD_RELOC_C6000_EHTYPE,
529 BFD_RELOC_C6000_PCR_H16, BFD_RELOC_C6000_PCR_S16): Add.
530 * bfd/bfd-in2.h: Regenerate.
531 * bfd/libbfd.h: Regenerate.
532 * config.bfd: Accept tic6x-*-* instead of tic6x-*-elf.
536 * coffcode.h (coff_slurp_symbol_table): Silently discard C_NULL
537 entry on xcoff when value is C_NULL_VALUE.
541 * libcoff-in.h (exec_hdr): Remove.
542 * libcoff.h: Regenerate.
546 * po/da.po: Updated Danish translation.
550 * elf64-alpha.c (elf64_alpha_gc_mark_hook): New.
551 (elf64_alpha_gc_sweep_hook): New.
552 (elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook): New.
553 (elf_backend_can_gc_sections): New.
557 * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*.
558 * configure.in: Delete unused bfd_elf32_i386_dragonfly_vec.
559 * configure: Regenerate.
563 * coffcode.h (coff_set_alignment_hook): Check return of bfd_seek.
567 * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Allow the use
568 of find_nearest_line on object files.
572 * vms-alpha.c (evax_section_flags): Make $CODE$ section read-only.
574 (alpha_vms_create_eisd_for_section): Make code sections read-only.
578 * elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where
579 old-style __tls_get_addr calls without marker relocs don't match
580 their arg setup insn one for one. If such mismatches are found
581 report the reloc and don't do any tls optimization.
582 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
586 * bfd-in2.h: Regenerate.
590 * archures.c: Add AVR XMEGA architecture information.
591 * cpu-avr.c (arch_info_struct): Likewise.
592 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
593 (elf32_avr_object_p): Likewise.
597 * reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation.
598 * bfd-in2.h: Regenerate.
599 * elf32-arm.c (elf32_arm_howto_table_2): Rename existing definition
600 to elf32_arm_howto_table_3 and replace with a single R_ARM_IRELATIVE
602 (elf32_arm_howto_from_type): Update accordingly.
603 (elf32_arm_reloc_map): Map BFD_RELOC_ARM_IRELATIVE to R_ARM_IRELATIVE.
604 (elf32_arm_reloc_name_lookup): Handle elf32_arm_howto_table_3.
605 (arm_plt_info): New structure, split out from elf32_arm_link_hash_entry
606 with an extra noncall_refcount field.
607 (arm_local_iplt_info): New structure.
608 (elf_arm_obj_tdata): Add local_iplt.
609 (elf32_arm_local_iplt): New accessor macro.
610 (elf32_arm_link_hash_entry): Replace plt_thumb_refcount,
611 plt_maybe_thumb_refcount and plt_got_offset with an arm_plt_info.
612 Change tls_type to a bitfield and add is_iplt.
613 (elf32_arm_link_hash_newfunc): Update accordingly.
614 (elf32_arm_allocate_local_sym_info): New function.
615 (elf32_arm_create_local_iplt): Likewise.
616 (elf32_arm_get_plt_info): Likewise.
617 (elf32_arm_plt_needs_thumb_stub_p): Likewise.
618 (elf32_arm_get_local_dynreloc_list): Likewise.
619 (create_ifunc_sections): Likewise.
620 (elf32_arm_copy_indirect_symbol): Update after the changes to
621 elf32_arm_link_hash_entry. Assert the is_iplt has not yet been set.
622 (arm_type_of_stub): Add an st_type argument. Use elf32_arm_get_plt_info
623 to get PLT information. Assert that all STT_GNU_IFUNC references
624 are turned into PLT references.
625 (arm_build_one_stub): Pass the symbol type to
626 elf32_arm_final_link_relocate.
627 (elf32_arm_size_stubs): Pass the symbol type to arm_type_of_stub.
628 (elf32_arm_allocate_irelocs): New function.
629 (elf32_arm_add_dynreloc): In static objects, use .rel.iplt for
631 (elf32_arm_allocate_plt_entry): New function.
632 (elf32_arm_populate_plt_entry): Likewise.
633 (elf32_arm_final_link_relocate): Add an st_type parameter.
634 Set srelgot to null for static objects. Use separate variables
635 to record which st_value and st_type should be used when generating
636 a dynamic relocation. Use elf32_arm_get_plt_info to find the
637 symbol's PLT information, setting has_iplt_entry, splt,
638 plt_offset and gotplt_offset accordingly. Check whether
639 STT_GNU_IFUNC symbols should resolve to an .iplt entry, and change
640 the relocation target accordingly. Broaden assert to include
641 .iplts. Don't set sreloc for static relocations. Assert that
642 we only generate dynamic R_ARM_RELATIVE relocations for R_ARM_ABS32
643 and R_ARM_ABS32_NOI. Generate R_ARM_IRELATIVE relocations instead
644 of R_ARM_RELATIVE relocations if the target is an STT_GNU_IFUNC
645 symbol. Pass the symbol type to arm_type_of_stub. Conditionally
646 resolve GOT references to the .igot.plt entry.
647 (elf32_arm_relocate_section): Update the call to
648 elf32_arm_final_link_relocate.
649 (elf32_arm_gc_sweep_hook): Use elf32_arm_get_plt_info to get PLT
650 information. Treat R_ARM_REL32 and R_ARM_REL32_NOI as call
651 relocations in shared libraries and relocatable executables.
652 Count non-call PLT references. Use elf32_arm_get_local_dynreloc_list
653 to get the list of dynamic relocations for a local symbol.
654 (elf32_arm_check_relocs): Always create ifunc sections. Set isym
655 at the same time as setting h. Use elf32_arm_allocate_local_sym_info
656 to allocate local symbol information. Treat R_ARM_REL32 and
657 R_ARM_REL32_NOI as call relocations in shared libraries and
658 relocatable executables. Record PLT information for local
659 STT_GNU_IFUNC functions as well as global functions. Count
660 non-call PLT references. Use elf32_arm_get_local_dynreloc_list
661 to get the list of dynamic relocations for a local symbol.
662 (elf32_arm_adjust_dynamic_symbol): Handle STT_GNU_IFUNC symbols.
663 Don't remove STT_GNU_IFUNC PLTs unless all references have been
664 removed. Update after the changes to elf32_arm_link_hash_entry.
665 (allocate_dynrelocs_for_symbol): Decide whether STT_GNU_IFUNC PLT
666 entries should live in .plt or .iplt. Check whether the .igot.plt
667 and .got entries can be combined. Use elf32_arm_allocate_plt_entry
668 to allocate .plt and .(i)got.plt entries. Detect which .got
669 entries will need R_ARM_IRELATIVE relocations and use
670 elf32_arm_allocate_irelocs to allocate them. Likewise other
671 non-.got dynamic relocations.
672 (elf32_arm_size_dynamic_sections): Allocate .iplt, .igot.plt
673 and dynamic relocations for local STT_GNU_IFUNC symbols.
674 Check whether the .igot.plt and .got entries can be combined.
675 Detect which .got entries will need R_ARM_IRELATIVE relocations
676 and use elf32_arm_allocate_irelocs to allocate them. Use stashed
677 section pointers intead of strcmp checks. Handle iplt and igotplt.
678 (elf32_arm_finish_dynamic_symbol): Use elf32_arm_populate_plt_entry
679 to fill in .plt, .got.plt and .rel(a).plt entries. Point
680 STT_GNU_IFUNC symbols at an .iplt entry if non-call relocations
682 (elf32_arm_output_plt_map_1): New function, split out from
683 elf32_arm_output_plt_map. Handle .iplt entries. Use
684 elf32_arm_plt_needs_thumb_stub_p.
685 (elf32_arm_output_plt_map): Call it.
686 (elf32_arm_output_arch_local_syms): Add mapping symbols for
688 (elf32_arm_swap_symbol_in): Handle Thumb STT_GNU_IFUNC symbols.
689 (elf32_arm_swap_symbol_out): Likewise.
690 (elf32_arm_add_symbol_hook): New function.
691 (elf_backend_add_symbol_hook): Define for all targets.
695 * elf-bfd.h (elf_link_hash_entry): Add target_internal.
696 * elf.c (swap_out_syms): Set st_target_internal for each
698 * elfcode.h (elf_swap_symbol_in): Likewise.
699 * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
700 * elf32-sh-symbian.c (sh_symbian_relocate_section): Likewise.
701 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
702 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
703 * elflink.c (elf_link_output_extsym): Likewise.
704 (bfd_elf_final_link): Likewise.
705 (elf_link_add_object_symbols): Copy st_target_internal
706 to the hash table if we see a definition.
707 (_bfd_elf_copy_link_hash_symbol_type): Copy target_internal.
708 * elf32-arm.c (elf32_arm_stub_hash_entry): Replace st_type with
710 (a8_erratum_fix, a8_erratum_reloc): Likewise.
711 (arm_type_of_stub): Replace actual_st_type with an
712 actual_branch_type parameter.
713 (arm_build_one_stub): Use branch types rather than st_types to
714 determine the type of branch.
715 (cortex_a8_erratum_scan): Likewise.
716 (elf32_arm_size_stubs): Likewise.
717 (bfd_elf32_arm_process_before_allocation): Likewise.
718 (allocate_dynrelocs_for_symbol): Likewise.
719 (elf32_arm_finish_dynamic_sections): Likewise.
720 (elf32_arm_final_link_relocate): Replace sym_flags parameter with
721 a branch_type parameter.
722 (elf32_arm_relocate_section): Update call accordingly.
723 (elf32_arm_adjust_dynamic_symbol): Don't check STT_ARM_TFUNC.
724 (elf32_arm_output_map_sym): Initialize st_target_internal.
725 (elf32_arm_output_stub_sym): Likewise.
726 (elf32_arm_symbol_processing): Delete.
727 (elf32_arm_swap_symbol_in): Convert STT_ARM_TFUNCs into STT_FUNCs.
728 Use st_target_internal to record the branch type.
729 (elf32_arm_swap_symbol_out): Use st_target_internal to test for
731 (elf32_arm_is_function_type): Delete.
732 (elf_backend_symbol_processing): Likewise.
733 (elf_backend_is_function_type): Likewise.
737 * elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
738 (elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
743 * elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
744 may_need_local_target_p and may_become_dynamic_p to classify
745 the relocation type. Don't check info->symbolic or h->def_regular
746 when deciding whether to record a potential dynamic reloc.
747 Don't treat potential dynamic relocs as PLT references.
748 (elf32_arm_gc_sweep_hook): Update to match. Assert that we don't
749 try to make the PLT reference count go negative.
753 * elf32-arm.c (elf32_arm_final_link_relocate): Always fill in the
754 GOT entry here, rather than leaving it to finish_dynamic_symbol.
755 Only create a dynamic relocation for local references if
757 (allocate_dynrelocs_for_symbol): Update dynamic relocation
758 allocation accordingly.
759 (elf32_arm_finish_dynamic_symbol): Don't initialise the GOT entry here.
763 * elf32-arm.c (elf32_arm_allocate_dynrelocs): New function.
764 (elf32_arm_add_dynreloc): Likewise.
765 (elf32_arm_adjust_dynamic_symbol): Use elf32_arm_allocate_dynrelocs
766 to allocate dynamic relocations.
767 (elf32_arm_size_dynamic_sections): Likewise.
768 (allocate_dynrelocs): Likewise. Rename to
769 allocate_dynrelocs_for_symbol.
770 (elf32_arm_final_link_relocate): Use elf32_arm_add_dynreloc to
771 create dynamic relocations.
772 (elf32_arm_finish_dynamic_symbol): Likewise.
776 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
777 x32 GD->IE and GD->LE transitions.
778 (elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE
779 and LD->LE transitions.
783 * elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset
784 for LO_DS error message and correct multiple.
788 * elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define.
789 (ppc64_elf_link_just_syms): New function.
790 (opd_entry_value): Don't assume big-endian host.
791 (get_r2off): New function.
792 (ppc_build_one_stub, ppc_size_one_stub): Use it here.
796 * compress.c (bfd_compress_section_contents): Check for out of mem.
798 * elf64-x86-64.c (elf_x86_64_relocate_section): Document
799 that case statement falls through intentionally.
801 * elf32-i386.c (elf_i386_relocate_section): Document fall through.
805 * archive.c (bsd_write_armap): Don't call stat in deterministic
806 mode, and don't use st_mtime if stat returns error.
810 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove dead code.
812 * coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error.
814 * aoutx.h (aout_final_link): Use sizeof int not sizeof int*.
815 (aout_link_write_other_symbol): Missing break statement.
817 * dwarf2.c (scan_unit_for_symbols): Stop memory leak.
819 * archive.c (_bfd_slurp_extended_name_table): Fail if bfd_seek fails.
823 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
824 x32 IE->LE transition.
825 (elf_x86_64_relocate_section): Likewise.
829 * elflink.c (is_reloc_section): Remove function.
830 (get_dynamic_reloc_section_name): Construct string manually.
834 * archive.c (_bfd_find_nested_archive): Use filename_(n)cmp.
835 (adjust_relative_path): Likewise.
836 (_bfd_construct_extended_name_table): Likewise.
837 * corefile.c (generic_core_file_matches_executable_p): Likewise.
838 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
839 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
840 * elf32-spu.c (sort_bfds): Likewise.
841 (spu_elf_auto_overlay): Likewise.
842 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
843 * xcofflink.c (xcoff_set_import_path): Likewise.
844 * xtensa-isa.c (xtensa_regfile_lookup): Likewise.
845 (xtensa_regfile_lookup_shortname): Likewise.
850 * archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and
851 stringsize. Properly sanity check symdef_count. Remove redundant
856 * plugin.c (bfd_plugin_object_p): Correctly set the filesize
857 and handle claim_file seeking. Only try to load the plugin once.
861 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
862 relocation read the value from the second GOT slot.
866 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
870 * elf64-ppc.c (ppc64_elf_edit_toc): Reinstate second read of
871 toc relocs. Fuss over free(NULL).
875 * elflink.c (bfd_elf_size_dynamic_sections): Add
876 bfd_get_symbol_leading_char to the start of newname.
880 * configure: Regenerate.
884 * elf64-ppc.c (ppc64_elf_edit_toc): Don't free toc relocs until
885 we are done. When optimising large toc, check that a global
886 symbol on a toc reloc is defined in a kept section.
891 * elf.c (assign_file_positions_for_load_sections): Set the program
892 header offset and entry size to zero if there are no program
897 * elf64-ppc.c (ppc64_elf_edit_toc): Don't segfault on NULL
898 local_syms when looking for local symbols in .toc.
902 * elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value
903 for toc pointer on any section having makes_toc_func_call set.
904 (check_pasted_section): Ensure pasted .init/.fini fragments use
905 the same toc if any has makes_toc_func_call set.
909 * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
914 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
919 * elf64-x86-64.c (elf_backend_want_plt_sym): Redefine to 0 after
924 Fix compilation for mingw64.
925 * coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate
926 typecast to avoid warning.
927 * elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type
929 * elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead
930 of long for pointer to avoid warning.
931 (elfNN_ia64_relax_brl): Idem.
932 (elfNN_ia64_install_value): Idem.
933 * vms-alpha.c (_bfd_vms_slurp_etir): Idem.
937 * elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than
938 h->needs_plt when deciding whether to record a possible dynamic reloc.
942 * elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
943 dynamic relocs for the removed section.
947 * elf64-x86-64.c (elf_x86_64_check_relocs): Check invalid x32
952 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type.
953 (elf_x86_64_link_hash_table_create): Set pointer_r_type.
954 (elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64
955 for ILP32. Remove ABI_64_P PIC check for R_X86_64_8,
956 R_X86_64_16, R_X86_64_32 and R_X86_64_32S.
957 (elf_x86_64_relocate_section): Handle R_X86_64_32 like R_X86_64_64
962 * bfd.c (bfd_perror): Flush stdout before and stderr after printing
964 (_bfd_default_error_handler): Likewise.
965 * elf.c (print_segment_map): Likewise.
966 * libbfd.c (warn_deprecated): Likewise.
967 * som.c (som_sizeof_headers): No need to do so here.
968 * coff-i860.c: Replace use of printf for error messages with
970 * coff-ppc.c: Likewise.
971 * coff-sh.c: Likewise.
972 * elf32-bfin.c: Likewise.
973 * elf32-dlx.c: Likewise.
974 * elf32-mep.c: Likewise.
975 * elf32-v850.c: Likewise.
976 * mach-o.c: Likewise.
981 * elf64-x86-64.c (elf_x86_64_link_hash_table): Remove
983 (elf_x86_64_link_hash_table_create): Don't set swap_reloca_out.
984 (elf_x86_64_check_relocs): Align relocation section to 4 byte
986 (elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with
988 (elf_x86_64_finish_dynamic_symbol): Updated.
989 (elf_x86_64_finish_dynamic_sections): Don't use
990 Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor
991 bfd_elf64_swap_dyn_out.
996 * elf32-arm.c (allocate_dynrelocs): Don't set up eh before
997 following bfd_link_hash_warning symbol link.
1002 * reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL,
1003 BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ,
1004 BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New
1006 * libbfd.h: Rebuilt.
1007 * bfd-in2.h: Rebuilt.
1008 * elf32-arm.c (elf32_arm_howto_table_1): Add new relocations.
1009 (elf32_arm_reloc_map): Likewise.
1010 (tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates.
1011 (elf32_arm_stub_long_branch_any_tls_pic,
1012 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates.
1013 (DEF_STUBS): Add new stubs.
1014 (struct_elf_arm_obj_data): Add local_tlsdesc_gotent field.
1015 (elf32_arm_local_tlsdesc_gotent): New.
1016 (GOT_TLS_GDESC): New mask.
1017 (GOT_TLS_GD_ANY): Define.
1018 (struct elf32_arm_link_hash_entry): Add tlsdesc_got field.
1019 (elf32_arm_compute_jump_table_size): New.
1020 (struct elf32_arm_link_hash_table): Add next_tls_desc_index,
1021 num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline,
1022 sgotplt_jump_table_size fields.
1023 (elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field.
1024 (elf32_arm_link_hash_table_create): Initialize new fields.
1025 (arm_type_of_stub): Check TLS desc relocs too.
1026 (elf32_arm_stub_name): TLS desc relocs can be shared.
1027 (elf32_arm_tls_transition): Determine relaxation.
1028 (arm_stub_required_alignment): Add tls stubs.
1029 (elf32_arm_size_stubs): Likewise.
1030 (elf32_arm_tls_relax): Perform TLS relaxing.
1031 (elf32_arm_final_link_relocate): Process TLS DESC relocations.
1032 (IS_ARM_TLS_GNU_RELOC): New.
1033 (IS_ARM_TLS_RELOC): Use it.
1034 (elf32_arm_relocate_section): Perform TLS relaxing.
1035 (elf32_arm_check_relocs): Anticipate TLS relaxing, process tls
1037 (allocate_dynrelocs): Allocate tls desc relcoations.
1038 (elf32_arm_output_arch_local_syms): Emit tls trampoline mapping
1040 (elf32_arm_size_dynamic_sections): Allocate tls trampolines and
1042 (elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE
1044 (elf32_arm_finish_dynamic_symbol): Adjust.
1045 (arm_put_trampoline): New.
1046 (elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls
1048 (elf_backend_always_size_sections): Define.
1052 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Optimized.
1058 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
1059 handle symbols marked with regular reference, but not non-GOT
1060 reference when building shared library.
1062 * elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
1063 local and global STT_GNU_IFUNC symols when building shared
1065 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
1069 * reloc.c: Add BFD_RELOC_RX_OP_NEG.
1070 * libbfd.h: Regenerate.
1071 * bfd-in2.h: Regenerate.
1072 * elf32-rx.c: Add it to the list, corresponding to R_RX_OPneg.
1076 * cpu-i386.c (bfd_i386_compatible): New.
1077 (bfd_x64_32_arch_intel_syntax): Replace bfd_default_compatible
1078 with bfd_i386_compatible.
1079 (bfd_x86_64_arch_intel_syntax): Likewise.
1080 (bfd_i386_arch_intel_syntax): Likewise.
1081 (i8086_arch): Likewise.
1082 (bfd_x64_32_arch): Likewise.
1083 (bfd_x86_64_arch): Likewise.
1084 (bfd_i386_arch): Likewise.
1086 For older changes see ChangeLog-2010
1092 version-control: never