summaryrefslogtreecommitdiff
path: root/elfcpp
Commit message (Collapse)AuthorAgeFilesLines
* 2009-05-27 Doug Kwan <dougkwan@google.com>Doug Kwan2009-05-273-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.
* Fix typoNick Clifton2009-05-011-1/+1
|
* include/elfNick Clifton2009-04-302-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.
* include/elf:Ian Lance Taylor2009-03-202-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.
* elfcpp:/Ian Lance Taylor2009-03-022-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-06 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2009-01-062-1/+4
| | | | * elfcpp.h (enum STT): Remove STT_IFUNC.
* include/elf/Nick Clifton2008-12-032-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-12 David S. Miller <davem@davemloft.net>David Edelsohn2008-06-123-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.
* elfcpp/:Ian Lance Taylor2008-05-282-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.
* * elfcpp_file.h (class Elf_file): Add large_shndx_offset_ field.Ian Lance Taylor2008-04-192-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_.
* elfcpp/David S. Miller2008-04-162-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.
* * sparc.h (EF_SPARC_EXT_MASK, EF_SPARC_32PLUS_MASK,David S. Miller2008-04-162-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.
* * sparc.h: New fileDavid S. Miller2008-04-113-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.
* * elfcpp_swap.h (Swap_unaligned<64, true>::writeval): CorrectIan Lance Taylor2008-04-032-8/+13
| | | | byte order.
* * elfcpp.h (NT_VERSION, NT_ARCH): Define as enum constants.Ian Lance Taylor2008-03-252-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.
* Add ChangeLog file.Ian Lance Taylor2008-03-221-0/+4
|
* Support --hash-style=gnu.Ian Lance Taylor2008-03-061-0/+4
|
* Implement --just-symbols, including -R FILE. Fix symbol values whenIan Lance Taylor2008-02-071-0/+23
| | | | doing a relocatable link.
* Fully implement the SECTIONS clause.Ian Lance Taylor2008-02-041-0/+45
|
* Remove Andrew's e-mail address.Ian Lance Taylor2008-01-091-1/+1
|
* From Craig Silverstein: Implement section_info.Ian Lance Taylor2007-11-091-0/+24
|
* From Craig Silverstein: Add first version of generating error messagesIan Lance Taylor2007-11-021-10/+0
| | | | with file name and line number.
* From Craig Silverstein: Add more DWARF info, add some i386 comments.Ian Lance Taylor2007-11-022-3/+242
|
* Reworked from Andrew Chatham: report error locations.Ian Lance Taylor2007-11-021-0/+23
|
* From Craig Silverstein: update comments.Ian Lance Taylor2007-10-041-1/+7
|
* From Craig Silvestein: document the i386 relocs.Ian Lance Taylor2007-10-031-35/+38
|
* Add Signed_valtype and use it for sign extension. Fix names of rela8.Ian Lance Taylor2007-10-011-3/+7
|
* Basic DWARF constants.Ian Lance Taylor2007-09-261-0/+155
|
* Add licensing text to every source file.Ian Lance Taylor2007-09-226-0/+174
|
* Remove unnecessary elfcpp_config.h file.Ian Lance Taylor2007-09-223-3/+0
|
* From Andrew Chatham: List x86_64 ELF relocs.Ian Lance Taylor2007-09-221-0/+65
|
* Add support for returning the section type.Ian Lance Taylor2007-09-191-0/+23
|
* Generate version information.Ian Lance Taylor2006-12-061-0/+128
|
* Hash tables, dynamic section, i386 PLT, gold_assert.Ian Lance Taylor2006-11-293-17/+66
|
* Snapshot. Includes first cut at output relocation sections.Ian Lance Taylor2006-11-161-1/+51
|
* More dynamic object support, initial scripting support.Ian Lance Taylor2006-11-142-2/+403
|
* Add Elf_file interface which can be used by both Sized_relobj andIan Lance Taylor2006-11-072-0/+291
| | | | Sized_dynobj.
* Rework swapping code.Ian Lance Taylor2006-11-063-252/+426
|
* Framework for relocation scanning. Implement simple static TLSIan Lance Taylor2006-10-201-1/+1
| | | | relocations.
* Snapshot. Now able to produce a minimal executable which actuallyIan Lance Taylor2006-09-293-2/+379
| | | | runs.
* Add program segments.Ian Lance Taylor2006-09-252-13/+128
|
* More symbol resolution code.Ian Lance Taylor2006-09-071-0/+57
|
* Another snapshot of the current state of the sources. Gets to theIan Lance Taylor2006-08-181-1/+48
| | | | | point of symbol resolution and can now issue a multiple definition error. Also added target selection infrastructure.
* Initial CVS checkin of goldIan Lance Taylor2006-08-044-0/+846