aboutsummaryrefslogtreecommitdiff
path: root/elfcpp
AgeCommit message (Collapse)AuthorFilesLines
2009-07-23 * config/obj-elf.c (obj_elf_type): Add code to support a type ofNick Clifton2-0/+5
gnu_unique_object. * doc/as.texinfo: Document new feature of .type directive. * NEWS: Mention support for gnu_unique_object symbol type. * common.h (STB_GNU_UNIQUE): Define. * NEWS: Mention the linker's support for symbols with a binding of STB_GNU_UNIQUE. * gas/elf/type.s: Add unique global symbol definition. * gas/elf/type.e: Add expected readelf output for global unique symbol. * elfcpp.h (enum STB): Add STB_GNU_UNIQUE. * readelf.c (get_symbol_binding): For Linux targeted files return UNIQUE for symbols with the STB_GNU_UNIQUE binding. * doc/binutils.texi: Document the meaning of the 'u' symbol binding in the output of nm and objdump --syms. * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field. * elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols with the BSF_GNU_UNIQUE flag bit set. * elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag for symbols with STB_GNU_UNIQUE binding. * elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols with the STB_GNU_UNIQUE binding. (elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for symbols with STB_GNU_UNIQUE binding. Set STB_GNU_UNIQUE for symbols with the unique_global field set. (elf_link_output_extsym): Set unique_global field for symbols with the STB_GNU_UNIQUE binding. * syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit. (bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE symbols. (bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE symbols. * bfd-in2.h: Regenerate.
2009-06-22 * elfcpp.h (SHN_X86_64_LCOMMON): Define enum constant.Ian Lance Taylor2-1/+16
(enum SHT): Add SHT_X86_64_UNWIND. (enum SHF): Add SHT_X86_64_LARGE.
2009-05-272009-05-27 Doug Kwan <dougkwan@google.com>Doug Kwan3-1/+231
* arm.h: New file. * elfcpp.h (enum SHT): Add ARM-specific special sections. (enum PT): Add ARM-specific section types. (enum SST): Add STT_ARM_TFUNC.
2009-05-01Fix typoNick Clifton1-1/+1
2009-04-30include/elfNick Clifton2-0/+5
2009-04-30 Nick Clifton <nickc@redhat.com> * common.h (STT_GNU_IFUNC): Define. elfcpp 2009-04-30 Nick Clifton <nickc@redhat.com> * (enum STT): Add STT_GNU_IFUNC. gas 2009-04-30 Nick Clifton <nickc@redhat.com> * config/obj-elf.c (obj_elf_type): Add support for a gnu_indirect_function type. * config/tc-i386.c (tc_i386_fix_adjustable): Do not adjust fixups against indirect function symbols. * doc/as.texinfo (.type): Document the support for the gnu_indirect_function symbol type. * NEWS: Mention the new feature. gas/testsuite 2009-04-30 Nick Clifton <nickc@redhat.com> * gas/elf/elf.exp: Extend type test to include an ifunc symbol. Provide an alternative test for targets which do not support ifunc symbols. (type.s): Add entry for an ifunc symbol. (type.e): Add ifunc entry to expected symbol dump. (section2.e-armelf): Add entry for ifunc symbol. (type-noifunc.s): New file. (type-noifunc.e): New file. bfd/ 2009-04-30 Nick Clifton <nickc@redhat.com> * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs section pointer. (struct elf_obj_data): Add has_ifunc_symbols boolean. * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags into a STT_GNU_IFUNC symbol type. (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function type. (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if the binary contains ifunc symbols. * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC symbol type into a BSF_GNU_INDIRECT_FUNCTION flag. * elf32-i386.c (is_indirect_function): New function. (elf_i386_check_relocs): Create an ifunc output section. (allocate_dynrelocs): Create dynamic relocs in the ifunc output section if necessary. (elf_i386_relocate_section): Emit a reloc against an ifunc symbol if necessary. (elf_i386_add_symbol_hook): New function. Set the has_ifunc_symbols field of the elf_obj_data structure if an ifunc symbol is encountered. (elf_backend_post_process_headers): Define. (elf_backend_add_symbol_hook): Define. (elf_i386_post_process_headers): Rename to elf_i388_fbsd_post_process_headers. * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro. (is_indirect_function): New function. (elf64_x86_64_check_relocs): Create an ifunc output section. (allocate_dynrelocs): Create dynamic relocs in the ifunc output section if necessary. (elf64_x86_64_relocate_section): Emit a reloc against an ifunc symbol if necessary. (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the elf_obj_data structure if an ifunc symbol is encountered. (elf_backend_post_process_headers): Define. * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT if we have ifunc symbols to handle. (get_ifunc_reloc_section_name): New function. Computes the name for an ifunc section. (_bfd_elf_make_ifunc_reloc_section): New function. Creates a section to hold ifunc relocs. * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define. (bfd_print_symbol_vandf): Handle ifunc symbols. (bfd_decode_symclass): Likewise. * bfd-in2.h: Regenerate. binutils 2009-04-30 Nick Clifton <nickc@redhat.com> * readelf.c (dump_relocations): Display a relocation against an ifunc symbol as if it were a function invocation. (get_symbol_type): Handle STT_GNU_IFUNC. ld 2009-04-30 Nick Clifton <nickc@redhat.com> * NEWS: Mention support for IFUNC symbols. ld/testsuite 2009-04-30 Nick Clifton <nickc@redhat.com> * ld-ifunc: New directory. * ld-ifunc/ifunc.exp: New file: Run the IFUNC tests. * ld-ifunc/prog.c: New file. * ld-ifunc/lib.c: New file.
2009-03-20include/elf:Ian Lance Taylor2-2/+8
* common.h (SHT_GNU_INCREMENTAL_INPUTS): Define. elfcpp: * elfcpp.h (SHT_GNU_INCREMENTAL_INPUTS): Define. gold: * incremental.cc: New file. * Makefile.am (CCFILES): Add incremental.cc. * Makefile.in: Rebuild.
2009-03-02elfcpp:/Ian Lance Taylor2-3/+62
* elfcpp_swap.h: #include "config.h". Only #include <byteswap.h> if HAVE_BYTESWAP_H is defined; if not, provide definitions for bswap_{16,32,64}. For gcc 4.3 and later, use the builtin bswap functions. Check WORDS_BIGENDIAN rather than __BYTE_ORDER. gold:/ * configure.ac: Check for byteswap.h. * configure: Rebuild. * config.in: Rebuild.
2009-01-062009-01-06 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2-1/+4
* elfcpp.h (enum STT): Remove STT_IFUNC.
2008-12-03include/elf/Nick Clifton2-1/+6
* common.h (STT_IFUNC): Define. elfcpp/ * elfcpp.h (enum STT): Add STT_IFUNC. bfd/ * syms.c (struct bfd_symbol): Add new flag BSF_INDIRECT_FUNCTION. Remove redundant flag BFD_FORT_COMM_DEFAULT_VALUE. Renumber flags to remove gaps. (bfd_print_symbol_vandf): Return 'i' for BSF_INDIRECT_FUNCTION. (bfd_decode_symclass): Likewise. * elf.c (swap_out_syms): Translate BSF_INDIRECT_FUNCTION into STT_IFUNC. (elf_find_function): Treat STT_IFUNC in the same way as STT_FUNC. (_bfd_elf_is_function_type): Likewise. * elf32-arm.c (arm_elf_find_function): Likewise. (elf32_arm_adjust_dynamic_symbol): Likewise. (elf32_arm_swap_symbol_in): Likewise. (elf32_arm_additional_program_headers): Likewise. * elf32-i386.c (is_indirect_symbol): New function. (elf_i386_check_relocs): Also generate dynamic relocs for relocations against STT_IFUNC symbols. (allocate_dynrelocs): Likewise. (elf_i386_relocate_section): Likewise. * elf64-x86-64.c (is_indirect_symbol): New function. (elf64_x86_64_check_relocs): Also generate dynamic relocs for relocations against STT_IFUNC symbols. (allocate_dynrelocs): Likewise. (elf64_x86_64_relocate_section): Likewise. * elfcode.h (elf_slurp_symbol_table): Translate STT_IFUNC into BSF_INDIRECT_FUNCTION. * elflink.c (_bfd_elf_adjust_dynamic_reloc_section): Add support for STT_IFUNC symbols. (get_ifunc_reloc_section_name): New function. (_bfd_elf_make_ifunc_reloc_section): New function. * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs field. * bfd-in2.h: Regenerate. gas/ * config/obj-elf.c (obj_elf_type): Add support for STT_IFUNC type. * doc/as.texinfo: Document new feature. * NEWS: Mention new feature. gas/testsuite/ * gas/elf/type.s: Add test of STT_IFUNC symbol type. * gas/elf/type.e: Update expected disassembly. * gas/elf/elf.exp: Update grep of symbol types. ld/ * NEWS: Mention new feature. * pe-dll.c (process_def_file): Replace use of redundant BFD_FORT_COMM_DEFAULT_VALUE with 0. * scripttempl/elf.sc: Add .rel.ifunc.dyn and .rela.ifunc.dyn sections. ld/testsuite/ * ld-mips-elf/reloc-1-n32.d: Updated expected output for reloc descriptions. * ld-mips-elf/reloc-1-n64.d: Likewise. * ld-i386/ifunc.d: New test. * ld-i386/ifunc.s: Source file for the new test. * ld-i386/i386.exp: Run the new test.
2008-06-122008-06-12 David S. Miller <davem@davemloft.net>David Edelsohn3-0/+211
* powerpc.h: New file. * elfcpp.h (SHT_ORDERED): New enum constant. (DT_PPC_GOT, DT_PPC64_GLINK, DT_PPC64_OPD, DT_PPC64_OPDSZ): Same.
2008-05-28elfcpp/:Ian Lance Taylor2-2/+32
* dwarf.h (enum DW_FORM): Define. gold/: * reduced_debug_output.cc: New file. * reduced_debug_output.h: New file. * options.h (class General_optoins): Add --strip-debug-non-line. * options.cc (General_options::finalize): Add strip_debug_non_line to the strip heirarchy. * layout.h (class Layout): Add debug_abbrev_ and debug_info_ fields. * layout.cc: Include "reduced_debug_output.h". (Layout::Layout): Initialize new fields. (line_only_debug_sections): New static array. (is_lines_only_debug_sections): New static inline function. (Layout::include_section): Handle --strip-debug-non-line. (Layout::make_output_section): If --strip-debug-non-line, build new output sections for .debug_abbrev and .debug_info. * dwarf_reader.cc (read_unsigned_LEB_128): Move to namespace gold. Warn about possible overflow. (read_signed_LEB_128): Likewise. * dwarf_reader.h: (read_unsigned_LEB_128): Declare. (read_signed_LEB_128): Declare. * Makefile.am (CCFILES): Add reduced_debug_output.cc. (HFILES): Add reduced_debug_output.h. * Makefile.in: Rebuild.
2008-04-19 * elfcpp_file.h (class Elf_file): Add large_shndx_offset_ field.Ian Lance Taylor2-1/+48
(Elf_file::large_shndx_offset): New function. (Elf_file::construct): Initialize large_shndx_offset_. (Elf_File::initialize_shnum): If necessary, adjust shstrndx_ and set large_shndx_offset_.
2008-04-16elfcpp/David S. Miller2-0/+28
* elfcpp.h (DF_1_NOW, DF_1_GLOBAL, DF_1_GROUP, DF_1_NODELETE, DF_1_LOADFLTR, DF_1_INITFIRST, DF_1_NOOPEN, DF_1_ORIGIN, DF_1_DIRECT, DF_1_TRANS, DF_1_INTERPOSE, DF_1_NODEFLIB, DF_1_NODUMP, DF_1_CONLFAT): New enum constants. gold/ * options.h (DEFINE_enable): New macro. (new_dtags): New enable option. (initfirst, interpose, loadfltr, nodefaultlib, nodelete, nodlopen, nodump): New -z options. * layout.cc (Layout:finish_dynamic_section): If new dtags enabled, emit DT_RUNPATH. Also, emit a DT_FLAGS_1 containing any specified -z flags.
2008-04-16 * sparc.h (EF_SPARC_EXT_MASK, EF_SPARC_32PLUS_MASK,David S. Miller2-0/+24
EF_SPARC_32PLUS, EF_SPARC_SUN_US1, EF_SPARC_HAL_R1, EF_SPARC_SUN_US3, EF_SPARC_LEDATA, EF_SPARCV9_MM, EF_SPARCV9_TSO, EF_SPARCV9_PSO, EF_SPARCV9_RMO): Define as enum constants.
2008-04-11 * sparc.h: New fileDavid S. Miller3-3/+191
* elfcpp.h (SHN_BEFORE, SHN_AFTER): New enum constants. (SHT_SPARC_GOTDATA, SHF_ORDERED, SHF_EXCLUDE, STT_SPARC_REGISTER, DT_SPARC_REGISTER): Likewise.
2008-04-03 * elfcpp_swap.h (Swap_unaligned<64, true>::writeval): CorrectIan Lance Taylor2-8/+13
byte order.
2008-03-25 * elfcpp.h (NT_VERSION, NT_ARCH): Define as enum constants.Ian Lance Taylor2-0/+57
(NT_GNU_ABI_TAG, NT_GNU_HWCAP): Likewise. (NT_GNU_BUILD_ID, NT_GNU_GOLD_VERSION): Likewise. (ELF_NOTE_OS_LINUX, ELF_NOTE_OS_GNU): Likewise. (ELF_NOTE_OS_SOLARIS2, ELF_NOTE_OS_NETBSD): Likewise. (ELF_NOTE_OS_SYLLABLE): Likewise.
2008-03-22Add ChangeLog file.Ian Lance Taylor1-0/+4
2008-03-06Support --hash-style=gnu.Ian Lance Taylor1-0/+4
2008-02-07Implement --just-symbols, including -R FILE. Fix symbol values whenIan Lance Taylor1-0/+23
doing a relocatable link.
2008-02-04Fully implement the SECTIONS clause.Ian Lance Taylor1-0/+45
2008-01-09Remove Andrew's e-mail address.Ian Lance Taylor1-1/+1
2007-11-09From Craig Silverstein: Implement section_info.Ian Lance Taylor1-0/+24
2007-11-02From Craig Silverstein: Add first version of generating error messagesIan Lance Taylor1-10/+0
with file name and line number.
2007-11-02From Craig Silverstein: Add more DWARF info, add some i386 comments.Ian Lance Taylor2-3/+242
2007-11-02Reworked from Andrew Chatham: report error locations.Ian Lance Taylor1-0/+23
2007-10-04From Craig Silverstein: update comments.Ian Lance Taylor1-1/+7
2007-10-03From Craig Silvestein: document the i386 relocs.Ian Lance Taylor1-35/+38
2007-10-01Add Signed_valtype and use it for sign extension. Fix names of rela8.Ian Lance Taylor1-3/+7
2007-09-26Basic DWARF constants.Ian Lance Taylor1-0/+155
2007-09-22Add licensing text to every source file.Ian Lance Taylor6-0/+174
2007-09-22Remove unnecessary elfcpp_config.h file.Ian Lance Taylor3-3/+0
2007-09-22From Andrew Chatham: List x86_64 ELF relocs.Ian Lance Taylor1-0/+65
2007-09-19Add support for returning the section type.Ian Lance Taylor1-0/+23
2006-12-06Generate version information.Ian Lance Taylor1-0/+128
2006-11-29Hash tables, dynamic section, i386 PLT, gold_assert.Ian Lance Taylor3-17/+66
2006-11-16Snapshot. Includes first cut at output relocation sections.Ian Lance Taylor1-1/+51
2006-11-14More dynamic object support, initial scripting support.Ian Lance Taylor2-2/+403
2006-11-07Add Elf_file interface which can be used by both Sized_relobj andIan Lance Taylor2-0/+291
Sized_dynobj.
2006-11-06Rework swapping code.Ian Lance Taylor3-252/+426
2006-10-20Framework for relocation scanning. Implement simple static TLSIan Lance Taylor1-1/+1
relocations.
2006-09-29Snapshot. Now able to produce a minimal executable which actuallyIan Lance Taylor3-2/+379
runs.
2006-09-25Add program segments.Ian Lance Taylor2-13/+128
2006-09-07More symbol resolution code.Ian Lance Taylor1-0/+57
2006-08-18Another snapshot of the current state of the sources. Gets to theIan Lance Taylor1-1/+48
point of symbol resolution and can now issue a multiple definition error. Also added target selection infrastructure.
2006-08-04Initial CVS checkin of goldIan Lance Taylor4-0/+846