- Dec 21, 2016
-
-
Rui Ueyama authored
llvm-svn: 290215
-
- Dec 19, 2016
-
-
Rafael Espindola authored
This handles all the corner cases if setting a section address: - If the address is too low, we cannot allocate the program headers. - If the load address is lowered, we have to do that before finalize This also shares some code with the linker script since it was already hitting similar cases. This is used by the freebsd boot loader. It is not clear if we need to support this with a non binary output, but it is not as bad as I was expecting. llvm-svn: 290136
-
Rafael Espindola authored
llvm-svn: 290115
-
- Nov 29, 2016
-
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D27097 llvm-svn: 288114
-
- Nov 10, 2016
-
-
Rafael Espindola authored
The disadvantage is that we use uint64_t instad of uint32_t for some value in 32 bit files. The advantage is a substantially simpler code, faster builds and less code duplication. llvm-svn: 286414
-
- Nov 05, 2016
-
-
Simon Atanasyan authored
In short the patch introduces support for linking object file conform MIPS N32 ABI [1]. This ABI is similar to N64 ABI but uses 32-bit pointer size. The most non-trivial requirement of this ABI is one more relocation packing format. N64 ABI puts multiple relocation type into the single relocation record. The N32 ABI uses series of successive relocations with the same offset for this purpose. In this patch, new function `mergeMipsN32RelTypes` handle this case and "convert" N32 relocation to the N64 relocation so the rest of the code keep unchanged. For now, linker does not support series of relocations applied to sections without SHF_ALLOC bit. Probably later I will add the support or insert some sort of assert into the `relocateNonAlloc` routine to catch this case. [1] ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/MIPS-N32-ABI-Handbook.pdf Differential revision: https://reviews.llvm.org/D26298 llvm-svn: 286052
-
- Nov 04, 2016
-
-
Rafael Espindola authored
llvm-svn: 285996
-
- Oct 28, 2016
-
-
Rui Ueyama authored
Previously, we have a lot of BumpPtrAllocators, but all these allocators virtually have the same lifetime because they are not freed until the linker finishes its job. This patch aggregates them into a single allocator. Differential revision: https://reviews.llvm.org/D26042 llvm-svn: 285452
-
- Oct 20, 2016
-
-
George Rimar authored
llvm-svn: 284705
-
- Oct 13, 2016
-
-
Rui Ueyama authored
Previously, we supported only SHF_COMPRESSED sections because it's new and it's the ELF standard. But there are object files compressed in the GNU style out there, so we had to support it. Sections compressed in the GNU style start with ".zdebug_" and contain different headers than the ELF standard's one. In this patch, getRawCompressedData is responsible to handle it. A tricky thing about GNU-style compressed sections is that we have to rename them when creating output sections. ".zdebug_" prefix implies the section is compressed. We need to rename ".zdebug_" ".debug" because our output sections are not compressed. We do that in this patch. llvm-svn: 284068
-
- Oct 05, 2016
-
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D25232 llvm-svn: 283307
-
- Sep 09, 2016
-
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D24340 llvm-svn: 281024
-
- Aug 12, 2016
-
-
Simon Atanasyan authored
This section supersedes .reginfo and .MIPS.options sections. But for now we have to support all three sections for ABI transition period. llvm-svn: 278482
-
- Aug 09, 2016
-
-
Rui Ueyama authored
This patch is to not instantiate DynSymTab and DynStrTab if the output is not a dynamic output. llvm-svn: 278095
-
Rui Ueyama authored
The SymbolTable is always accessible as Symtab<ELFT>::X, so no need to pass it as an argument. llvm-svn: 278091
-
- Aug 08, 2016
-
-
Rui Ueyama authored
Previously, we incrementally updated the reuslting flag as we check file flags, so it was not very clear who is updating what flags. This patch makes them pure functions -- that has no side effect and don't update arguments to improve readability. Now each function construct a patial result, and all resutls are then bitwise-OR'ed to construct the final result. This patch also creates a new file, Mips.cpp, to move all these MIPS functions to a separate file. Differential Revision: https://reviews.llvm.org/D23249 llvm-svn: 278042
-
- Jul 27, 2016
-
-
Rafael Espindola authored
llvm-svn: 276868
-
- Jul 26, 2016
-
-
Rui Ueyama authored
llvm-svn: 276774
-
Rui Ueyama authored
Because the file from which an input section is created can be obtained using getFile(). llvm-svn: 276702
-
- Jul 21, 2016
-
-
Rui Ueyama authored
This change simplifies interaction between Writer and the linker script because we can make needsInterpSection() a file-scope function. llvm-svn: 276261
-
- Jul 20, 2016
-
-
Rui Ueyama authored
llvm-svn: 276165
-
- Jul 19, 2016
-
-
Rafael Espindola authored
llvm-svn: 275972
-
Eugene Leviant authored
llvm-svn: 275965
-
- Jul 12, 2016
-
-
George Rimar authored
Creating sections on linkerscript side requires some methods that can be reused if are exported from writer. Patch implements that change. Differential revision: http://reviews.llvm.org/D20104 llvm-svn: 275162
-
- May 02, 2016
-
-
Rui Ueyama authored
llvm-svn: 268286
-
- Feb 28, 2016
-
-
Rafael Espindola authored
llvm-svn: 262159
-
- Oct 22, 2015
-
-
Rui Ueyama authored
Section garbage collection is a feature to remove unused sections from outputs. Unused sections are sections that cannot be reachable from known GC-root symbols or sections. Naturally the feature is implemented as a mark-sweep garbage collector. In this patch, I added Live bit to InputSectionBase. If and only if Live bit is on, the section will be written to the output. Starting from GC-root symbols or sections, a new function, markLive(), visits all reachable sections and sets their Live bits. Writer then ignores sections whose Live bit is off, so that such sections are excluded from the output. This change has small negative impact on performance if you use the feature because making sections means more work. The time to link Clang changes from 0.356s to 0.386s, or +8%. It reduces Clang size from 57,764,984 bytes to 55,296,600 bytes. That is 4.3% reduction. http://reviews.llvm.org/D13950 llvm-svn: 251043
-
- Oct 09, 2015
-
-
Rui Ueyama authored
SymbolTable was not a template class. Instead we had switch-case-based type dispatch to call desired functions. We had to do that because SymbolTable was created before we know what ELF type objects had been passed. Every time I tried to add a new function to the symbol table, I had to define a dispatcher which consist of a single switch statement. It also brought an restriction what the driver can do. For example, we cannot add undefined symbols before any files are added to the symbol table. That's because no symbols can be added until the symbol table knows the ELF type, but when it knows about that, it's too late. In this patch, the driver makes a decision on what ELF type objects are being handled. Then the driver creates a SymbolTable object for an appropriate ELF type. http://reviews.llvm.org/D13544 llvm-svn: 249902
-
- Oct 07, 2015
-
-
Rui Ueyama authored
llvm-svn: 249586
-
- Aug 14, 2015
-
-
Rafael Espindola authored
llvm-svn: 245050
-
- Aug 12, 2015
-
-
Rafael Espindola authored
llvm-svn: 244697
-
- Aug 06, 2015
-
-
Rui Ueyama authored
Various parameters are passed implicitly using Config global variable already. Output file path is no different from others, so there was no special reason to handle that differnetly. This patch changes the signature of writeResult(SymbolTable *, StringRef) to writeResult(SymbolTable *). llvm-svn: 244180
-
Rui Ueyama authored
We are using Writer more like a function instead of a class. This patch makes it a function to simplify the interface. All details of Writer class is now hidden from other parts of the linker. llvm-svn: 244169
-
- Aug 05, 2015
-
-
Rafael Espindola authored
The others we have in sight are * common symbols. * entries in SHF_MERGE sections. They will have a substantially different treatment. It is not clear if it is worth it putting them all in a single list just to dispatch based on the kind on the other side. I hope to implement common symbols soon, and then we will be in a position to have a concrete discussion. For now this is simpler for the the implemented features. llvm-svn: 244042
-
- Aug 04, 2015
-
-
Rafael Espindola authored
It was already using just code that is common to all object files. llvm-svn: 243985
-
- Jul 30, 2015
-
-
Michael J. Spencer authored
llvm-svn: 243579
-
- Jul 29, 2015
-
-
Michael J. Spencer authored
llvm-svn: 243506
-
- Jul 26, 2015
-
-
Rui Ueyama authored
llvm-svn: 243231
-
- Jul 24, 2015
-
-
Michael J. Spencer authored
Differential Revision: http://reviews.llvm.org/D11188 llvm-svn: 243161
-
- Jul 14, 2015
-
-
Michael J. Spencer authored
llvm-svn: 242118
-