summaryrefslogtreecommitdiff
path: root/bfd/elf.c
Commit message (Collapse)AuthorAgeFilesLines
* * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffixJakub Jelinek2001-05-111-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.
* * ecoff.c (bfd_debug_section): Fix initialization.Alan Modra2001-05-071-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.
* 2000-04-27 H.J. Lu <hjl@gnu.org>H.J. Lu2001-04-301-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.
* Add OpenRISC supportNick Clifton2001-04-241-1/+4
|
* bfd/Jakub Jelinek2001-04-131-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.
* Update copyright noticesNick Clifton2001-03-081-1/+2
|
* fixes for elf_find_nearest_lineNick Clifton2001-02-141-38/+75
|
* Add s390 supportNick Clifton2001-02-101-0/+3
|
* Fix formatting.Nick Clifton2000-12-121-2/+2
|
* Generalize DWARF2 and COFF support.Nick Clifton2000-12-081-1/+2
|
* Add support for x86_64-*-linux-gnu* targetNick Clifton2000-11-301-0/+3
|
* Revert 2000-10-07 link-once section symbol changes.Alan Modra2000-10-111-6/+6
|
* Make elf section symbols global for link-once sections.Alan Modra2000-10-071-3/+5
|
* Preserve machine dependent section header flags when reading ELF object file.Jim Wilson2000-10-051-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.
* Support for Unixware 7.1.x pxstatus_t and lwpxstatus_t.Alan Modra2000-09-301-2/+10
|
* That'll teach me not to type little patches in by hand. GetAlan Modra2000-09-291-1/+1
| | | | the parentheses right.
* (elf_fake_sections): Do not mark the section SHT_NOBITS ifAlan Modra2000-09-291-8/+2
| | | | is has the SEC_HAS_CONTENTS flag set.
* Make debug_sec_names static.Nick Clifton2000-09-111-1/+1
|
* 2000-09-07 Kazu Hirata <kazu@hxi.com>Kazu Hirata2000-09-071-162/+152
| | | | * elf.c: Fix formatting.
* Add .gnu.linkobce.wi. to the list of debug section names.Nick Clifton2000-09-021-4/+17
| | | | Update generated files
* 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>Michael Snyder2000-08-301-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-22 H.J. Lu <hjl@gnu.org>H.J. Lu2000-08-221-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.
* Restore reverted code. Fix bug in reverted code which was eliminating tooNick Clifton2000-08-031-189/+314
| | | | many segments.
* 2000-08-03 H.J. Lu <hjl@gnu.org>H.J. Lu2000-08-031-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.
* Improve section to segment mapping code.Nick Clifton2000-07-311-63/+171
|
* * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.Hans-Peter Nilsson2000-07-201-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-19 H.J. Lu <hjl@gnu.org>H.J. Lu2000-07-201-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-19 H.J. Lu <hjl@gnu.org>H.J. Lu2000-07-201-3/+3
| | | | | * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG, DT_DEPAUDIT and DT_AUDIT as strings.
* 2000-07-19 H.J. Lu <hjl@gnu.org>H.J. Lu2000-07-191-3/+1
| | | | * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
* 2000-07-19 H.J. Lu <hjl@gnu.org>H.J. Lu2000-07-191-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.
* Rename bfd_elf_get_arch_size to bfd_get_arch_sizeNick Clifton2000-07-181-32/+2
| | | | Rename bfd_elf_get_sign_extend_vma to bfd_get_sign_extend_vma
* Add function bfd_elf_get_sign_extend_vma.Andrew Cagney2000-07-111-0/+14
|
* Applied Stephane Carrez <Stephane.Carrez@worldnet.fr> patches to add supportNick Clifton2000-06-191-2/+10
| | | | for m68hc11 and m68hc12 processors.
* 2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>Ulf Carlsson2000-06-191-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-06 Michael Snyder <msnyder@seadog.cygnus.com>Michael Snyder2000-06-061-2/+5
| | | | * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
* 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>Michael Snyder2000-06-061-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.
* (_bfd_elf_slurp_version_tables): Correct reading of versionUlrich Drepper2000-05-311-11/+33
| | | | | definitions. We must not assume they are sorted in the file according to their index numbers.
* (_bfd_elf_link_hash_table_init): Initialize dynlocal.Alan Modra2000-05-291-0/+1
|
* Fix some nits shown up by objcopy.Alan Modra2000-05-091-16/+33
|
* 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>Michael Snyder2000-05-051-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-02 H.J. Lu <hjl@gnu.org>H.J. Lu2000-05-021-1/+1
| | | | | * elf.c (prep_headers): USe ELFOSABI_NONE instead of ELFOSABI_SYSV.
* IA-64 ELF support.Jim Wilson2000-04-211-0/+3
|
* ATMEL AVR microcontroller support.Alan Modra2000-03-271-0/+3
|
* * elf.c (swap_out_syms): Check for null type_ptr.Catherine Moore2000-03-061-1/+2
|
* Add IBM 370 support.Alan Modra2000-02-231-1/+4
|
* * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirectRichard Henderson2000-02-181-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.
* * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect andRichard Henderson2000-02-131-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.
* Apply patch from Egor Duda to process win32_pstatus notes in core dumps.Nick Clifton2000-01-101-1/+82
|
* ELF visibility patch from Martin Loewis.Nick Clifton2000-01-031-4/+14
|
* Add support for SSE registers in ELF core files.Jim Blandy1999-12-071-12/+49
| | | | | | | * elf.c (elfcore_make_note_pseudosection): New function. (elfcore_grok_prfpreg): Use it. (elfcore_grok_prxfpreg): New function. (elfcore_grok_note): Recognize Linux NT_PRXFPREG notes.