aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
AgeCommit message (Collapse)AuthorFilesLines
2001-08-09 * coff-rs6000.c: Add missing prototypes.Alan Modra1-59/+82
(xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow, xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset, xcoff_loader_reloc_offset): Make static. * dwarf1.c: Add missing prototypes. * dwarf2.c: Add missing prototypes. (struct abbrev_info): Move definition. (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise. * elf.c: Add missing prototypes. * elf32-gen.c: Likewise. * elf32-i386.c: Likewise. * elf32-ppc.c: Likewise. (ppc_elf_sort_rela): Use PTR instead of "void *". * elflink.h: Add missing prototypes. Formatting fixes. * merge.c: Add missing prototypes. (last4_eq): Use PTR instead of "void *". (last_eq): Likewise. * syms.c: Add missing prototypes.
2001-06-29* elflink.h (elf_link_output_extsym): Revert 1999-04-10.Alan Modra1-2/+1
2001-06-20 * elf-bfd.h (struct elf_backend_data):Catherine Moore1-17/+59
elf_backend_emit_relocs: New field: Function for emitting relocs. elf_backend_count_relocs: New field: Function for determining the number of relocs to be emitted. * elfxx-target.h: Provide default (NULL) values for elf_backend_emit_relocs and elf_backend_count_relocs. * elflink.h (elf_link_size_reloc_section): Make the hash table big enough to hold the relocs counted by either reloc_count or o->reloc_count. (elf_bfd_final_link) emit_relocs: New boolean, set if relocs should be emitted, either because of a command line option stored in the info structure or because the target provides a special reloc emitting function. If the target provides a reloc counting function use it, unless performing a relocatable link or emitting all relocs. Also set the SEC_RELOC flag on any output section which will contain relocs. (elf_link_input_bfd): emit_relocs: New boolean, set if relocs should be emitted, either because of a command line option stored in the info structure or because the target provides a special reloc emitting function. If the target provides a reloc emitting function, use it, unless performing a relocatable link or emitting all relocs.
2001-06-18 * elflink.h (struct elf_assign_sym_version_info): Remove memberHans-Peter Nilsson1-9/+5
export_dynamic. All users changed to use info member. NAME(bfd_elf,size_dynamic_sections)): Remove parameter export_dynamic, instead use member in parameter info. * bfd-in.h (bfd_elf32_size_dynamic_sections, bfd_elf64_size_dynamic_sections): Update prototype. * bfd-in2.h: Regenerate.
2001-06-182001-06-18 H.J. Lu <hjl@gnu.org>H.J. Lu1-3/+33
* elflink.h (elf_info_failed): Add a new field, verdefs. (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to elf_export_symbol. (elf_export_symbol): Check eif->verdefs to decide if a symbol should be exported.
2001-06-12 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGNCatherine Moore1-5/+16
with the file_align entry from elf_backend_data. (elf_gc_smash_unused_vtentry_relocs): Likewise. (elf_gc_record_vtentry): Likewise.
2001-06-10 * elflink.h: Whitespace changes.Alan Modra1-6/+6
(elf_link_read_relocs_from_section): Use "unsigned int" iterator rather than "unsigned char". (elf_link_output_relocs): Likewise. (elf_link_input_bfd): Likewise. (elf_reloc_link_order): LIkewise. * elf.c: s/CONST/const/. Whitespace changes. * elf32-mips.c: Formatting fix. * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h. * Makefile.in: Regenerate. * po/Make-in: Remove trailing tab.
2001-05-28Handle MIPS64 relocs which use a non-1 valued int_rels_per_ext_relNick Clifton1-55/+138
2001-05-23Replace sh_size/sh_entsize with NUM_SHDR_ENTRIESNick Clifton1-11/+8
2001-05-182001-05-18 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+1
* elflink.h (elf_link_add_object_symbols): Revert the last change.
2001-05-182001-05-17 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+1
* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the version definition to basename of the output filename.
2001-05-172001-05-17 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+1
* elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to basename of the bfd filename.
2001-05-092001-05-09 H.J. Lu <hjl@gnu.org>H.J. Lu1-4/+1
* elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate versymhdr->sh_size bytes for extversym instead of hdr->sh_size. Remove the unused veriable `dynver'.
2001-05-032001-05-03 H.J. Lu <hjl@gnu.org>H.J. Lu1-2/+3
* elfcode.h: Include "libiberty.h". * elflink.h (elf_link_add_object_symbols): Set elf_dt_name (abfd) to basename of the bfd filename. (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename of the bfd filename.
2001-04-302000-04-27 H.J. Lu <hjl@gnu.org>H.J. Lu1-0/+3
* elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1 only for ELF_LINK_FORCED_LOCAL. * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise. * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise. * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise. * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL if the symbol has hidden or internal visibility.
2001-04-13bfd/Jakub Jelinek1-10/+76
* libbfd-in.h (_bfd_merge_section): New. (_bfd_write_merged_section): New. (_bfd_merged_section_offset): New. * libbfd.h: Rebuilt. * linker.c (_bfd_generic_link_output_symbols): Handle discard_sec_merge. * aoutx.h (aout_link_write_symbols): Likewise. * pdp11.c (aout_link_write_symbols): Likewise. * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section. (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE sections. (elf_link_sec_merge_syms): New. (elf_link_input_bfd): Call _bfd_merged_section_offset and _bfd_write_merged_section. Handle discard_sec_merge. * elf-bfd.h (struct elf_link_hash_table): Add merge_info field. (struct bfd_elf_section_data): Likewise. * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and SEC_STRINGS section flags and entsize from their ELF counterparts. (_bfd_elf_link_hash_table_init): Initialize merge_info. (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize from their BFD counterparts. * merge.c: New file. * Makefile.am: Add strtab.lo. * Makefile.in: Rebuilt. include/ * bfdlink.h (bfd_link_discard): Add discard_sec_merge. gas/ * config/obj-elf.c (obj_elf_change_section): Add entsize argument, handle SHF_MERGE and SHF_STRINGS. (obj_elf_parse_section_letters): Set SHF_MERGE and SHF_STRINGS. (obj_elf_section): Allow additional argument specifying entity size. * write.c (adjust_reloc_syms): Keep relocations against local symbols in SEC_MERGE sections. ld/ * ldmain.c (main): Default to discard_sec_merge. * lexsup.c (OPTION_DISCARD_NONE): Define. (ld_options): Add --discard-none. (parse_args): Handle OPTION_DISCARD_NONE. * ldlang.c (wild_doit): SEC_MERGE should be set in the output section only if SEC_MERGE and SEC_STRINGS flags and entsize of all its input sections match.
2001-04-09 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,Hans-Peter Nilsson1-4/+8
only hide symbols marked STV_INTERNAL or STV_HIDDEN.
2001-04-04 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbolAlan Modra1-8/+6
when -Bsymbolic causes a symbol to no longer need a .plt entry.
2001-03-08Update copyright noticesNick Clifton1-1/+2
2001-02-182001-02-18 H.J. Lu <hjl@gnu.org>H.J. Lu1-4/+25
* elflink.h (elf_link_input_bfd): Ignore invalid section symbol index.
2001-02-122001-02-11 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+1
* elflink.h (elf_bfd_final_link): Use file_align for STMTAB alignment.
2001-02-07ignore common definitions of function symbols in unlinked archivesNick Clifton1-4/+8
2001-01-232001-01-23 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-5/+0
* coff64-rs6000.c: Fix formatting. * coff-arm.c: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coff-mcore.c: Likewise. * coff-mips.c: Likewise. * coff-pmac.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * elf32.c: Likewise. * elf32-fr30.c: Likewise. * elf32-i370.c: Likewise. * elf32-i860.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-ppc.c: Likewise. * elf32-sh.c: Likewise. * elf32-v850.c: Likewise. * elf64-alpha.c: Likewise. * elf64-sparc.c: Likewise. * elflink.c: Likewise. * elflink.h: Likewise. * elf-m10200.c: Likewise. * elf-m10300.c: Likewise. * elfxx-ia64.c: Likewise.
2001-01-032001-01-03 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-60/+59
* ecoffswap.h: Fix formatting. * elf-bfd.h: Likewise. * elfarm-nabi.c: Likewise. * elfarm-oabi.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elflink.h: Likewise. * elfxx-ia64.c: Likewise. * elfxx-target.h: Likewise.
2000-12-12Add link option to allow undefiedn symbols in shared librariesNick Clifton1-0/+1
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