ea423e261f
The patch fixes two related problems: - If CIE augmentation string has 'L' token the CIE contains a byte defines LSDA encoding. We should skip this byte in `getFdeEncoding` routine. Before this fix we do not skip it and if the next token is 'R' treat this byte as FDE encoding. - FDE encoding format has separate flags e.g. DW_EH_PE_pcrel for definition of relative pointers. We should add .eh_frame address to the PC value iif the DW_EH_PE_pcrel is specified. http://www.airs.com/blog/archives/460 There is one more not fixed problem in this code. If PC value is encoded using signed relative format e.g. DW_EH_PE_sdata4 | DW_EH_PE_pcrel we should sign extend result of read32 to perform calculation correctly. I am going to fix that in a separate patch. Differential Revision: http://reviews.llvm.org/D17733 llvm-svn: 262461 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Config.h | ||
Driver.cpp | ||
Driver.h | ||
DriverUtils.cpp | ||
Error.cpp | ||
Error.h | ||
ICF.cpp | ||
ICF.h | ||
InputFiles.cpp | ||
InputFiles.h | ||
InputSection.cpp | ||
InputSection.h | ||
LinkerScript.cpp | ||
LinkerScript.h | ||
MarkLive.cpp | ||
Options.td | ||
OutputSections.cpp | ||
OutputSections.h | ||
README.md | ||
SymbolTable.cpp | ||
SymbolTable.h | ||
Symbols.cpp | ||
Symbols.h | ||
Target.cpp | ||
Target.h | ||
Writer.cpp | ||
Writer.h |
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:🧝: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.)