summaryrefslogtreecommitdiffstats
path: root/bfd/elflink.h
Commit message (Collapse)AuthorAgeFilesLines
* * elflink.c (_bfd_elf_link_create_dynamic_sections): Move fromAlan Modra2003-05-091-2135/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align. (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align. (bfd_elf_record_link_assignment): Move from elflink.h. (_bfd_elf_merge_symbol): Likewise. (_bfd_elf_add_default_symbol): Likewise. (_bfd_elf_export_symbol): Likewise. (_bfd_elf_link_find_version_dependencies): Likewise. (_bfd_elf_link_assign_sym_version): Likewise. (_bfd_elf_link_read_relocs): Likewise. (_bfd_elf_link_size_reloc_section): Likewise. (_bfd_elf_fix_symbol_flags): Likewise. (_bfd_elf_adjust_dynamic_symbol): Likewise. (_bfd_elf_link_sec_merge_syms): Likewise. (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel and bed->s->sizeof_rela. (_bfd_elf_link_output_relocs): Likewise. * elf-bfd.h (struct elf_size_info): Rename file_align to log_file_align. (struct elf_info_failed): Move from elflink.h. (struct elf_assign_sym_version_info): Likewise. (struct elf_find_verdep_info): Likewise. (_bfd_elf_create_dynamic_sections): Delete duplicate declaration. (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol, _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies, _bfd_elf_link_assign_sym_version, _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs, _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs, _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol, _bfd_elf_link_sec_merge_syms): Declare. (bfd_elf32_link_create_dynamic_sections): Don't declare. (_bfd_elf32_link_read_relocs): Likewise. (bfd_elf64_link_create_dynamic_sections): Likewise. (_bfd_elf64_link_read_relocs): Likewise. * elflink.h: Move lots o' stuff elsewhere. * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare. (bfd_elf64_record_link_assignment): Likewise. (bfd_elf_record_link_assignment): Declare. * bfd-in2.h: Regenerate. * elfcode.h (elf_link_create_dynamic_sections): Don't declare. (NAME(_bfd_elf,size_info)): Adjust for log_file_align. * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align. (assign_file_positions_for_segments): Likewise. (assign_file_positions_except_relocs): Likewise. (swap_out_syms, elfcore_write_note): Likewise. * elf-m10200.c: Adjust for changed function names. * elf-m10300.c: Likewise. * elf32-arm.h: Likewise. * elf32-h8300.c: Likewise. * elf32-hppa.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mips.c: Likewise. * elf32-ppc.c: Likewise. * elf32-sh.c: Likewise. * elf32-v850.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-sh64.c: Likewise. * elfxx-ia64.c: Likewise. * elfxx-mips.c: Likewise. (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align. * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align. * elf64-hppa.c (hppa64_elf_size_info): Likewise. * elf64-mips.c (mips_elf64_size_info): Likewise. * elf64-s390.c (s390_elf64_size_info): Likewise. * elf64-sparc.c (sparc64_elf_size_info): Likewise.
* 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2003-05-081-1/+2
| | | | | * elflink.h (elf_add_default_symbol): After skipping the unversioned symbol, go to non-default one.
* 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2003-05-081-7/+32
| | | | | | | | * elflink.h (elf_link_check_versioned_symbol): Also handle the case that a DSO references a hidden symbol which may be satisfied by a versioned symbol in another DSO. (elf_link_output_extsym): Check versioned definition for hidden symbol referenced by a DSO.
* bfd/H.J. Lu2003-05-051-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-05-04 H.J. Lu <hjl@gnu.org> * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic relocation entries for weak undefined symbols with non-default visibility. (elf_i386_relocate_section): Initialize the GOT entries and skip R_386_32/R_386_PC32 for weak undefined symbols with non-default visibility. * elfxx-ia64.c (allocate_fptr): Don't allocate function descriptors for weak undefined symbols with non-default visibility. (allocate_dynrel_entries): Don't allocate relocation entries for symbols resolved to 0. (set_got_entry): Don't install dynamic relocation for weak undefined symbols with non-default visibility. (set_pltoff_entry): Likewise. * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols with non-default visibility. (elf_link_output_extsym): Don't make weak undefined symbols with non-default visibility dynamic. ld/testsuite/ 2003-05-04 H.J. Lu <hjl@gnu.org> * ld-elfvsb/main.c: Updated. * ld-elfvsb/sh1.c: Likewise.
* bfd/H.J. Lu2003-05-051-15/+62
| | | | | | | | | | | | | | | | 2003-05-04 H.J. Lu <hjl@gnu.org> * elflink.h (elf_merge_symbol): Correctly handle weak definiton. ld/testsuite/ 2003-05-04 H.J. Lu <hjl@gnu.org> * ld-elfvers/vers18.dsym: Updated for weak definiton change. * ld-elfvers/vers18.ver: Likewise. * ld-elfvers/vers19.ver: Likewise. * ld-elfweak/elfweak.exp: Remove xfail.
* 2003-05-04 H.J. Lu <hjl@gnu.org>H.J. Lu2003-05-051-4/+21
| | | | | | | * elflink.h (elf_merge_symbol): Don't record a hidden/internal symbol dynamic. Check indirection when removing the old definition for symbols with non-default visibility. (elf_add_default_symbol): Skip when told by elf_merge_symbol.
* bfd/H.J. Lu2003-04-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-04-28 H.J. Lu <hjl@gnu.org> * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol to copy any information related to dynamic linking when we flip the indirection. ld/testsuite/ 2003-04-28 H.J. Lu <hjl@gnu.org> * ld-elfvers/vers.exp (picflag): Set PIC flag for compiler. (build_vers_lib): Support PIC. (build_vers_lib_no_pic): New. Change all calls to build_vers_lib to build_vers_lib_no_pic. (build_vers_lib_pic): New. Add tests vers26a, vers26b1, vers26b2 and vers26b3 for versioned definition vs. normal definition in different files. * ld-elfvers/vers26a.c: New file. * ld-elfvers/vers26a.dsym: Likewise. * ld-elfvers/vers26a.map: Likewise. * ld-elfvers/vers26a.ver: Likewise. * ld-elfvers/vers26b.c: Likewise. * ld-elfvers/vers26b.dsym: New empty file. * ld-elfvers/vers26b.ver: Likewise.
* bfd/H.J. Lu2003-04-281-13/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-04-27 H.J. Lu <hjl@gnu.org> * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New. (ELF_LINK_DYNAMIC_WEAK): New. * elflink.h (elf_merge_symbol): Add one argument to indicate if a symbol should be skipped. Ignore definitions in dynamic objects for symbols with non-default visibility. (elf_add_default_symbol): Adjusted. (elf_link_add_object_symbols): Check if a symbol should be skipped. Don't merge the visibility field with the one from a dynamic object. (elf_link_check_versioned_symbol): Use undef_bfd. (elf_link_output_extsym): Warn if a forced local symbol is referenced from dynamic objects. Make non-weak undefined symbol with non-default visibility a fatal error. ld/testsuite/ 2003-04-27 H.J. Lu <hjl@gnu.org> * ld-elfvsb/elfvsb.dat: Updated. * ld-elfvsb/elfvsb.exp: Likewise. * ld-elfvsb/main.c: Likewise. * ld-elfvsb/sh1.c: Likewise. * ld-elfvsb/sh2.c: Likewise.
* 2003-04-25 Alan Modra <amodra@bigpond.net.au>H.J. Lu2003-04-251-15/+30
| | | | | | * elflink.h (elf_merge_symbol): When we find a regular definition for an indirect symbol, flip the indirection so that the old direct symbol now points to the new definition.
* Properly report filename for alignment reduction.Nick Clifton2003-04-151-6/+20
| | | | Add test for alignment reduction.
* Maintain maximum alignment for common symbols. Warn reducing alignment forNick Clifton2003-04-141-7/+62
| | | | common symbols. Report old filename when symbol size changes.
* Fix memory leaksNick Clifton2003-03-311-0/+1
|
* 2003-03-28 H.J. Lu <hjl@gnu.org>H.J. Lu2003-03-291-2/+8
| | | | | * elflink.h (elf_link_add_object_symbols): Correctly combine visibilities.
* 2003-03-06 Jakub Jelinek <jakub@redhat.com>Andrew Haley2003-03-061-3/+5
| | | | | | | Andrew Haley <aph@redhat.com> * elflink.h (elf_bfd_discard_info): Don't process eh frames if output is relocateable.
* * elflink.h (elf_link_read_relocs_from_section): Don't abort withAlan Modra2003-02-251-1/+4
| | | | wrong reloc sizes.
* * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdrAlan Modra2003-02-251-61/+59
| | | | | and rel_hdr2 when initially counting input relocs rather than after creating output reloc sections.
* Fix the behaviour of --allow-shlib-undefined, so that it does what it claimsNick Clifton2003-02-171-14/+13
| | | | to do. Add an inverse switch. Update the documentation.
* bfd/Jakub Jelinek2003-02-131-0/+70
| | | | | | | | | | | | | | | | | | | | * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO. ld/testsuite/ * ld-shared/shared.exp: Run on s390*-*-linux* and x86_64-*-linux* too. xfail tests linking non-pic code into shared libs on x86_64-*-linux*. * ld-elfvsb/elfvsb.exp: Likewise. * ld-elfvers/vers.exp: Likewise. Add vers24a, vers24b and vers24c tests. * ld-elfvers/vers3.ver: Allow VERS_2.0 to come before GLIBC_* version. * ld-elfvers/vers19.ver: Likewise. * ld-elfvers/vers24a.c: New test. * ld-elfvers/vers24b.c: New test. * ld-elfvers/vers24c.c: New test. * ld-elfvers/vers24.map: New test. * ld-elfvers/vers24.rd: New test. * lib/ld-lib.exp (run_ld_link_tests): Add optional 7th argument cflags. If source files have .c extension, compile them first.
* * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.Alan Modra2003-02-041-7/+7
| | | | | | | | | | | | | | | | | | | | | (struct elf_link_hash_entry): Add "glist" and "plist" fields to "got" union, and declare as gotplt_union. Use gotplt_uinion for "plt" field. (struct elf_link_hash_table): Make "init_refcount" a gotplt_union. Add "init_offset" field. (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union. (elf_local_got_ents): Declare. * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got" and "plt". (_bfd_elf_link_hash_hide_symbol): Use "init_offset". (_bfd_elf_link_hash_table_init): Set "init_offset". * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount from init_offset. (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset. * elf.c (bfd_elf_local_sym_name): Split out from.. (group_signature): ..here. * elf-bfd.h (bfd_elf_local_sym_name): Declare.
* bfdAlan Modra2003-02-041-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf-bfd.h (enum elf_link_info_type): Remove. (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields to struct sec. Remove linkonce_p field. (elf_linkonce_p): Delete. (elf_discarded_section): Update for sec_info_type change. * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc, flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24. (ELF_INFO_TYPE_NONE): Define. (ELF_INFO_TYPE_STABS): Define. (ELF_INFO_TYPE_MERGE): Define. (ELF_INFO_TYPE_EH_FRAME): Define. (ELF_INFO_TYPE_JUST_SYMS): Define. (STD_SECTION): Update struct sec initializer. * ecoff.c (bfd_debug_section): Likewise. * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p. * elflink.h: Likewise. * elf-eh-frame.c: Likewise. * elf64-alpha.c: Likewise. * elfxx-ia64.c: Likewise. * elfxx-mips.c: Likewise. * bfd-in2.h: Regenerate. * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than referring to used_by_bfd. * elf64-sparc.c (sec_do_relax): Likewise. * elf64-mmix.c (mmix_elf_section_data): Likewise. * elfxx-mips.c (mips_elf_section_data): Likewise. * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro. (ieee_get_section_contents): Likewise. (ieee_new_section_hook): Formatting. (ieee_canonicalize_reloc): Remove commented out code. * mmo.c (mmo_section_data): Define. Use throughout file. * oasys.c (oasys_get_section_contents): Use oasys_per_section macro. gas * config/obj-elf.c (obj_elf_change_section): Set SEC_LINK_ONCE and SEC_LINK_DUPLICATES_DISCARD directly rather than using elf_linkonce_p.
* * elflink.h (elf_link_output_extsym): Heed strip_discarded.Alan Modra2002-12-231-5/+10
|
* Comment typo fixes.Alan Modra2002-12-121-1/+1
|
* s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. SimplifyAlan Modra2002-11-301-588/+587
| | | | comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
* include/elf/ChangeLogAlan Modra2002-11-281-332/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * internal.h (elf32_internal_ehdr, Elf32_Internal_Ehdr, elf64_internal_ehdr, Elf64_Internal_Ehdr, elf32_internal_phdr, Elf32_Internal_Phdr, elf64_internal_phdr, Elf64_Internal_Phdr, elf32_internal_shdr, Elf32_Internal_Shdr, elf64_internal_shdr, Elf64_Internal_Shdr, elf32_internal_sym, elf64_internal_sym, Elf32_Internal_Sym, Elf64_Internal_Sym, Elf32_Internal_Note, elf32_internal_note, elf32_internal_rel, Elf32_Internal_Rel, elf64_internal_rel, Elf64_Internal_Rel, elf32_internal_rela, elf64_internal_rela, Elf32_Internal_Rela, Elf64_Internal_Rela, elf32_internal_dyn, elf64_internal_dyn, Elf32_Internal_Dyn, Elf64_Internal_Dyn, elf32_internal_verdef, elf64_internal_verdef, elf32_internal_verdaux, elf64_internal_verdaux, elf32_internal_verneed, elf64_internal_verneed, elf32_internal_vernaux, elf64_internal_vernaux, elf32_internal_versym, elf64_internal_versym, Elf32_Internal_Verdef, Elf64_Internal_Verdef, Elf32_Internal_Verdaux, Elf64_Internal_Verdaux, Elf32_Internal_Verneed, Elf64_Internal_Verneed, Elf32_Internal_Vernaux, Elf64_Internal_Vernaux, Elf32_Internal_Versym, Elf64_Internal_Versym, Elf32_Internal_Syminfo, Elf64_Internal_Syminfo): Delete. (Elf_Internal_Rel): Delete. bfd/ChangeLog * elf-bfd.h: Replace occurrences of Elf32_Internal_* and Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel with Elf_Internal_Rela. * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h, elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c, elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c, elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c, elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto. * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr throughout instead. * elf.c (_bfd_elf_no_info_to_howto_rel): Delete. * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *. Remove INLINE keyword. (elf_swap_reloc_in): Likewise. Also clear r_addend. (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand as a bfd_byte *. (elf_write_relocs): Consolidate REL and RELA code. (elf_slurp_reloc_table_from_section): Simplify REL code. (NAME(_bfd_elf,size_info)): Populate reloc swap entries. * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define. * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and RELA code. (elf_link_adjust_relocs): Likewise. Don't malloc space for temp reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL. (elf_link_output_relocs): Likewise. (elf_reloc_link_order): Likewise. (elf_finish_pointer_linker_section): Likewise. (struct elf_link_sort_rela): Remove union. (elf_link_sort_cmp1): Update to suit. (elf_link_sort_cmp2): Here too. (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory over-allocation for int_rels_per_ext_rel != 1 case. * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls. * elf32-i386.c: Likewise. * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out. * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise. * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out. * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c: Likewise. * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out. * elfxx-mips.c (sort_dynamic_relocs): Likewise for bfd_elf32_swap_reloc_in. * elf32-arm.h: Update elf32_arm_info_to_howto calls. * elf32-mips.c: Likewise for mips_info_to_howto_rel. (mips_elf64_swap_reloc_in): Zero r_addend. (mips_elf64_be_swap_reloc_in): Likewise. (mips_elf64_slurp_one_reloc_table): Simplify. * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries. * elf64-hppa.c (hppa64_elf_size_info): Likewise. * elf64-sparc.c (sparc64_elf_size_info): Likewise.
* * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.Alan Modra2002-11-261-4/+15
| | | | | | | | | | | | | | (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs on a relocatable link. Comment typos. * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure in the order they are declared. Clear elf_hash_value too. (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear eh_info and tls_segment. * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets sorted when discarding relocs by turning them into R_*_NONE. * libbfd.c (warn_deprecated): Comment spelling. * po/SRC-POTFILES.in: Regenerate.
* * elflink.h (elf_link_add_object_symbols): Don't overwrite theRichard Henderson2002-11-211-15/+12
| | | | | arch's st_other bits when merging visibilities. (elf_link_output_extsym): Tidy clearing of visibility field.
* * elflink.h (elf_link_add_object_symbols): Optimize stabs forAlan Modra2002-11-121-6/+18
| | | | | | | | | | | | relocatable link too. (elf_link_input_bfd): When emitting relocs, adjust offsets for eh_frame and stab sections. Zap deleted relocs. (elf_reloc_symbol_deleted_p): Return true for zero r_symndx. (elf_bfd_discard_info): Run for relocatable link too. * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global. Handle ld -r case. (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here. * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
* * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.Alan Modra2002-11-121-43/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise. (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise. (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR. (struct eh_frame_hdr_info): Add "hdr_sec", remove "split". (struct elf_link_hash_table): Add eh_info. (struct elf_obj_tdata): Change eh_frame_hdr to an asection *. (_bfd_elf_discard_section_eh_frame): Update prototype. (_bfd_elf_discard_section_eh_frame_hdr): Likewise. (_bfd_elf_write_section_eh_frame): Likewise. (_bfd_elf_write_section_eh_frame_hdr): Likewise. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec" param. Get "hdr_info" from link hash table. (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get header section from link hash table. Save header section to elf_tdata. (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use header section from link hash table. Don't alloc hdr_info. Clear hdr_sec instead of setting "strip". (_bfd_elf_eh_frame_section_offset): Formatting. (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param. Get header section from link hash table. (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param. Get header section from link hash table. * elf.c (map_sections_to_segments): Use cached eh_frame_hdr. (get_program_header_size): Likewise. (_bfd_elf_section_offset): Formatting. * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header section pointer in link hash table. (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr and _bfd_elf_write_section_eh_frame calls. Update comment about eh_frame entries. (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr". * po/SRC-POTFILES.in: Regenerate.
* * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zeroAlan Modra2002-11-121-48/+44
| | | | | | | | | | | relocs for discarded FDEs. Remove dead code. (_bfd_elf_write_section_eh_frame_hdr): Remove dead code. * elflink.h (elf_bfd_discard_info): Don't save edited relocs. Tidy conditions under which stabs are edited. Formatting. * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows from discarded relocs. * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output section adjustments after testing magic values.
* * elflink.h (struct elf_final_link_info): Add shndxbuf_size.Alan Modra2002-11-041-26/+47
| | | | | | | | | | | | (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields. Set up a larger symshndxbuf, and write it out. Free it on exit rather than freeing symbuf twice. Correct section index on output section symbol loop. (elf_link_output_sym): Accumulate symbol extension section indices, reallocating symshndxbuf rather than writing it out. (elf_link_flush_output_syms): Don't flush symshndxbuf. * elf.c (assign_section_numbers): Init i_shdrp to all zero. Use bfd_zalloc to clear i_shdrp[0] too.
* * elflink.h (struct elf_link_sort_rela): Turn rel and relaAlexandre Oliva2002-10-221-33/+56
| | | | | | | | | into arrays. (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust. (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel into account. * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
* 2002-10-19 H.J. Lu <hjl@gnu.org>H.J. Lu2002-10-191-16/+18
| | | | | | * elflink.h (elf_link_add_object_symbols): Correctly handle DT_RPATH and DT_RUNPATH. :VS: ----------------------------------------------------------------------
* * elflink.h (elf_link_add_object_symbols): Error out on dynamic objectsAlan Modra2002-10-161-0/+7
| | | | loaded with --just-symbols.
* Fix numerous occurrences ofAlan Modra2002-10-111-10/+15
| | | | warning: dereferencing type-punned pointer will break strict-aliasing rules
* * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependentAlan Modra2002-10-071-16/+0
| | | | code.
* * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocsAlan Modra2002-09-231-1/+6
| | | | | for discarded FDEs. Remove redundant assignment. * elflink.h (elf_bfd_discard_info): Save edited relocs.
* When examining weak symbols, follow indirect links.Nick Clifton2002-09-191-1/+4
|
* * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_dataAlan Modra2002-08-221-3/+3
| | | | | | | | | | | | | | | | | | param to elf_backend_copy_indirect_symbol. (_bfd_elf_link_hash_copy_indirect): Likewise. * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust calls to copy_indirect_symbol. * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise. * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise. * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise. * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise. * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise. * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise. * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise. * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise. * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise. * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly test refcounts for "used" values.
* 2002-08-13 H.J. Lu <hjl@gnu.org>H.J. Lu2002-08-141-1/+4
| | | | | | * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count definitions in shared objects when checking symbol with undefined version.
* 2002-08-12 H.J. Lu <hjl@gnu.org>H.J. Lu2002-08-121-5/+8
| | | | | * elflink.h (elf_add_default_symbol): Preserve section across elf_merge_symbol.
* 2002-08-08 H.J. Lu <hjl@gnu.org>H.J. Lu2002-08-091-4/+7
| | | | | * elflink.h (elf_add_default_symbol): Don't warn a defintion overrides an indirect versioned symbol.
* Check symbols with undefine version.H.J. Lu2002-08-081-41/+92
|
* * elflink.h (elf_link_output_extsym): Don't output symbols fromAlan Modra2002-08-081-1/+1
| | | | SEC_EXCLUDE sections.
* * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): DefineAlan Modra2002-07-251-87/+0
| | | | | | | | | | as elf_link_record_local_dynamic_symbol. (_bfd_elf64_link_record_local_dynamic_symbol): Likewise. (elf_link_record_local_dynamic_symbol): Declare. Now returns int. * elflink.h (elf_link_record_local_dynamic_symbol): Move to.. * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an attempt is made to record a symbol in a discarded section, and return `2' in that case.
* * elflink.h (elf_link_input_bfd): Don't change internal symbolsAlan Modra2002-07-231-10/+11
| | | | when outputting relocs.
* * elflink.h: Formatting fixes, tidy prototypes.Alan Modra2002-07-161-55/+52
| | | | (elf_link_assign_sym_version): Move common code out of loop.
* * elflink.h (elf_link_input_bfd): Don't call reloc_emitter whenAlan Modra2002-07-161-6/+7
| | | | reloc section size is zero. Correct reloc output location.
* bfd/H.J. Lu2002-07-151-0/+38
| | | | | | | | | | | | | 2002-07-14 H.J. Lu <hjl@gnu.org> * elflink.h (elf_link_assign_sym_version): Hide the default definition if there is a hidden versioned definition. ld/ 2002-07-14 H.J. Lu <hjl@gnu.org> * ld.texinfo: Document a .symver takes precedence over a version script.
* * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,Alan Modra2002-07-071-430/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | change type of locsyms. (bfd_elf_get_elf_syms): Declare. * elf.c (bfd_elf_get_elf_syms): New function. (group_signature): Use bfd_elf_get_elf_syms. (bfd_section_from_r_symndx): Likewise. * elfcode.h (elf_slurp_symbol_table): Likewise. * elflink.h (elf_link_is_defined_archive_symbol): Likewise. (elf_link_add_object_symbols): Likewise. Reorganise to increase locality of various data structures. Properly free internal relocs. (elf_bfd_final_link): Properly free internal relocs. (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms. (elf_link_input_bfd): Likewise. (elf_gc_mark): Likewise. Properly free internal relocs. (elf_gc_sweep): Properly free internal relocs. (elf_reloc_symbol_deleted_p): No need to swap syms in. (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free internal relocs. * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free possibly cached info. (mn10200_elf_relax_delete_bytes): Remove symbol swapping code. (mn10200_elf_symbol_address_p): Pass in internal syms. Remove symbol swapping code. (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms. Properly free possibly cached info. * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c. (mn10300_elf_relax_delete_bytes): Likewise. (mn10300_elf_symbol_address_p): Likewise. (mn10300_elf_get_relocated_section_contents): Likewise. * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c. (elf32_h8_relax_delete_bytes): Likewise. (elf32_h8_symbol_address_p): Likewise. (elf32_h8_get_relocated_section_contents): Likewise. * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c. (m32r_elf_relax_delete_bytes): Likewise. (m32r_elf_get_relocated_section_contents): Likewise. * elf32-sh.c (sh_elf_reloc_loop): Free section contents using elf_section_data to determine whether cached. (sh_elf_relax_section): As above for elf-m10200.c. (sh_elf_relax_delete_bytes): Likewise. (sh_elf_get_relocated_section_contents): Likewise. * elf32-xstormy16.c (xstormy16_elf_relax_section): As above. * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay reading of local syms. * elf64-mmix.c (mmix_elf_relax_section): Likewise. * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above. * elfxx-ia64.c (elfNN_ia64_relax_section): As above. * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal relocs. * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly free internal relocs and section contents. Don't read symbols. * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms. (elf32_hppa_size_stubs): Don't free local syms. * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay reading of local syms. Use bfd_elf_get_elf_syms. Properly free possibly cached info. * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise. * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms. * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and all_local_syms. (get_local_syms): Delete function. (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache on exit. (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
* * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpuxAlan Modra2002-07-041-17/+0
| | | | | | fudge. * elf.c (bfd_section_from_shdr): Work around broken hpux shared libs here instead.
OpenPOWER on IntegriCloud