- Apr 06, 2017
-
-
Rui Ueyama authored
scanRelocs() does a lot of things. It fills InputSection's Relocations vector, making a decision whether a TLS relocation should be relaxed or not, and making a decision whether a GOT/PLT slot needs to be created or not. They don't actually have to be done in a single loop. I want to separate them so that some of them can be run concurently. As a first step, this patch moves PLT/GOT slot assignment to beginning of the loop, so that they just fall through to the next statements. This should make it clear that that code doesn't affect other parts of the loop. llvm-svn: 299615
-
Rui Ueyama authored
Relocations are abstracted as platform-independent R_TLS_* relocations, so we don't need to check platform-specific ones to see if a relocation is TLS GD. llvm-svn: 299614
-
Rui Ueyama authored
llvm-svn: 299600
-
- Apr 05, 2017
-
-
Rui Ueyama authored
llvm-svn: 299594
-
Rui Ueyama authored
llvm-svn: 299593
-
Rui Ueyama authored
If an output file is too large for 32-bit, we should report an error. llvm-svn: 299592
-
Rui Ueyama authored
llvm-svn: 299590
-
Rui Ueyama authored
This class doesn't have virtual member functions, and no instances of this class is deleted through base pointers. llvm-svn: 299581
-
Rui Ueyama authored
llvm-svn: 299580
-
Rui Ueyama authored
llvm-svn: 299579
-
Rui Ueyama authored
Symbols referenced by linker scripts are not necessarily be undefined, so the previous name didn't convey the meaining of the variable. llvm-svn: 299573
-
Rui Ueyama authored
llvm-svn: 299559
-
Rui Ueyama authored
Because they are addresses in .got.plt and not in .got. llvm-svn: 299556
-
Rui Ueyama authored
This patch does what r299506 was trying to do in a different way. llvm-svn: 299554
-
Rui Ueyama authored
Previously, the code we set to our .plt entries expected that .got and .got.plt are consecutive in the virtual address space. Since %ebx points to the last entry of .got for position-independent code, it assumed that .got is accessible with small negative displacements and .got.plt are accessible with small positive displacements. That assumption was simply wrong. We don't impose any restrictions on relative layout of .got and .got.plt. As a result, the control is transferred to a bogus address from .plt at runtime, which resulted in segfaults. This patch removes that wrong assumption. We still assume that .got.plt has a fixed relative address to .got, but we no longer assume that they are consecutive in memory. With this change, a "hello world" program compiled with -fPIC works. Fixes https://bugs.llvm.org/show_bug.cgi?id=31332. Differential Revision: https://reviews.llvm.org/D31682 llvm-svn: 299553
-
Peter Smith authored
For range extension thunks we will need to repeatedly call createThunks() until no more thunks are created. We will need to retain the state of Thunks that we have created so far to avoid recreating them on later passes. This change does not change the functionality of createThunks(). Differential Revision: https://reviews.llvm.org/D31654 llvm-svn: 299530
-
George Rimar authored
GNU linkers define __bss_start symbol. Patch teaches LLD to do that. This is PR32051. Below is part of standart ld.bfd script: .data1 : { *(.data1) } _edata = .; PROVIDE (edata = .); . = .; __bss_start = .; .bss : { Currently LLD can emit up to 3 .bss* sections as one of testcase shows. Implementation inserts this symbol before first .bss* output section. Differential revision: https://reviews.llvm.org/D30419 llvm-svn: 299528
-
George Rimar authored
It was not NFC unfortunaly, one of changes decrements begin() iterator and that is not allowed by MSVS. llvm-svn: 299525
-
Rui Ueyama authored
llvm-svn: 299521
-
Rui Ueyama authored
llvm-svn: 299520
-
Rui Ueyama authored
Looks like we can use consume() in many more places. llvm-svn: 299519
-
Rui Ueyama authored
llvm-svn: 299518
-
Rui Ueyama authored
This class is used only within this file, so it can be file-local. llvm-svn: 299516
-
Rui Ueyama authored
LinkerScript.cpp contains both the linker script processor and the linker script parser. I put both into a single file, but the file grown too large, so it's time to put them into two different files. llvm-svn: 299515
-
Rui Ueyama authored
llvm-svn: 299514
-
Rui Ueyama authored
ScriptParser is not a ScriptLexer, so this should be a private inheritance. llvm-svn: 299513
-
Rui Ueyama authored
llvm-svn: 299512
-
Rui Ueyama authored
A for-loop is more boring than a find_if, but I think this is easier to read. llvm-svn: 299511
-
Rui Ueyama authored
llvm-svn: 299509
-
Rui Ueyama authored
llvm-svn: 299508
-
Rui Ueyama authored
llvm-svn: 299506
-
Rui Ueyama authored
It simplifies variable types. llvm-svn: 299505
-
Rui Ueyama authored
llvm-svn: 299504
-
Rui Ueyama authored
llvm-svn: 299503
-
Rui Ueyama authored
llvm-svn: 299502
-
Rui Ueyama authored
`!V.size()` where V is a vector is equivalent to `V.empty()`. llvm-svn: 299501
-
Rui Ueyama authored
llvm-svn: 299500
-
Rui Ueyama authored
llvm-svn: 299499
-
Rui Ueyama authored
This should improve readability. llvm-svn: 299498
-
Rui Ueyama authored
llvm-svn: 299495
-