aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
AgeCommit message (Collapse)AuthorFilesLines
1997-07-31Wed Jul 30 21:30:35 1997 Andreas Schwab ↵Ian Lance Taylor1-2/+11
<schwab@issan.informatik.uni-dortmund.de> * elflink.h (NAME(bfd_elf,record_link_assignment)): Remove any version info if this symbol came from a dynamic object. (elf_link_add_object_symbols): Set the version info of a symbol only if the object actually contains version definitions and defines this symbol.
1997-06-26 * elflink.h (elf_link_add_object_symbols): When a versionIan Lance Taylor1-0/+4
indirection symbol is overridden, make the original symbol point at the real overriding symbol.
1997-06-26 * elflink.h (elf_link_output_extsym): Use the right section for aIan Lance Taylor1-1/+1
common symbol. * elf32-mips.c (mips_elf_link_output_symbol_hook): If a common symbol was in .scommon, mark it as SHN_MIPS_SCOMMON. PR 12697.
1997-06-25Wed Jun 25 12:43:10 1997 H.J. Lu <hjl@gnu.ai.mit.edu>Ian Lance Taylor1-6/+6
* elflink.h (elf_merge_symbols): Resolve indirect and warning symbols before checking for new symbols.
1997-06-24comment fixIan Lance Taylor1-1/+2
1997-06-24 * elflink.h (elf_merge_symbol): In the case of a new definedIan Lance Taylor1-56/+115
symbol overriding an old defined symbol, return the hash table entry which we modify, even if it is the target of an indirection. (elf_link_add_object_symbols): If the real name of the symbol gets overridden, convert the versioned symbol into an indirect symbol to the real symbol.
1997-06-23 * elflink.h (elf_merge_symbol): New static function, broken out ofIan Lance Taylor1-287/+379
elf_link_add_object_symbols. (elf_link_add_object_symbols): Call it.
1997-06-18revert last patchIan Lance Taylor1-9/+2
1997-06-18 * elflink.h (elf_link_add_object_symbols): Don't let a commonIan Lance Taylor1-2/+9
symbol in a regular object override a common symbol in a shared object if the latter was found via an indirect symbol.
1997-06-16 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): CallIan Lance Taylor1-52/+81
elf_link_assign_sym_version before elf_adjust_dynamic_symbol. (elf_fix_symbol_flags): New static function, broken out of elf_adjust_dynamic_symbol. (elf_adjust_dynamic_symbol): Call elf_fix_symbol_flags. (elf_link_assign_sym_version): Likewise. Permit a symbol to be forced local even if NEEDS_PLT is set. When forcing a symbol to be local, clear NEEDS_PLT. (elf_link_output_extsym): Remove unused local bed.
1997-06-11 * elflink.h (elf_link_output_extsym): Call finish_dynamic_symbolIan Lance Taylor1-11/+18
for a symbol which is being forced to be local. * elf32-i386.c (elf_i386_relocate_section): Write out the relocation value for a GOT reloc for a symbol which is turning into a local symbol. (elf_i386_finish_dynamic_symbol): If a symbol is turning into a local symbol, write out a RELATIVE reloc rather than a GLOB_DAT reloc. * elf32-m68k.c, elf32-sparc.c: Corresponding changes.
1997-06-10(elf_link_add_object_symbols): Also read verneedUlrich Drepper1-63/+58
information by calling `_bfd_elf_slurp_version_tables'. (elf_link_add_object_symbols): For undefined symbols look for version informaiton in the verneed records. (elf_link_add_object_symbols): Use soname of shared object for verneed record if it is available.
1997-06-09Mon Jun 9 12:34:21 1997 Andreas Schwab ↵Ian Lance Taylor1-1/+2
<schwab@issan.informatik.uni-dortmund.de> * elflink.h (elf_link_add_object_symbols): Ignore relocations of sections that will be discarded.
1997-06-06(elf_link_find_version_dependencies): When searchingUlrich Drepper1-1/+1
for known version symbol skip non-matching verdef records, not matching records.
1997-05-16 * elflink.h (elf_link_add_object_symbols): Don't decrease theIan Lance Taylor1-8/+98
alignment of a common symbol. If two symbols that look like common symbols are found in two shared libraries, and the size is different, use the larger size, and warn if --warn-common. If a common symbol overrides a definition in a shared library, set the size to the larger size, and warn if --warn-common.
1997-05-15 * elflink.h (elf_link_add_object_symbols): Consistently treatIan Lance Taylor1-19/+9
uninitialized symbols in shared objects as common symbols.
1997-05-15 * elflink.h (elf_link_add_object_symbols): Force ELF symbol sizeIan Lance Taylor1-0/+9
to common symbol size.
1997-04-17 * elflink.h (elf_link_add_object_symbols): Only subtract theIan Lance Taylor1-3/+3
section VMA from the symbol value if this is a fully linked file.
1997-04-15 * elflink.h (elf_link_add_object_symbols): Don't call check_relocsIan Lance Taylor1-1/+3
if this is a debugging section which we are stripping.
1997-04-03tweak last patchIan Lance Taylor1-9/+33
1997-04-02Revert last patch, and:Ian Lance Taylor1-12/+14
* elflink.h (elf_link_add_object_symbols): Let a common symbol override an uninitialized symbol from a shared library with a smaller size.
1997-04-02 * elflink.h (elf_link_add_object_symbols): When there is a sizeIan Lance Taylor1-5/+9
change, use the larger size. From H.J. Lu <hjl@gnu.ai.mit.edu>.
1997-03-25 * stabs.c (_bfd_link_section_stabs): Copy over the first headerIan Lance Taylor1-3/+3
symbol. Check for memory allocation failure of *psinfo. (_bfd_write_section_stabs): Add psinfo parameter. Change all callers. Set the value of the header symbol. * libbfd-in.h (_bfd_write_section_stabs): Update declaration. * libbfd.h: Rebuild.
1997-03-20 * elflink.h (elf_bfd_final_link): Set the value of a sectionIan Lance Taylor1-1/+4
symbol to the section address unless doing a relocateable link.
1997-03-13 * elflink.h (elf_link_add_object_symbols): Don't warn about typeIan Lance Taylor1-2/+4
or size changes because of a weak symbol. PR 11827.
1997-03-13 * elflink.h (elf_link_add_object_symbols): Use extsymoff whenIan Lance Taylor1-34/+146
setting ever. Sanity check the version number. Sort out copying flags and other information when adding an indirect symbol. (NAME(bfd_elf,size_dynamic_sections)): Preserve any dynamic symbols added by the backend. Clear the entire contents of the versym section. (elf_export_symbol): Ignore indirect symbols. (elf_link_output_extsym): Accept a section without an owner in an assert. * elfcode.h (elf_slurp_symbol_table): Add a sanity check on the version count. Correct the allocation of x_versymp.
1997-03-11 From Eric Youngdale <eric@andante.jic.com>:Ian Lance Taylor1-46/+197
* elf-bfd.h (ELF_LINK_FORCED_LOCAL): Define. * elf.c (bfd_elf_print_symbol): Correct errors in last change. * elflink.h (elf_link_add_object_symbols): Handle cases in which a versioned symbol appears in both a regular and a shared object. (elf_link_assign_sym_version): Set ELF_LINK_FORCED_LOCAL when appropriate. Improve error message. (struct elf_outext_info): Rename from elf_finfo_failed. Change all uses. Add localsyms field. (elf_bfd_final_link): When generating a shared library, call elf_link_output_extsym to output all local symbols. (elf_link_output_extsym): Handle symbols which were forced to become local.
1997-03-10 From Eric Youngdale <eric@andante.jic.com>:Ian Lance Taylor1-42/+147
* elf-bfd.h (elf_symbol_type): Add version field. * elfcode.h (elf_slurp_symbol_table): Set version field. * elflink.h (elf_link_add_object_symbols): When creating an indirect symbol for a default version symbol, set DEF_DYNAMIC if appropriate. Set up an indirection from the nondefault version of the symbol as well. (NAME(bfd_elf,size_dynamic_sections)): Call elf_link_assign_sym_version before checking whether there are any versions. Always record the version name as a dynamic symbol. Initialize counters. (elf_link_assign_sym_version): After finding a version, see if a symbol should be forced to local scope. Create a new version definition if appropriate. (elf_link_output_extsym): Correct indirect symbol handling. * elf.c (bfd_elf_print_symbol): Print version information. (bfd_section_from_shdr): Turn version sections into BFD sections. (elf_fake_sections): Only copy cverdefs and cverrefs into sh_info if sh_info is not already set. (_bfd_elf_copy_private_section_data): Copy sh_info for version sections. * elflink.c (_bfd_elf_link_record_dynamic_symbol): Tell _bfd_stringtab_add to copy the name into permanent memory if appropriate.
1997-03-03(elf_link_add_object_symbols): Use correct sh_sizeUlrich Drepper1-4/+4
entry for reading verdef records. Use correct braces for computing increments of extverdaux and exteverdef record pointers.
1997-03-03 * elflink.h (elf_link_find_version_dependencies): Check thatIan Lance Taylor1-0/+1
DEF_REGULAR is not set as well as checking that DEF_DYNAMIC is set.
1997-02-28 * aoutx.h (aout_link_write_symbols): Use bfd_is_local_label_nameIan Lance Taylor1-2/+1
rather than comparing against info->lprefix. * cofflink.c (_bfd_coff_link_input_bfd): Likewise. * elflink.h (elf_link_input_bfd): Likewise. * linker.c (_bfd_generic_link_output_symbols): Likewise. * xcofflink.c (xcoff_link_input_bfd): Likewise.
1997-02-26 * elflink.h (elf_link_input_bfd): Don't skip symbols from sectionsIan Lance Taylor1-3/+5
that have no contents merely because linker_mark is not set.
1997-02-24 From Eric Youngdale <eric@andante.jic.com>:Ian Lance Taylor1-74/+1025
* elflink.h (elf_link_add_archive_symbols): If a default symbol is not found, try looking it up again without the version name. (elf_link_add_object_symbols): Always link against the dynamic symbol table of a dynamic object. When linking against a dynamic object, include version strings in symbol names, and set up version information. Add indirect symbols for default versions. (elf_link_create_dynamic_sections): Add special version sections. (struct elf_assign_sym_version_info): Define. (struct elf_find_verdep_info): Define. (NAME(bfd_elf,size_dynamic_sections)): Add verdefs parameter. Set up version sections. (elf_adjust_dynamic_symbol): Ignore indirect symbols. (elf_link_find_version_dependencies): New static function. (elf_link_assign_sym_version): New static function. (elf_link_renumber_dynsyms): New static function. (struct elf_final_link_info): Add symver_sec field. (elf_bfd_final_link): Initialize finfo.symver_sec. Don't count local symbols of a dynamic object. Handle DT_VER* constants. (elf_link_output_extsym): Simplify BFD_ASSERT checking for a dynamic object. Skip indirect symbols from ELF objects. Remove the version name before choosing a hash bucket. Write out the version information if appropriate. (elf_link_input_bfd): Check for DYNAMIC, not ET_DYN. * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration. (bfd_elf64_size_dynamic_sections): Likewise. * bfd-in2.h: Rebuild. * elf-bfd.h (struct elf_link_hash_entry): Add verinfo field. Change elf_link_hash_flags to unsigned short. (ELF_LINK_HIDDEN): Define. (struct elf_obj_tdata): Add fields dynversym_hdr, dynverref_hdr, dynverdef_hdr, dynversym_section, dynverdef_section, dynverref_section, cverdefs, cverrefs, verdef, verref. (elf_dynversym, elf_dynverdef, elf_dynverref): Define. (_bfd_elf_swap_verdef_in, _bfd_elf_swap_verdef_out): Declare. (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Declare. (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Declare. (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Declare. (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Declare. (_bfd_elf_slurp_version_tables): Declare. * elf.c (_bfd_elf_swap_verdef_in): New function. (_bfd_elf_swap_verdef_out): Likewise. (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Likewise. (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Likewise. (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Likewise. (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Likewise. (_bfd_elf_print_private_bfd_data): Add DT_VER* constants. Print version information if there is any. (_bfd_elf_link_hash_newfunc): Initialize verinfo field. (bfd_section_from_shdr): Handle SHT_GNU_ver* section types. (elf_fake_sections): Handle .gnu.version* section names. (assign_section_numbers): Handle SHT_GNU_ver* section types. (_bfd_elf_slurp_version_tables): New function. * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't include version name in string entered in dynamic hash table. * elfcode.h: Include fnmatch.h. * elf32-i386.c (elf_i386_relocate_section): Handle a dynamic symbol which was forced to become local. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1997-02-15 * elflink.h (elf_link_add_object_symbols): Don't issue a warningIan Lance Taylor1-4/+34
about a symbol defined in a dynamic object if it has already been defined in a regular object.
1997-02-07 * elflink.h (elf_link_input_bfd): If we've discarded a section,Ian Lance Taylor1-2/+7
the output section will be the absolute section; don't print an assertion message for that case when doing a relocateable link. PR 11647.
1997-02-06 * elflink.h (elf_link_input_bfd): Discard local symbols that areIan Lance Taylor1-1/+12
attached to sections which are not being included in the link.
1997-01-16 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Change type ofIan Lance Taylor1-9/+14
auxiliary_filters parameter to be const char * const *. Accept a NULL terminated array. * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration. (bfd_elf32_size_dynamic_sections): Update declaration. * bfd-in2.h: Rebuild.
1997-01-03fix copyrightsIan Lance Taylor1-1/+1
1997-01-03Fri Jan 3 16:58:31 1997 Richard Henderson <rth@tamu.edu>Ian Lance Taylor1-15/+20
elf64-alpha multiple .got rewrite: * elf-bfd.h (struct elf_backend_data): Add always_size_sections entry. (bfd_elf*_mkobject): Don't define here ... * elfxx-target.h: ... but rather here. Default always_size_sections hook to NULL. * elf.c (elf_mkobject): Rename to bfd_elf_mkobject, since that was what the #defines in elf-bfd.h transmuted it to anyway. * section.c: Add SEC_LINKER_CREATED flag. * bfd-in2.h: Rebuild. * elf32-i386.c (elf_i386_check_relocs): Add SEC_LINKER_CREATED to relocation section flags. (elf_i386_size_dynamic_sections): Use SEC_LINKER_CREATED instead of SEC_IN_MEMORY to recognize generated bits. * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_size_dynamic_sections): Likewise. * elf32-mips.c (mips_elf_final_link, mips_elf_create_dynamic_sections, mips_elf_create_compact_rel_section, mips_elf_create_got_section, mips_elf_check_relocs, mips_elf_size_dynamic_sections): Likewise. * elf32-ppc.c (ppc_elf_create_linker_section, ppc_elf_size_dynamic_sections): Likewise. * elf32-sparc.c (elf32_sparc_check_relocs, elf32_sparc_size_dynamic_sections): Likewise. * elflink.c (_bfd_elf_create_got_section): Add SEC_LINKER_CREATED to section flags. (_bfd_elf_create_dynamic_sections): Likewise. (_bfd_elf_make_linker_section_rela): Likewise. * elflink.h (elf_link_create_dynamic_sections): Likewise. (bfd_elf,size_dynamic_sections): Call the always_size_sections hook. (elf_bfd_final_link): Use SEC_LINKER_CREATED instead of SEC_IN_MEMORY to identify generated bits. (elf_link_input_bfd): Likewise. * elf64-alpha.c: Rewrite everything touching relocations.
1996-12-31 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): AddIan Lance Taylor1-1/+26
filter_shlib and auxiliary_filter_shlib parameters. * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_AUXILIARY and DT_FILTER. * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration. (bfd_elf64_size_dynamic_sections): Likewise. * bfd-in2.h: Rebuild.
1996-12-27 * elflink.h (elf_buckets): Add some more values for largerIan Lance Taylor1-2/+3
binaries.
1996-12-13 * elflink.h (elf_link_add_object_symbols): Only add a weakIan Lance Taylor1-4/+15
symbol if the real definition is in the dynamic symbol table. After finding the real definition, then, if it is dynamic, add the weak symbol to the dynamic symbol table. PR 11244.
1996-12-05 * elflink.h (elf_link_add_object_symbols): Calling check_relocsIan Lance Taylor1-6/+0
even if SEC_ALLOC is not set. * elf32-i386.c (elf_i386_check_relocs): Don't check SEC_ALLOC when deciding whether to copy a reloc into a shared object. (elf_i386_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_check_relocs): Likewise. (elf32_sparc_relocate_section): Likewise. * elf32-i386.c (elf_i386_check_relocs): Don't set SEC_ALLOC in a reloc section if it is not set in the source section. * elf32-sparc.c (elf32_sparc_check_relocs): Likewise. * elf.c (bfd_section_from_shdr): Mark a reloc section associated with a SEC_DEBUGGING section as SEC_DEBUGGING. PR 11174.
1996-11-26 * elf-bfd.h (struct elf_link_hash_entry): Add other field.Ian Lance Taylor1-1/+5
* elf.c (_bfd_elf_link_hash_newfunc): Initialize other field. (swap_out_syms): Set st_other from existing st_other field. * elflink.h (elf_link_add_object_symbols): Store st_other in hash table other field. (elf_link_output_extsym): Set the other field from the global hash table entry. * elf32-mips.c (enum reloc_type): Add R_MIPS16_26. (elf_mips16_jump_howto): New static variable. (mips16_jump_reloc): New static function. (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_JMP. (mips_info_to_howto_rel): Handle R_MIPS16_26. (mips_elf_relocate_section): Handle R_MIPS16_26. Handle R_MIPS_26 to a mips16 symbol. * reloc.c (BFD_RELOC_MIPS16_JMP): Add to list of relocs. * bfd-in2.h, libbfd.h: Rebuild. * cpu-mips.c (arch_info_struct): Add mips:16 entry.
1996-10-08 * elflink.h (elf_link_add_object_symbols): If a symbol is a weakIan Lance Taylor1-1/+4
definition in a dynamic object, add it to the dynamic symbol table if any dynamic object mentions it. Reverts part of last patch. PR 10827.
1996-10-01 * elflink.h (elf_link_add_object_symbols): Only put a symbol fromIan Lance Taylor1-6/+2
a dynamic object in the dynamic symbol table if it is referenced or defined by a regular object. PR 10711.
1996-08-30 Add SH ELF support.Ian Lance Taylor1-26/+43
* elf32-sh.c: New file. * elf.c (prep_headers): Handle bfd_arch_sh. * elfcode.h (write_relocs): Handle absolute symbol. * elf-bfd.h (_bfd_elf32_link_read_relocs): Declare. (_bfd_elf64_link_read_relocs): Declare. * elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from elf_link_read_relocs. Make globally visible. Change all callers. (elf_link_input_bfd): Get external symbols from cache in symtab_hdr->contents. Get contents from cache in elf_section_data. * elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not already defined. * reloc.c: Define BFD_RELOC_SH_* relocs. * libbfd-in.h (_bfd_sh_align_load_span): Declare. * coff-sh.c (sh_insns_conflict): Fix a return value. (_bfd_sh_align_load_span): New globally visible function, broken out of sh_align_load. (sh_align_load): Call _bfd_sh_align_load_span. (sh_swap_insns): Change relocs parameter to PTR. * bfd-in2.h, libbfd.h: Rebuild. * targets.c (bfd_elf32_sh_vec): Declare. (bfd_elf32_shl_vec): Declare. * config.bfd (sh-*-elf*): New target. * configure.in (bfd_elf32_sh_vec): New target vector. (bfd_elf32_shl_vec): New target vector. * configure: Rebuild. * Makefile.in: Rebuild dependencies. (BFD32_BACKENDS): Add elf32-sh.o. (BFD32_BACKENDS_CFILES): Add elf32-sh.c. * elf.c (map_sections_to_segments): Check that LMA does not skip a page before checking D_PAGED.
1996-08-11 * elflink.h (elf_link_add_object_symbols): Do not resolve a commonIan Lance Taylor1-3/+16
symbol against a STT_FUNC symbol in a shared library.
1996-06-25Comment out code to make GOT pointers negative of the GOT symbol for nowMichael Meissner1-1/+3
1996-06-24Add debug msgMichael Meissner1-1/+9