aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
AgeCommit message (Collapse)AuthorFilesLines
2000-11-132000-11-08 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+1
* elflink.h (elf_link_add_object_symbols): Also add indirect symbols for common symbols with the default version.
2000-10-12Another try at correcting relocations against discardedAlan Modra1-7/+32
link-once section symbols.
2000-10-07Cure a number of segfaults caused by /DISCARD/ of dynamic sections.Alan Modra1-21/+37
2000-09-29* elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.Alan Modra1-12/+4
2000-08-24Allow common symbols to have an alignment of 1 if explicitly requested, andNick Clifton1-1/+4
not overridden by other definitions.
2000-08-222000-08-22 H.J. Lu <hjl@gnu.org>H.J. Lu1-0/+71
* elf-bfd.h (elf_link_hash_table): Add runpath. * bfd-in.h (bfd_elf_get_runpath_list): New prototype. * bfd-in2.h: Rebuilt. * elf.c (_bfd_elf_link_hash_table_init): Initialize the "runpath" field to NULL. (bfd_elf_get_runpath_list): New function. * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and DT_RUNPATH entries.
2000-07-282000-07-27 H.J. Lu <hjl@gnu.org>H.J. Lu1-11/+23
* elflink.h (elf_merge_symbol): Take one more argument, dt_needed, to indicate if the symbol comes from a DT_NEEDED entry. Don't overide the existing weak definition if dt_needed is true. (elf_link_add_object_symbols): Pass dt_needed to elf_merge_symbol ().
2000-07-27Zero the allocated contents of reloc sections.Nick Clifton1-2/+4
2000-07-212000-07-20 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+1
* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check info->new_dtags when setting DT_FLAGS_1. It will only be set by the new linker options. It shouldn't break anything.
2000-07-212000-07-20 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+1
* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1 only if info->new_dtags is true.
2000-07-202000-07-20 H.J. Lu <hjl@gnu.org>H.J. Lu1-2/+3
* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
2000-07-202000-07-19 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+19
* elf32-arm.h (elf32_arm_size_dynamic_sections): Also set DF_TEXTREL if DT_TEXTREL is set. * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise. * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise. * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise. * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise. * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise. * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise. * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise. * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise. * bfd/elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if DT_RPATH is set. Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
2000-07-202000-07-19 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+56
* bfd-in.h (bfd_elf_set_dt_needed_soname): New. * bfd-in2.h: Rebuild. * elf-bfd.h (elf_obj_tdata): Add dt_soname. (elf_dt_soname): New. * elf.c (bfd_elf_set_dt_needed_soname): New. * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED entry if the shared object loaded by DT_NEEDED is used to resolve the reference in a regular object.
2000-06-192000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>Ulf Carlsson1-4/+4
* elf_bfd.h (struct elf_backend_data): Add info argument to elf_backend_hide_symbol. (_bfd_elf_link_hash_hide_symbol): Likewise. * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise. * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise. * elflink.h (elf_link_add_object_symbols): Likewise. (elf_link_assign_sym_version): Likewise.
2000-06-162000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>Ulf Carlsson1-9/+37
* elflink.h (elf_link_adjust_relocs): Check for and call backend specifific swap_reloc_{in,out} and swap_reloca_{in,out} if available. (elf_link_output_relocs): Likewise. (elf_reloc_link_order): Likewise.
2000-06-05Remove the `/* Fall through. */' comment in elf_link_output_extsym ()H.J. Lu1-1/+0
for the indirect symbol.
2000-06-052000-06-05 H.J. Lu <hjl@gnu.org>H.J. Lu1-4/+5
* elflink.h (elf_fix_symbol_flags): Follow the link for the indirect symbol for the ELF_LINK_NON_ELF bit. (elf_link_output_extsym): Don't output the indirect symbol even if the ELF_LINK_NON_ELF bit is set.
2000-05-302000-05-30 H.J. Lu <hjl@gnu.org>H.J. Lu1-6/+2
* elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the visibility bits if the symbol is undefined. Correctly handle weak undefined symbols with hidden and internal attributes. * elflink.h (elf_link_add_object_symbols): Always turn the symbol into local if it has the hidden or internal attribute.
2000-05-222000-05-22 H.J. Lu <hjl@gnu.org>H.J. Lu1-0/+5
* elflink.h (elf_link_output_extsym): Clear the visibility field for symbols not defined locally.
2000-05-18Force relocs emited for an executable to contain virtual addresses.Nick Clifton1-1/+5
2000-05-17Add part of patch omittede from previous deltaNick Clifton1-1/+1
2000-05-17Apply patch from Richard Gorton <gorton@scrugs.lkg.dec.com> to implementNick Clifton1-7/+6
--emit-relocs switch to the linker to preserve relocs in an output executable
2000-05-042000-05-03 Martin v. Löwis <loewis@informatik.hu-berlin.de>H.J. Lu1-3/+21
* elflink.h (elf_link_add_object_symbols): Reset dynindx for hidden and internal symbols. (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with visibility. * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not assign a PLT or GOT entry to symbols with hidden and internal visibility.
2000-04-27Reference count .plt and .got on x86 for garbage collection code. Fix aAlan Modra1-1/+2
couple of m68k and ppc bugs discovered while testing x86 gc.
2000-03-01Fix building with --enable-targets=allNick Clifton1-1/+1
2000-03-012000-03-01 H.J. Lu <hjl@gnu.org>H.J. Lu1-2/+4
* aoutx.h (aout_link_input_section_std): Pass "true" to the undefined_symbol callback. (aout_link_input_section_ext): Likewise. * bout.c (get_value): Likewise. * coff-a29k.c (coff_a29k_relocate_section): Likewise. * coff-alpha.c (alpha_ecoff_get_relocated_section_conten): Likewise. (alpha_relocate_section): Likewise. * coff-arm.c (coff_arm_relocate_section): Likewise. * coff-i960.c (coff_i960_relocate_section): Likewise. * coff-mcore.c (coff_mcore_relocate_section): Likewise. * coff-mips.c (mips_relocate_section): Likewise. * coff-ppc.c (coff_ppc_relocate_section): Likewise. * coff-sh.c (sh_relocate_section): Likewise. * coff-tic80.c (coff_tic80_relocate_section): Likewise. * cofflink.c (_bfd_coff_generic_relocate_section): Likewise. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise. * elflink.h (elf_link_output_extsym): Likewise. * pe-mips.c (coff_pe_mips_relocate_section): Likewise. * reloc.c (bfd_generic_get_relocated_section_conten): Likewise. * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise. * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the undefined_symbol callback when building shared library with -Bsymbolic and undefined symbols are allowed. Otherwise, pass "true". * elf32-arm.h (elf32_arm_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mips.c (mips_elf_calculate_relocation): Likewise. (elf32_mips_get_relocated_section_content): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2000-02-222000-02-22 H.J. Lu <hjl@gnu.org>Ian Lance Taylor1-1/+5
* elflink.h (elf_link_add_object_symbols): If a version symbol is not defined, don't add a second ELF_VER_CHR.
2000-02-222000-02-22 H.J. Lu <hjl@gnu.org>Ian Lance Taylor1-4/+6
* elflink.h (elf_bfd_final_link): Call output_extsym for global symbols converted to local symbols even when stripping all symbols. (elf_link_output_extsym): Process global symbols converted to local symbols even if they are being stripped.
2000-02-21This lot mainly cleans up `comparison between signed and unsigned' gccAlan Modra1-1/+12
warnings. One usused var, and a macro parenthesis fix too. Also check input sections are elf when doing gc in elflink.h.
2000-02-18 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirectRichard Henderson1-10/+11
and hide_symbol members. (elf_link_hash_copy_indirect): Remove. (elf_link_hash_hide_symbol): Remove. (struct elf_backend_data): Add elf_backend_copy_indirect_symbol and elf_backend_hide_symbol. (_bfd_elf_link_hash_copy_indirect): Declare. (_bfd_elf_link_hash_hide_symbol): Declare. * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument. (_bfd_elf_link_hash_hide_symbol): Likewise. (_bfd_elf_link_hash_table_init): Don't init killed members. * elflink.h (elf_link_add_object_symbols): Use the bed function pointers not elf_link_hash_{copy_indirect,hide_symbol}. (elf_link_assign_sym_version): Likewise. * elfxx-target.h (elf_backend_copy_indirect_symbol): Default. (elf_backend_hide_symbol): Likewise. (elfNN_bed): Update for new members.
2000-02-13 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect andRichard Henderson1-87/+8
hide_symbol members. (elf_link_hash_copy_indirect): New. (elf_link_hash_hide_symbol): New. * elflink.h (elf_link_add_object_symbols): Break out copy from indirect new new symbol to elf.c. (elf_link_assign_sym_version): Break out privatization of non-exported symbol to elf.c. * elf.c (_bfd_elf_link_hash_copy_indirect): New. (_bfd_elf_link_hash_hide_symbol): New. (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
2000-02-13 * section.c (_bfd_strip_section_from_output): Add info parameter.Ian Lance Taylor1-3/+3
If it passed as non-NULL, use it to check whether any input BFD has an input section which uses this output section. Change all callers. * bfd-in2.h: Rebuild. * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of 1999-11-29. * bfd-in2.h: Rebuild.
2000-01-03ELF visibility patch from Martin Loewis.Nick Clifton1-3/+18
1999-12-29 * elflink.h (bfd_elf,size_dynamic_sections): Don't export allRichard Henderson1-14/+14
if no dynamic sections created.
1999-12-14Fix detection of common symbolsNick Clifton1-5/+44
1999-12-14fix detection of common symbols.Nick Clifton1-1/+3
1999-12-10Fix elf linker's handling of commons in archive mapsNick Clifton1-1/+109
1999-12-10Revert previous patch.Nick Clifton1-20/+1
1999-12-10Change AR for ELF so that common symbols are not included in archive map.Nick Clifton1-1/+20
Change LD for ELF so that archive elements whoes archive map contains a reference to a common symbol will get linkled in. Add new field to bfd_target structure and initialise it for all bfd targets.
1999-10-28 * elflink.h (elf_bfd_final_link): Make last_local signed.Ian Lance Taylor1-3/+3
1999-10-08 * elflink.h (elf_merge_symbol): When overriding a weak symbol withIan Lance Taylor1-2/+6
a defined symbol in a shared library, clear the DEF_DYNAMIC flag too.
1999-09-10 * elflink.h (elf_fix_symbol_flags): Move weakdef handling here...Ian Lance Taylor1-26/+34
(elf_adjust_dynamic_symbol): ...from here.
1999-09-06 * elflink.h (elf_link_add_object_symbols): Copy NON_GOT_REF flagAndreas Schwab1-2/+4
to version symbols.
1999-09-06use bfd memory allcation routinesNick Clifton1-14/+15
1999-09-04 * elf-bfd.h (ELF_LINK_NON_GOT_REF): Define.Ian Lance Taylor1-4/+5
* elflink.h (elf_adjust_dynamic_symbol): Copy REF_REGULAR_NONWEAK and NON_GOT_REF from weak defined symbol to real symbol. * elf32-i386.c (elf_i386_check_relocs): Set NON_GOT_REF. (elf_i386_adjust_dynamic_symbol): If NON_GOT_REF is not set, don't create a COPY reloc. * elf32-sparc.c (elf32_sparc_check_relocs): Set NON_GOT_REF. (elf32_sparc_adjust_dynamic_symbol): If NON_GOT_REF is not set, don't create a COPY reloc.
1999-09-03 * elflink.h (elf_bfd_final_link): When counting relocations, don'tIan Lance Taylor1-2/+11
count those in sections we are not including in the link.
1999-09-02 * elflink.h (elf_link_add_object_symbols): Work around bogus SH_LINKJeff Law1-0/+17
field in hpux11 shared libraries.
1999-09-02Fix memory leak.Nick Clifton1-1/+1
1999-08-31When possible, keep the original type of the symbol.Nick Clifton1-1/+4
1999-08-17 * elf32-mips.c (_bfd_mips_elf_add_symbol_hook): Set BSF_DYNAMICIan Lance Taylor1-3/+28
for special section symbols. * elflink.h (elf_merge_symbol): If we have no old BFD, check BSF_DYNAMIC on the section symbol to see whether the old BFD is dynamic.