aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
AgeCommit message (Collapse)AuthorFilesLines
2001-05-23Replace sh_size/sh_entsize with NUM_SHDR_ENTRIESNick Clifton1-1/+1
2001-05-11 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffixJakub Jelinek1-0/+12
fields, change sec into secinfo. (struct sec_merge_info): Add chain, remove last fields. (struct sec_merge_sec_info): Add next, sec, psecinfo fields. (sec_merge_hash_lookup): If lookup could not use a string only because it has bad alignment, mark the old string for deletion. (sec_merge_add): Add secinfo argument. Don't compute entry's position, instead record the section. (sec_merge_emit): Update for the sec into secinfo change in struct sec_merge_hash_entry. (_bfd_merge_section): Only record the section for merging, defer putting strings into the hash table. (cmplengthentry, last4_eq, last_eq, record_section, merge_strings, _bfd_merge_sections): New functions. (_bfd_merged_section_offset): Update for the sec_merge_hash_entry changes. * libbfd-in.h (_bfd_merge_sections): Add prototype. (_bfd_nolink_bfd_merge_sections): Define. * libbfd.h: Likewise. (bfd_generic_merge_sections): Add prototype. * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections. (struct bfd_target): Likewise. * bfd.c (bfd_merge_sections): Define. * bfd-in2.h: Rebuilt. * elf.c (_bfd_elf_merge_sections): New function. * elf-bfd.h (_bfd_elf_merge_sections): Add prototype. * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define. * reloc.c (bfd_generic_merge_sections): New function. * vms.c (vms_bfd_merge_sections): New function. * aout-adobe.c (aout_32_bfd_merge_sections): Define. * aout-target.h (MY_bfd_merge_sections): Define. * aout-tic30.c (MY_bfd_merge_sections): Define. * binary.c (binary_bfd_merge_sections): Define. * bout.c (b_out_bfd_merge_sections): Define. * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define. * coffcode.c (coff_bfd_merge_sections): Define. * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define. * i386msdos.c (msdos_bfd_merge_sections): Define. * i386os9k.c (os9k_bfd_merge_sections): Define. * ieee.c (ieee_bfd_merge_sections): Define. * ihex.c (ihex_bfd_merge_sections): Define. * nlm-target.h (nlm_bfd_merge_sections): Define. * oasys.c (oasys_bfd_merge_sections): Define. * ppcboot.c (ppcboot_bfd_merge_sections): Define. * som.c (som_bfd_merge_sections): Define. * srec.c (srec_bfd_merge_sections): Define. * tekhex.c (tekhex_bfd_merge_sections): Define. * versados.c (versados_bfd_merge_sections): Define. * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define. * ldlang.c (lang_process): Call bfd_merge_sections.
2001-05-07 * ecoff.c (bfd_debug_section): Fix initialization.Alan Modra1-3/+3
* elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it is always a positive integer. Cast away sign mismatch. * elf32-mips.c: Fix misleading comment and typo. (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use correct data type. * elflink.c: Fix typo. (_bfd_elf_create_dynamic_sections): Remove superfluous initialization. * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
2001-04-302000-04-27 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+2
* 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-24Add OpenRISC supportNick Clifton1-1/+4
2001-04-13bfd/Jakub Jelinek1-0/+15
* 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-03-08Update copyright noticesNick Clifton1-1/+2
2001-02-14fixes for elf_find_nearest_lineNick Clifton1-38/+75
2001-02-10Add s390 supportNick Clifton1-0/+3
2000-12-12Fix formatting.Nick Clifton1-2/+2
2000-12-08Generalize DWARF2 and COFF support.Nick Clifton1-1/+2
2000-11-30Add support for x86_64-*-linux-gnu* targetNick Clifton1-0/+3
2000-10-11Revert 2000-10-07 link-once section symbol changes.Alan Modra1-6/+6
2000-10-07Make elf section symbols global for link-once sections.Alan Modra1-3/+5
2000-10-05Preserve machine dependent section header flags when reading ELF object file.Jim Wilson1-0/+6
* elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags field. * elf.c (_bfd_elf_make_section_from_shdr): Call the elf_backend_section_flags function. * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion code. (elf64_ia64_section_flags): New function containing flag conversion code. (elf_backend_section_flags): Define to elf64_ia64_section_flags. * elfxx-target.h (elf_backend_section_flags): Define. (elfNN_bed): Initialize elf_backend_section_flags field.
2000-09-30Support for Unixware 7.1.x pxstatus_t and lwpxstatus_t.Alan Modra1-2/+10
2000-09-29That'll teach me not to type little patches in by hand. GetAlan Modra1-1/+1
the parentheses right.
2000-09-29(elf_fake_sections): Do not mark the section SHT_NOBITS ifAlan Modra1-8/+2
is has the SEC_HAS_CONTENTS flag set.
2000-09-11Make debug_sec_names static.Nick Clifton1-1/+1
2000-09-072000-09-07 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-162/+152
* elf.c: Fix formatting.
2000-09-02Add .gnu.linkobce.wi. to the list of debug section names.Nick Clifton1-4/+17
Update generated files
2000-08-302000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>Michael Snyder1-27/+18
* elf.c: Eliminate references to __sparcv9 macro; replace with autoconf variables HAVE_PSINFO32_T etc. * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T, HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO. * config.in: Ditto. * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto. * aclocal.m4: Ditto. * configure: Regenerate.
2000-08-222000-08-22 H.J. Lu <hjl@gnu.org>H.J. Lu1-0/+14
* 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-08-03Restore reverted code. Fix bug in reverted code which was eliminating tooNick Clifton1-189/+314
many segments.
2000-08-032000-08-03 H.J. Lu <hjl@gnu.org>H.J. Lu1-171/+63
* section.c: Back out the change made by Nick Clifton <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic binaries. * bfd-in2.h: Likewise. * elf.c: Likewise.
2000-07-31Improve section to segment mapping code.Nick Clifton1-63/+171
2000-07-20 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.Hans-Peter Nilsson1-0/+3
(ALL_MACHINES_CFILES): Add cpu-cris.c. (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo. (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c. (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules. * Makefile.in: Rebuild. * aclocal.m4: Rebuild. * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris. * archures.c (enum bfd_architecture): Add bfd_arch_cris. (bfd_cris_arch): Declare. (bfd_archures_list): Add bfd_cris_arch. * bfd-in2.h: Rebuild. * config.bfd: (cris-*-*): New target. * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors. * configure: Rebuild. * elf.c (prep_headers): Add bfd_arch_cris. * libbfd.h: Rebuild. * libaout.h (enum machine_type): Add M_CRIS. * reloc.c: Add CRIS relocations. * targets.c (bfd_target bfd_elf32_cris_vec, cris_aout_vec): Declare. (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec. * cpu-cris.c, aout-cris.c, elf32-cris.c: New files. * po/POTFILES.in, po/bfd.pot: Regenerate.
2000-07-202000-07-19 H.J. Lu <hjl@gnu.org>H.J. Lu1-0/+10
* 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-07-202000-07-19 H.J. Lu <hjl@gnu.org>H.J. Lu1-3/+3
* elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG, DT_DEPAUDIT and DT_AUDIT as strings.
2000-07-192000-07-19 H.J. Lu <hjl@gnu.org>H.J. Lu1-3/+1
* elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
2000-07-192000-07-19 H.J. Lu <hjl@gnu.org>H.J. Lu1-2/+31
* elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW, DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ, DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ, DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1, DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT, DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT, DT_FLAGS_1, DT_USED and DT_CHECKSUM.
2000-07-18Rename bfd_elf_get_arch_size to bfd_get_arch_sizeNick Clifton1-32/+2
Rename bfd_elf_get_sign_extend_vma to bfd_get_sign_extend_vma
2000-07-11Add function bfd_elf_get_sign_extend_vma.Andrew Cagney1-0/+14
2000-06-19Applied Stephane Carrez <Stephane.Carrez@worldnet.fr> patches to add supportNick Clifton1-2/+10
for m68hc11 and m68hc12 processors.
2000-06-192000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>Ulf Carlsson1-1/+2
* 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-062000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>Michael Snyder1-2/+5
* elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
2000-06-062000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>Michael Snyder1-35/+121
* elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus, elfcore_grok_psinfo): Add code to allow debugging a 32-bit corefile on a 64-bit (Sparc Solaris) host. Also clean up a few old comments.
2000-05-31(_bfd_elf_slurp_version_tables): Correct reading of versionUlrich Drepper1-11/+33
definitions. We must not assume they are sorted in the file according to their index numbers.
2000-05-29(_bfd_elf_link_hash_table_init): Initialize dynlocal.Alan Modra1-0/+1
2000-05-09Fix some nits shown up by objcopy.Alan Modra1-16/+33
2000-05-052000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>Michael Snyder1-3/+18
* elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1. * bfd-in.h: Prototype bfd_elf_get_arch_size. * bfd-in2.h: Prototype bfd_elf_get_arch_size.
2000-05-022000-05-02 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+1
* elf.c (prep_headers): USe ELFOSABI_NONE instead of ELFOSABI_SYSV.
2000-04-21IA-64 ELF support.Jim Wilson1-0/+3
2000-03-27ATMEL AVR microcontroller support.Alan Modra1-0/+3
2000-03-06 * elf.c (swap_out_syms): Check for null type_ptr.Catherine Moore1-1/+2
2000-02-23Add IBM 370 support.Alan Modra1-1/+4
2000-02-18 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirectRichard Henderson1-8/+4
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-0/+56
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-01-10Apply patch from Egor Duda to process win32_pstatus notes in core dumps.Nick Clifton1-1/+82
2000-01-03ELF visibility patch from Martin Loewis.Nick Clifton1-4/+14