hanchenye-llvm-project/lld/ELF
Rui Ueyama 77f2a87575 Simplify MergeOutputSection.
MergeOutputSection class was a bit hard to use because it provdes
a series of finalize functions that have to be called in a right way
at a right time. It also intereacted with MergeInputSection, and the
logic was somewhat entangled between the two classes.

This patch simplifies it by providing only one finalize function.
Now, all you have to do is to call MergeOutputSection::finalize
when you have added all sections to the output section. Then, it
internally merges strings and initliazes StringPiece objects.
I think this is much easier to understand.

This patch also adds comments.

llvm-svn: 287314
2016-11-18 05:05:43 +00:00
..
CMakeLists.txt [CMake] NFC. Updating CMake dependency specifications 2016-11-17 04:36:35 +00:00
Config.h Use uint16_t instead of size_t for symbol version ID. 2016-11-17 03:39:21 +00:00
Driver.cpp Enable -threads by default. 2016-11-17 17:06:51 +00:00
Driver.h Bitcode: Clean up error handling for certain bitcode query functions. 2016-11-11 19:50:24 +00:00
DriverUtils.cpp [ELF] - format. NFC. 2016-11-14 10:14:18 +00:00
EhFrame.cpp
EhFrame.h
Error.cpp Call flush() after llvm_shutdown(). 2016-11-11 02:16:15 +00:00
Error.h Export fewer functions from Error.h. 2016-11-16 18:54:37 +00:00
GdbIndex.cpp [ELF] - Partial support of --gdb-index command line option (Part 1). 2016-10-20 09:19:48 +00:00
GdbIndex.h [ELF] - Partial support of --gdb-index command line option (Part 1). 2016-10-20 09:19:48 +00:00
ICF.cpp Parse relocations only once. 2016-11-10 14:53:24 +00:00
ICF.h
InputFiles.cpp [ELF] - Better diagnostic for relative relocation to an absolute value error. 2016-11-15 08:07:14 +00:00
InputFiles.h Parse relocations only once. 2016-11-10 14:53:24 +00:00
InputSection.cpp Simplify MergeOutputSection. 2016-11-18 05:05:43 +00:00
InputSection.h Simplify MergeOutputSection. 2016-11-18 05:05:43 +00:00
LTO.cpp Prevent at compile time converting from Error::success() to Expected<T> 2016-11-11 04:29:25 +00:00
LTO.h Consolidate BumpPtrAllocators. 2016-10-28 20:57:25 +00:00
LinkerScript.cpp Allow SIZEOF() command on nonexistent section. 2016-11-17 20:27:10 +00:00
LinkerScript.h Allow SIZEOF() command on nonexistent section. 2016-11-17 20:27:10 +00:00
MarkLive.cpp Parse relocations only once. 2016-11-10 14:53:24 +00:00
Memory.cpp Replace GAlloc with a template function. 2016-11-01 21:06:40 +00:00
Memory.h [ELF] - Fix mistype. NFC. 2016-11-08 15:26:21 +00:00
Mips.cpp [ELF][MIPS] N32 ABI support 2016-11-05 22:58:01 +00:00
Options.td Add -no-threads option that negates the effect of -threads. 2016-11-16 01:39:50 +00:00
OutputSections.cpp Simplify MergeOutputSection. 2016-11-18 05:05:43 +00:00
OutputSections.h Simplify MergeOutputSection. 2016-11-18 05:05:43 +00:00
README.md
Relocations.cpp [ELF][MIPS] Add MipsGotSection to handle MIPS GOT 2016-11-16 21:01:02 +00:00
Relocations.h [ELF][MIPS] Add MipsGotSection to handle MIPS GOT 2016-11-16 21:01:02 +00:00
ScriptParser.cpp Simplify. NFC. 2016-10-21 04:52:13 +00:00
ScriptParser.h Rename skip(StringRef) -> consume(StringRef). 2016-10-17 16:01:53 +00:00
Strings.cpp Add [<chars>] to the glob matcher to eliminate use of llvm::Regex. 2016-11-03 17:57:38 +00:00
Strings.h Add [<chars>] to the glob matcher to eliminate use of llvm::Regex. 2016-11-03 17:57:38 +00:00
SymbolListFile.cpp Rename skip(StringRef) -> consume(StringRef). 2016-10-17 16:01:53 +00:00
SymbolListFile.h
SymbolTable.cpp Add single quotes to error messages. 2016-11-17 19:57:47 +00:00
SymbolTable.h Pass StringRefs instead of StringMatcher because it's simpler. 2016-11-17 16:48:53 +00:00
Symbols.cpp [ELF] Add Section() to expression object 2016-11-16 09:49:39 +00:00
Symbols.h [ELF] Add Section() to expression object 2016-11-16 09:49:39 +00:00
SyntheticSections.cpp [ELF][MIPS] Remove 'mips' word from MipsGotSection fields and methods names. NFC 2016-11-17 21:49:14 +00:00
SyntheticSections.h [ELF][MIPS] Remove 'mips' word from MipsGotSection fields and methods names. NFC 2016-11-17 21:49:14 +00:00
Target.cpp [ELF][MIPS] Add MipsGotSection to handle MIPS GOT 2016-11-16 21:01:02 +00:00
Target.h [ELF] Attempt to fix PPC buildbot 2016-11-11 13:24:49 +00:00
Thunks.cpp Split Header into individual fields. 2016-11-09 01:42:41 +00:00
Thunks.h
Writer.cpp Simplify MergeOutputSection. 2016-11-18 05:05:43 +00:00
Writer.h Make OutputSectionBase a class instead of class template. 2016-11-09 23:23:45 +00:00

README.md

See docs/NewLLD.rst