hanchenye-llvm-project/lld/ELF
Rui Ueyama 40c589048e ELF: Remove relSize function from ICF.cpp. NFC.
llvm-svn: 262155
2016-02-27 20:29:45 +00:00
..
CMakeLists.txt ELF: Implement ICF. 2016-02-25 18:43:51 +00:00
Config.h ELF: Implement ICF. 2016-02-25 18:43:51 +00:00
Driver.cpp ELF: Define log() to print out message if --verbose is given. 2016-02-25 18:56:01 +00:00
Driver.h ELF: Remove readLinkerScript and define LinkerScript::read instead. 2016-02-11 21:38:55 +00:00
DriverUtils.cpp Re-submit ELF: Report multiple errors from the driver. 2016-02-02 21:13:09 +00:00
Error.cpp ELF: Define log() to print out message if --verbose is given. 2016-02-25 18:56:01 +00:00
Error.h ELF: Define log() to print out message if --verbose is given. 2016-02-25 18:56:01 +00:00
ICF.cpp ELF: Remove relSize function from ICF.cpp. NFC. 2016-02-27 20:29:45 +00:00
ICF.h ELF: Implement ICF. 2016-02-25 18:43:51 +00:00
InputFiles.cpp ELF: Implement ICF. 2016-02-25 18:43:51 +00:00
InputFiles.h Make SymbolBodies private. 2016-02-26 21:31:34 +00:00
InputSection.cpp Refactor multiple calls to canBePreempted. 2016-02-26 14:33:23 +00:00
InputSection.h Remove default values which are always overwritten. 2016-02-25 18:49:09 +00:00
LinkerScript.cpp [ELF] - Implemented linkerscript sections padding. 2016-02-26 14:48:31 +00:00
LinkerScript.h [ELF] - Implemented linkerscript sections padding. 2016-02-26 14:48:31 +00:00
MarkLive.cpp [ELF] - Referencing __start or __stop should keep the section from GC. 2016-02-25 08:40:26 +00:00
Options.td ELF: Implement ICF. 2016-02-25 18:43:51 +00:00
OutputSections.cpp Simplify. NFC. 2016-02-26 15:42:06 +00:00
OutputSections.h Fix some confusion about what can be preempted. 2016-02-26 14:27:47 +00:00
README.md ELF: Write about the current policy to README. 2016-02-02 23:45:54 +00:00
SymbolTable.cpp Report duplicated symbols in bitcode. 2016-02-26 21:49:38 +00:00
SymbolTable.h Report duplicated symbols in bitcode. 2016-02-26 21:49:38 +00:00
Symbols.cpp Add comment on AMDGPU that the difference has no obvious reason. 2016-02-26 15:39:26 +00:00
Symbols.h Description of symbols is avalable here: 2016-02-26 14:36:36 +00:00
Target.cpp Fix some confusion about what can be preempted. 2016-02-26 14:27:47 +00:00
Target.h Fix some confusion about what can be preempted. 2016-02-26 14:27:47 +00:00
Writer.cpp Report duplicated symbols in bitcode. 2016-02-26 21:49:38 +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 "Hello world" can be linked on Linux/PPC64 and on Linux/AArch64 or FreeBSD/AArch64.

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.

Library Use

You can embed LLD to your program by linking against it and calling the linker's entry point function lld::elf2::link.

The current policy is that it is your reponsibility to give trustworthy object files. The function is guaranteed to return as long as you do not pass corrupted or malicious object files. A corrupted file could cause a fatal error or SEGV. That being said, you don't need to worry too much about it if you create object files in a usual way and give them to the linker (it is naturally expected to work, or otherwise it's a linker's bug.)