Commit Graph

41 Commits

Author SHA1 Message Date
Ian Lance Taylor
0e87992779 include/elf:
* 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-20 23:37:51 +00:00
Ian Lance Taylor
15d5fa1607 elfcpp:/
* 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-03-02 02:45:29 +00:00
H.J. Lu
6fe8fd2093 2009-01-06 H.J. Lu <hongjiu.lu@intel.com>
* elfcpp.h (enum STT): Remove STT_IFUNC.
2009-01-06 18:20:45 +00:00
Nick Clifton
e7c3341679 include/elf/
* 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-12-03 14:51:00 +00:00
David Edelsohn
8da8e50a53 2008-06-12 David S. Miller <davem@davemloft.net>
* 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-06-12 16:58:40 +00:00
Ian Lance Taylor
62b01cb503 elfcpp/:
* 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-05-28 20:48:16 +00:00
Ian Lance Taylor
fa29711731 * elfcpp_file.h (class Elf_file): Add large_shndx_offset_ field.
(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-19 18:33:19 +00:00
David S. Miller
7c41443585 elfcpp/
* 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 23:21:01 +00:00
David S. Miller
bca18a16dd * sparc.h (EF_SPARC_EXT_MASK, EF_SPARC_32PLUS_MASK,
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-16 01:56:33 +00:00
David S. Miller
52a952116f * sparc.h: New file
* 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-11 19:13:08 +00:00
Ian Lance Taylor
15fb9978c9 * elfcpp_swap.h (Swap_unaligned<64, true>::writeval): Correct
byte order.
2008-04-03 23:33:20 +00:00
Ian Lance Taylor
baf4901374 * elfcpp.h (NT_VERSION, NT_ARCH): Define as enum constants.
(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-25 05:00:01 +00:00
Ian Lance Taylor
747aa1e396 Add ChangeLog file. 2008-03-22 00:02:52 +00:00
Ian Lance Taylor
13670ee669 Support --hash-style=gnu. 2008-03-06 00:15:04 +00:00
Ian Lance Taylor
88dd47ac00 Implement --just-symbols, including -R FILE. Fix symbol values when
doing a relocatable link.
2008-02-07 01:51:25 +00:00
Ian Lance Taylor
a445fddf82 Fully implement the SECTIONS clause. 2008-02-04 05:43:05 +00:00
Ian Lance Taylor
cda30489fc Remove Andrew's e-mail address. 2008-01-09 19:40:24 +00:00
Ian Lance Taylor
f2f3f78338 From Craig Silverstein: Implement section_info. 2007-11-09 23:18:16 +00:00
Ian Lance Taylor
5c2c6c957b From Craig Silverstein: Add first version of generating error messages
with file name and line number.
2007-11-02 23:02:44 +00:00
Ian Lance Taylor
fe906b004d From Craig Silverstein: Add more DWARF info, add some i386 comments. 2007-11-02 03:31:41 +00:00
Ian Lance Taylor
f7e2ee4820 Reworked from Andrew Chatham: report error locations. 2007-11-02 03:28:52 +00:00
Ian Lance Taylor
0eadd5b433 From Craig Silverstein: update comments. 2007-10-04 22:24:47 +00:00
Ian Lance Taylor
9cf3573327 From Craig Silvestein: document the i386 relocs. 2007-10-03 20:54:32 +00:00
Ian Lance Taylor
5b3463d9ee Add Signed_valtype and use it for sign extension. Fix names of rela8. 2007-10-01 21:25:23 +00:00
Ian Lance Taylor
fd546a3587 Basic DWARF constants. 2007-09-26 05:50:57 +00:00
Ian Lance Taylor
6cb15b7f89 Add licensing text to every source file. 2007-09-22 21:02:10 +00:00
Ian Lance Taylor
7e0cdd2361 Remove unnecessary elfcpp_config.h file. 2007-09-22 20:56:19 +00:00
Ian Lance Taylor
d5179552f6 From Andrew Chatham: List x86_64 ELF relocs. 2007-09-22 05:50:40 +00:00
Ian Lance Taylor
e698bc313f Add support for returning the section type. 2007-09-19 23:51:52 +00:00
Ian Lance Taylor
14b3174058 Generate version information. 2006-12-06 00:02:36 +00:00
Ian Lance Taylor
a3ad94edd4 Hash tables, dynamic section, i386 PLT, gold_assert. 2006-11-29 17:56:40 +00:00
Ian Lance Taylor
c06b7b0ba3 Snapshot. Includes first cut at output relocation sections. 2006-11-16 00:38:25 +00:00
Ian Lance Taylor
dbe717effb More dynamic object support, initial scripting support. 2006-11-14 19:21:05 +00:00
Ian Lance Taylor
645f81233b Add Elf_file interface which can be used by both Sized_relobj and
Sized_dynobj.
2006-11-07 18:51:39 +00:00
Ian Lance Taylor
8d9455b422 Rework swapping code. 2006-11-06 22:45:08 +00:00
Ian Lance Taylor
92e059d8dc Framework for relocation scanning. Implement simple static TLS
relocations.
2006-10-20 20:40:49 +00:00
Ian Lance Taylor
61ba1cf936 Snapshot. Now able to produce a minimal executable which actually
runs.
2006-09-29 19:58:17 +00:00
Ian Lance Taylor
39081c14cf Add program segments. 2006-09-25 21:29:06 +00:00
Ian Lance Taylor
1564db8db6 More symbol resolution code. 2006-09-07 21:21:41 +00:00
Ian Lance Taylor
14bfc3f555 Another snapshot of the current state of the sources. Gets to the
point of symbol resolution and can now issue a multiple definition
error.  Also added target selection infrastructure.
2006-08-18 22:29:20 +00:00
Ian Lance Taylor
bae7f79e03 Initial CVS checkin of gold 2006-08-04 23:10:59 +00:00