- Dec 13, 2016
-
-
Peter Smith authored
When compiling -fpie and linking with the --pie option the R_ARM_GOTBREL relocation to D is resolved by writing the value of D into the .got slot and emitting an R_ARM_RELATIVE relocation for it. This changes adds the R_ARM_RELATIVE relocation to the switch in relocateOne() so we can process the GotSection relocation to write the value of the variable as well as emitting the dynamic relocation. Differential revision: https://reviews.llvm.org/D27678 llvm-svn: 289527
-
- Dec 12, 2016
-
-
Simon Atanasyan authored
llvm-svn: 289471
-
Simon Atanasyan authored
The VA of _gp was being truncated to 32 bits when calling getVa(), but for 64bit MIPS we need to write a 64 bit value to .MIPS.options. Patch by Alexander Richardson. Differential revision: https://reviews.llvm.org/D27672 llvm-svn: 289432
-
Saleem Abdulrasool authored
Enable building lld as a standalone project. This is motivated by the desire to package lld for inclusion in a linux distribution. This allows building lld against an existing paired llvm installation. Now that lld is usable on x86_64, it makes sense to revive this configuration to allow distributions to package it. llvm-svn: 289421
-
- Dec 10, 2016
-
-
Rui Ueyama authored
llvm-svn: 289293
-
- Dec 09, 2016
-
-
Rafael Espindola authored
We first decide that the symbol is global, than that it should have version foo. Since it was already not the default version, we were producing a bogus warning. llvm-svn: 289284
-
Rafael Espindola authored
llvm-svn: 289277
-
Rafael Espindola authored
llvm-svn: 289224
-
Rafael Espindola authored
llvm-svn: 289217
-
Rafael Espindola authored
llvm-svn: 289212
-
Peter Smith authored
The i386 glibc ld.so expects the .got.slot entry that is relocated by a R_386_IRELATIVE relocation to point directly at the ifunc resolver and not the address of the PLT entry + 6 (thus entering the lazy resolver). This is also the case for ARM and I suspect it is because these use REL relocations and can't use the addend field to store the address of the ifunc resolver. If the lazy resolver is used we get an error message stating that only R_386_JUMP_SLOT is supported. As ARM and i386 share the same code, I've removed the ARM specific test and added a writeIgotPlt() function that by default calls writeGotPlt(). ARM and i386 override this to write the address of the ifunc resolver. Differential Revision: https://reviews.llvm.org/D27581 llvm-svn: 289198
-
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
-
-
Rui Ueyama authored
llvm-svn: 289146
-
Rui Ueyama authored
llvm-svn: 289084
-
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
-
Rui Ueyama authored
llvm-svn: 289081
-
Rui Ueyama authored
llvm-svn: 289079
-
Rui Ueyama authored
llvm-svn: 289078
-
Rui Ueyama authored
This is the last peculiar semantics left in the linker. If you want to always set an entry point to 0, you can pass `-e 0` to the linker. Differential Revision: https://reviews.llvm.org/D27532 llvm-svn: 289077
-
Rafael Espindola authored
It is used by Qt. llvm-svn: 289074
-
Rui Ueyama authored
llvm-svn: 289072
-
Rui Ueyama authored
Compilers can inline and optimize this code in the same way as template. llvm-svn: 289071
-
Rafael Espindola authored
llvm-svn: 289067
-
Rafael Espindola authored
llvm-svn: 289066
-
Rafael Espindola authored
llvm-svn: 289065
-
Rafael Espindola authored
llvm-svn: 289064
-
Rafael Espindola authored
llvm-svn: 289062
-
Simon Atanasyan authored
Follow-up to r289025. llvm-svn: 289061
-
George Rimar authored
Looks it was theoretically incorrect if the section is at the very end of the file as reading 32 bits would pass the end of file llvm-svn: 289046
-
Peter Smith authored
This change introduces new synthetic sections IpltSection, IgotPltSection that represent the ifunc entries that would previously have been put in the PltSection and the GotPltSection. The separation makes sure that the R_*_IRELATIVE relocations are placed after the non R_*_IRELATIVE relocations, which permits ifunc resolvers to know that the .got.plt slots will be initialized prior to the resolver being called. A secondary benefit is that for ARM we can move the IgotPltSection and its dynamic relocations to the .got and .rel.dyn as the ARM glibc expects all the R_*_IRELATIVE relocations to be in the .rel.dyn Differential revision: https://reviews.llvm.org/D27406 llvm-svn: 289045
-
Simon Atanasyan authored
These MIPS specific symbols should be global because in general they can have an arbitrary value. By default this value is a fixed offset from .got section. This patch adds more checks to the mips-gp-local.s test case but marks it as XFAIL because LLD does not allow redefinition of absolute symbols value by a linker script. This should be fixed by D27276. Differential revision: https://reviews.llvm.org/D27524 llvm-svn: 289025
-
Rafael Espindola authored
Thanks to George Rimar for pointing it out. llvm-svn: 289020
-
Rui Ueyama authored
Obj is an instance of std::unique_ptr, so *Obj.get() is the same as *Obj. llvm-svn: 288996
-
Rui Ueyama authored
llvm-svn: 288993
-
- Dec 07, 2016
-
-
Rafael Espindola authored
Thanks to Rui for the suggestion. llvm-svn: 288982
-
Rafael Espindola authored
Now Target->MaxPageSize is only used as the default value of Config->MaxPageSize. llvm-svn: 288974
-
Rui Ueyama authored
Line number can never contain '/' or '\', so the previous code was pointless at that point. llvm-svn: 288973
-
Rui Ueyama authored
llvm-svn: 288972
-
Rafael Espindola authored
llvm-svn: 288971
-
Rafael Espindola authored
Found by inspection. llvm-svn: 288970
-