llvm-project/lld/ELF
Petr Hosek 18821b60b0 [ELF] Generate symbol assignments for predefined symbols
The problem with symbol assignments in implicit linker scripts is that
they can refer synthetic symbols such as _end, _etext or _edata. The
value of these symbols is currently fixed only after all linker script
commands are processed, so these assignments will be using non-final and
hence invalid value.

Rather than fixing the symbol values after all command processing have
finished, we instead change the logic to generate symbol assignment
commands that set the value of these symbols while processing the
commands, this ensures that the value is going to be correct by the time
any reference to these symbol is processed and is equivalent to defining
these symbols explicitly in linker script as BFD ld does.

Differential Revision: https://reviews.llvm.org/D36986

llvm-svn: 312305
2017-09-01 02:23:31 +00:00
..
Arch [ELF] - Fix comment. NFC. 2017-08-31 10:14:10 +00:00
CMakeLists.txt Add basic 64-bit SPARC support 2017-06-28 17:05:39 +00:00
Config.h Revert r311468: If --dynamic-list is given, only those symbols are preemptible 2017-08-22 21:54:58 +00:00
Driver.cpp Add -no-eh-frame-hdr which negates -eh-frame-hdr. 2017-08-29 16:53:24 +00:00
Driver.h [GSoC] Flag value completion for clang 2017-06-20 16:31:31 +00:00
DriverUtils.cpp [ELF] - Print options aliases in --help 2017-07-26 09:21:10 +00:00
EhFrame.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
EhFrame.h [ELF] - Apply clang-format. NFC. 2017-07-18 11:55:35 +00:00
Error.cpp Use StringRef::contains(). 2017-07-19 21:40:26 +00:00
Error.h [lld/pdb] Add some basic linker module symbols. 2017-07-10 21:01:37 +00:00
Filesystem.cpp ELF: Only unlink regular files 2017-07-04 16:03:34 +00:00
Filesystem.h [ELF] - Apply clang-format. NFC. 2017-07-18 11:55:35 +00:00
GdbIndex.cpp Use more consistent names 2017-08-02 17:35:18 +00:00
GdbIndex.h Rename ObjectFile -> ObjFile. 2017-07-26 22:13:32 +00:00
ICF.cpp Rewrite std::equal as plain for-loops. 2017-08-28 22:28:41 +00:00
ICF.h [ELF] - Apply clang-format. NFC. 2017-07-18 11:55:35 +00:00
InputFiles.cpp Rename {Lazy,}ObjectKind -> {Lazy,}ObjKind. 2017-08-19 00:13:54 +00:00
InputFiles.h Rename {Lazy,}ObjectKind -> {Lazy,}ObjKind. 2017-08-19 00:13:54 +00:00
InputSection.cpp Update comments: parallel_for_each -> parallelForEach 2017-08-23 19:03:20 +00:00
InputSection.h Remove a lock and use a std::unique_ptr instead. 2017-08-17 00:27:55 +00:00
LTO.cpp [ELF] - Make IR symbols be visible when doing relocatable link. 2017-08-22 08:36:54 +00:00
LTO.h Make __start_sec __end_sec handling more precise. 2017-07-26 23:39:10 +00:00
LinkerScript.cpp [ELF] - Simplify (use llvm::erase_if). NFC. 2017-08-28 09:28:15 +00:00
LinkerScript.h Merge OutputSectionCommand and OutputSection. 2017-07-27 19:22:43 +00:00
MapFile.cpp [ELF] - Fixing buildbot. 2017-08-11 11:46:56 +00:00
MapFile.h Merge OutputSectionCommand and OutputSection. 2017-07-27 19:22:43 +00:00
MarkLive.cpp Remove ResolvedReloc. 2017-08-10 16:21:04 +00:00
Memory.h [ELF] - Apply clang-format. NFC. 2017-07-18 11:55:35 +00:00
Options.td Add -no-eh-frame-hdr which negates -eh-frame-hdr. 2017-08-29 16:53:24 +00:00
OutputSections.cpp [ELF] - Move getSymbols() methods to InputFile. 2017-08-04 11:07:42 +00:00
OutputSections.h [ELF] - Fix "--symbol-ordering-file doesn't work with linker scripts" 2017-08-04 10:25:29 +00:00
README.md Update the documents of the new LLD. 2016-03-12 06:06:40 +00:00
Relocations.cpp [ELF] - Mention -fPIC in some error messages. 2017-08-29 15:03:01 +00:00
Relocations.h Merge OutputSectionCommand and OutputSection. 2017-07-27 19:22:43 +00:00
ScriptLexer.cpp [ELF] - Do not report multiple errors for single one in ScriptLexer::setError. 2017-08-23 08:48:39 +00:00
ScriptLexer.h [ELF] - Remove ScriptLexer::Error field and check ErrorCount instead. 2017-08-04 10:34:14 +00:00
ScriptParser.cpp Revert r311468: If --dynamic-list is given, only those symbols are preemptible 2017-08-22 21:54:58 +00:00
ScriptParser.h Move the parser for the linker script to a separate file. 2017-04-05 05:07:39 +00:00
Strings.cpp Move feature-specific functions out of Strings.cpp. 2017-07-13 20:30:35 +00:00
Strings.h [ELF] - Apply clang-format. NFC. 2017-07-18 11:55:35 +00:00
SymbolTable.cpp Revert r311468: If --dynamic-list is given, only those symbols are preemptible 2017-08-22 21:54:58 +00:00
SymbolTable.h Revert r311468: If --dynamic-list is given, only those symbols are preemptible 2017-08-22 21:54:58 +00:00
Symbols.cpp Avoid crash with local abs symbol. 2017-08-11 17:47:12 +00:00
Symbols.h Garbage-collect common symbols. 2017-08-10 15:54:27 +00:00
SyntheticSections.cpp Remove GdbIndexSection::finalizeContents. 2017-08-15 17:01:39 +00:00
SyntheticSections.h [ELF] - Removed unused dummy methods. NFC. 2017-08-31 11:05:38 +00:00
Target.cpp [ELF] Introduce target specific inBranchRange() function 2017-07-17 16:54:29 +00:00
Target.h Fix which file is in an error message. 2017-08-04 18:33:16 +00:00
Threads.h Update comments: parallel_for_each -> parallelForEach 2017-08-23 19:03:20 +00:00
Thunks.cpp [ELF] - Fix member name: alignment -> Alignment. NFC. 2017-07-18 11:59:19 +00:00
Thunks.h [ELF] - Fix member name: alignment -> Alignment. NFC. 2017-07-18 11:59:19 +00:00
Writer.cpp [ELF] Generate symbol assignments for predefined symbols 2017-09-01 02:23:31 +00:00
Writer.h Rename ObjectFile -> ObjFile. 2017-07-26 22:13:32 +00:00

README.md

See docs/NewLLD.rst