- Dec 22, 2016
-
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D27194 llvm-svn: 290339
-
- Dec 21, 2016
-
-
Vitaly Buka authored
llvm-svn: 290231
-
- Dec 19, 2016
-
-
Rafael Espindola authored
llvm-svn: 290115
-
- Dec 09, 2016
-
-
Meador Inge authored
The current implementation of the output section data store commands can only handle integer literals, but it should really handle arbitrary expressions [1]. This commit fixes that. [1] https://sourceware.org/binutils/docs-2.27/ld/Output-Section-Data.html#Output-Section-Data Differential Revision: https://reviews.llvm.org/D27561 llvm-svn: 289152
-
- Dec 08, 2016
-
-
Rafael Espindola authored
The feature is documented as ----------------------------- The format of the dynamic list is the same as the version node without scope and node name. See *note VERSION:: for more information. -------------------------------- And indeed qt uses a dynamic list with an 'extern "C++"' in it. With this patch we support that The change to gc-sections-shared makes us match bfd. Just because we kept bar doesn't mean it has to be in the dynamic symbol table. The changes to invalid-dynamic-list.test and reproduce.s are because of the new parser. The changes to version-script.s are the only case where we change behavior with regards to bfd, but I would like to see a mix of --version-script and --dynamic-list used in the wild before complicating the code. llvm-svn: 289082
-
- Dec 05, 2016
-
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D27335 llvm-svn: 288678
-
- Nov 28, 2016
-
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D27108 llvm-svn: 288019
-
- Nov 21, 2016
-
-
Rui Ueyama authored
This patch rearranges code a bit to make it easy to explain. llvm-svn: 287515
-
- Nov 19, 2016
-
-
Rui Ueyama authored
Filler expressions in linker script "=fillexp" are always handled as 32-bit integers. Thus the new type is more natural. llvm-svn: 287445
-
- Nov 18, 2016
-
-
Rui Ueyama authored
llvm-svn: 287324
-
- Nov 17, 2016
-
-
Rui Ueyama authored
Linker script doesn't create a section if it has no content. So the following script doesn't create .norelocs section if it doesn't have any .rel* sections. .norelocs : { *(.rel*) } Later, if you assert that the size of .norelocs is 0, LLD printed out an error message, because it didn't allow calling SIZEOF() on nonexistent sections. This patch allows SIZEOF() on nonexistent sections, so that you can do something like this. ASSERT(SIZEOF(.norelocs), "shouldn't contain .rel sections!") Note that this behavior is compatible with GNU. Differential Revision: https://reviews.llvm.org/D26810 llvm-svn: 287257
-
- Nov 16, 2016
-
-
Eugene Leviant authored
This allows making symbols containing ADDR(section) synthetic, and defining synthetic symbols outside SECTIONS block. Differential revision: https://reviews.llvm.org/D25441 llvm-svn: 287090
-
- Nov 14, 2016
-
-
Rafael Espindola authored
Propagate program headers by walking the commands, not the sections. This allows us to propagate program headers even from sections that don't end up in the output. Fixes pr30997. llvm-svn: 286837
-
Rafael Espindola authored
llvm-svn: 286826
-
Rafael Espindola authored
llvm-svn: 286824
-
- 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
-
-
Rui Ueyama authored
Previously, we do this piece of code to iterate over all input sections. for (elf::ObjectFile<ELFT> *F : Symtab.getObjectFiles()) for (InputSectionBase<ELFT> *S : F->getSections()) It turned out that this mechanisms doesn't work well with synthetic input sections because synthetic input sections don't belong to any input file. This patch defines a vector that contains all input sections including synthetic ones. llvm-svn: 286051
-
Eugene Zelenko authored
Differential revision: https://reviews.llvm.org/D26320 llvm-svn: 286030
-
- Nov 03, 2016
-
-
Rui Ueyama authored
Previously, it didn't support the character class, so we couldn't eliminate the use fo llvm::Regex. Now that it is supported, we can remove compileGlobPattern, which converts a glob pattern to a regex. This patch contains optimization for exact/prefix/suffix matches. Differential Revision: https://reviews.llvm.org/D26284 llvm-svn: 285949
-
Eugene Leviant authored
This can speed up lld up to 5 times when linking applications with large number of sections and using linker script. Differential revision: https://reviews.llvm.org/D26241 llvm-svn: 285895
-
- Oct 31, 2016
-
-
Rafael Espindola authored
With this patch we keep track of the fact that . is a position in the file and therefore not absolute. This allow us to compute relative relocations that involve symbol that are defined in linker scripts with '.'. This fixes https://llvm.org/bugs/show_bug.cgi?id=30406 There is still more work to track absoluteness over the various expressions, but this should unblock linking the EFI bootloader. llvm-svn: 285641
-
Rafael Espindola authored
We parse linker scripts very early, but whether an expression is absolute or not can depend on a symbol defined in a .o. Given that, we have to delay the computation of IsAbsolute. We can do that by storing an AST when parsing or by also making IsAbsolute a function like we do for the expression value. This patch implements the second option. llvm-svn: 285628
-
Rafael Espindola authored
And as a token of the new feature, make ALIGNOF always absolute. This is a step in making it possible to have non absolute symbols out of output sections. llvm-svn: 285608
-
- 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 14, 2016
-
-
Rui Ueyama authored
llvm-svn: 284177
-
- Oct 06, 2016
-
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D24298 llvm-svn: 283429
-
- Oct 05, 2016
-
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D25242 llvm-svn: 283305
-
- Sep 29, 2016
-
-
Rafael Espindola authored
If there is not sufficient address space, just give up and don't put the header in the PT_LOAD. This matches bfd behaviour and I found at least one script that depends on having a section at address 0. llvm-svn: 282750
-
- Sep 26, 2016
-
-
George Rimar authored
The BYTE, SHORT, LONG, and QUAD commands store one, two, four, and eight bytes (respectively). After storing the bytes, the location counter is incremented by the number of bytes stored. Previously our scripts handles these commands incorrectly. For example: SECTIONS { .foo : { *(.foo.1) BYTE(0x11) ... We accepted the script above treating BYTE as input section description. These commands are used in the wild though. Differential revision: https://reviews.llvm.org/D24830 llvm-svn: 282429
-
- Sep 23, 2016
-
-
George Rimar authored
DEFINED(symbol) Return 1 if symbol is in the linker global symbol table and is defined before the statement using DEFINED in the script, otherwise return 0. Can be used to define default values for symbols. Found it in the wild. Differential revision: https://reviews.llvm.org/D24858 llvm-svn: 282245
-
- Sep 22, 2016
-
-
Rafael Espindola authored
Before the symbols were becoming undefined. llvm-svn: 282159
-
- Sep 21, 2016
-
-
George Rimar authored
This is PR30442. Previously we were failed to parce complex expressions like: foo : { *(SORT_BY_NAME(bar) zed) } Main idea of patch that globs and excludes can be wrapped in a SORT. There is a difference in semanics of ld/gold: ld likes: *(SORT(EXCLUDE_FILE (*file1.o) .foo.1)) gold likes: *(EXCLUDE_FILE (*file1.o) SORT(.foo.1)) Patch implements ld grammar, complex expressions like next is not a problem anymore: .abc : { *(SORT(.foo.* EXCLUDE_FILE (*file1.o) .bar.*) .bar.*) } Differential revision: https://reviews.llvm.org/D24758 llvm-svn: 282078
-
Rafael Espindola authored
This reverts commit r282021, bringing back r282015. The problem was that the comparison function was not a strict weak ordering anymore, which this patch fixes. Original message: Only restrict order if both sections are in the script. This matches gold and bfd behavior and is required to handle some scripts. The script has to assume where PT_LOADs start in order to align that spot. If we don't allow section it doesn't know about to move to the middle, we can need more PT_LOADs and those will not be aligned. llvm-svn: 282035
-
- Sep 20, 2016
-
-
Rui Ueyama authored
llvm-svn: 281951
-
- Sep 17, 2016
-
-
George Rimar authored
llvm-svn: 281817
-
Rui Ueyama authored
llvm-svn: 281805
-
Rui Ueyama authored
It is important to give members names for readability. llvm-svn: 281803
-
- Sep 16, 2016
-
-
Rui Ueyama authored
Because it corresponds to SORT_NONE. None was renamed Default. llvm-svn: 281776
-
Rafael Espindola authored
We have to look at all the relevant input sections at once. llvm-svn: 281772
-
George Rimar authored
This fixes Bug 30385 - SORT_NONE not implemented, `SORT_NONE' disables section sorting by ignoring the command line section sorting option. That is why this patch also implements --sort-section option. Description of sorting rules available at https://sourceware.org/binutils/docs/ld/Input-Section-Wildcards.html Differential revision: https://reviews.llvm.org/D24604 llvm-svn: 281771
-