forked from OSchip/llvm-project
f6bc65a3b2
Added check for terminator CIE/FDE which has zero data size. void EHOutputSection<ELFT>::addSectionAux( ... // If CIE/FDE data length is zero then Length is 4, this // shall be considered a terminator and processing shall end. if (Length == 4) break; ... After this "Bug 25923 - lld/ELF2 linked application crashes if exceptions were used." is fixed for me. Self link of clang also works. Initial commit message: [ELF] - implemented --eh-frame-hdr command line option. --eh-frame-hdr Request creation of ".eh_frame_hdr" section and ELF "PT_GNU_EH_FRAME" segment header. Both gold and the GNU linker support an option --eh-frame-hdr which tell them to construct a header for all the .eh_frame sections. This header is placed in a section named .eh_frame_hdr and also in a PT_GNU_EH_FRAME segment. At runtime the unwinder can find all the PT_GNU_EH_FRAME segments by calling dl_iterate_phdr. This section contains a lookup table for quick binary search of FDEs. Detailed info can be found here: http://www.airs.com/blog/archives/462 Differential revision: http://reviews.llvm.org/D15712 llvm-svn: 257889 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Config.h | ||
Driver.cpp | ||
Driver.h | ||
DriverUtils.cpp | ||
Error.cpp | ||
Error.h | ||
InputFiles.cpp | ||
InputFiles.h | ||
InputSection.cpp | ||
InputSection.h | ||
LinkerScript.cpp | ||
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.