llvm-project/lld/ELF
Simon Atanasyan 1d7df40711 [ELF][MIPS] MIPS .reginfo sections handling
MIPS .reginfo section provides information on the registers used by
the code in the object file. Linker should collect this information and
write .reginfo section in the output file. This section contains a union
of used registers masks taken from input .reginfo sections and final
value of the `_gp` symbol.

For details see the "Register Information" section in Chapter 4 in the
following document:
ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf

The patch implements .reginfo sections handling with a couple missed
features: a) it does not put output .reginfo section into the separate
REGINFO segment; b) it does not merge `ri_cprmask` masks from input
section. These features will be implemented later.

Differential Revision: http://reviews.llvm.org/D15669

llvm-svn: 256119
2015-12-20 10:57:34 +00:00
..
CMakeLists.txt ELF2: Implement --gc-sections. 2015-10-22 18:49:53 +00:00
Config.h [ELF][MIPS] Handle R_MIPS_HI16/LO16 relocations against _gp_disp symbol 2015-12-16 14:45:09 +00:00
Driver.cpp ELF: Drop 'Sym' suffix from member function names for consistency. 2015-12-16 22:31:14 +00:00
Driver.h Simplify the InputFile type hierarchy. 2015-10-12 01:55:32 +00:00
DriverUtils.cpp Update lld to match llvm r250901. OptTable constructor now takes an ArrayRef. NFC 2015-10-21 16:31:56 +00:00
Error.cpp [ELF2] Output of all unknown arguments instead of only one. 2015-09-24 18:55:33 +00:00
Error.h [ELF2] Output of all unknown arguments instead of only one. 2015-09-24 18:55:33 +00:00
InputFiles.cpp [ELF][MIPS] MIPS .reginfo sections handling 2015-12-20 10:57:34 +00:00
InputFiles.h Make a function out-of-line. 2015-11-20 02:10:52 +00:00
InputSection.cpp [ELF][MIPS] MIPS .reginfo sections handling 2015-12-20 10:57:34 +00:00
InputSection.h [ELF][MIPS] MIPS .reginfo sections handling 2015-12-20 10:57:34 +00:00
LinkerScript.cpp [ELF] Lookup INPUT argument in the current directory 2015-11-26 20:23:46 +00:00
MarkLive.cpp Early continue. NFC. 2015-11-12 19:45:58 +00:00
Options.td Add --version-script= alias for --version-script 2015-12-10 14:08:45 +00:00
OutputSections.cpp [ELF][MIPS] MIPS .reginfo sections handling 2015-12-20 10:57:34 +00:00
OutputSections.h [ELF][MIPS] MIPS .reginfo sections handling 2015-12-20 10:57:34 +00:00
README.md ELF2: Add a note about performance. 2015-10-13 21:28:02 +00:00
SymbolTable.cpp ELF: Rename isTLS -> isTls for consistency. 2015-12-17 00:04:18 +00:00
SymbolTable.h ELF: Move shouldUseRela to Writer.cpp. 2015-12-16 23:33:56 +00:00
Symbols.cpp Typedef uintX_t at beginning of a function just like others. 2015-12-16 23:49:19 +00:00
Symbols.h ELF: Separate NeedsCopy and OffsetInBSS. 2015-12-17 01:14:23 +00:00
Target.cpp [ELF] - implemented @indntpoff (x86) relocation and its optimization. 2015-12-17 09:32:21 +00:00
Target.h [ELF] - implemented @indntpoff (x86) relocation and its optimization. 2015-12-17 09:32:21 +00:00
Writer.cpp [ELF][MIPS] MIPS .reginfo sections handling 2015-12-20 10:57:34 +00:00
Writer.h ELF2: Implement --gc-sections. 2015-10-22 18:49:53 +00:00

README.md

The New ELF Linker

This directory contains a port of the new PE/COFF linker for ELF.

Overall Design

See COFF/README.md for details on the design. Note that unlike COFF, we do not distinguish chunks from input sections; they are merged together.

Capabilities

This linker can link LLVM and Clang on Linux/x86-64 or FreeBSD/x86-64 with -LLVM_ENABLE_THREADS=OFF. "Hello world" can be linked on Linux/PPC64.

Performance

Achieving good performance is one of our goals. It's too early to reach a conclusion, but we are optimistic about that as it currently seems to be faster than GNU gold. It will be interesting to compare when we are close to feature parity.