- Jan 20, 2017
-
-
George Rimar authored
Found that during attempts of linking linux kernel, previously we partially duplicated code from getOutputSection(), and it missed commons symbol case. Differential revision: https://reviews.llvm.org/D28903 llvm-svn: 292594
-
Peter Collingbourne authored
If two sections contained relocations to absolute symbols with the same value we would crash when trying to access their sections. Add a check that both symbols point to sections before accessing their sections, and treat absolute symbols as equal if their values are equal. Differential Revision: https://reviews.llvm.org/D28935 llvm-svn: 292578
-
- Jan 19, 2017
-
-
Rafael Espindola authored
I don't know of anything using it, but we should handle it like _end. llvm-svn: 292513
-
Rafael Espindola authored
The freebsd sbrk implementation uses _end to find the initial value of brk, so it has to be defined in the main binary. This should fix the emacs build. llvm-svn: 292512
-
- Jan 18, 2017
-
-
Peter Smith authored
A necessary first step towards range extension thunks is to delay the creation of thunks until the layout of InputSections within OutputSections has been done. The change scans the relocations directly from InputSections rather than looking in the ELF File the InputSection came from. This will allow a future change to redirect the relocations to symbols defined by Thunks rather than indirect when resolving relocations. A side-effect of moving ThunkCreation is that the OutSecOff of InputSections may change in an OutputSection that contains Thunks. In well behaved programs thunks are not in OutputSections with dynamic relocations. Differential Revision: https://reviews.llvm.org/D28811 llvm-svn: 292359
-
Rui Ueyama authored
This patch adds a test for an invalid output path for -Map option, though that test is not for verifying that we are using error() instead of fatal() in writeMapFile. llvm-svn: 292336
-
Peter Collingbourne authored
Although this relocation type is not part of the x86-64 psABI, I intend to use it internally as part of the ThinLTO implementation. Differential Revision: https://reviews.llvm.org/D28841 llvm-svn: 292330
-
- Jan 17, 2017
-
-
Bob Haarman authored
Summary: This copies over some functionality we have in ELF/Error.{cpp,h} and makes it available in COFF/Error.{cpp,h} Reviewers: pcc, rafael, ruiu Subscribers: Differential Revision: https://reviews.llvm.org/D28692 llvm-svn: 292240
-
Rafael Espindola authored
llvm-svn: 292228
-
George Rimar authored
I found this when tried to link linux kernel with LLD: https://github.com/torvalds/linux/blob/master/arch/x86/entry/vdso/vdso-layout.lds.S#L86 Output section command can have optional comma at the end: .text : { *(.text*) } :text =0x90909090, It was documented about 3 years ago for binutils: https://sourceware.org/ml/binutils/2014-04/msg00045.html Differential revision: https://reviews.llvm.org/D28803 llvm-svn: 292225
-
George Rimar authored
Removed mentioning of checks. Sorry for noise. llvm-svn: 292221
-
George Rimar authored
Inputs shown in that testcase previously created a huge temporarily file under 32 bits. It was fixed by D28107. During review was suggested to add a testcase even without CHECKs for documentation purposes. Patch do that. llvm-svn: 292220
-
George Rimar authored
Patch changes behavior to not try open the output file if we already know about error. That is not just cleaner, but also fixes nasty behavior of linker that could create huge temporarily files under certain conditions. Differential revision: https://reviews.llvm.org/D28107 llvm-svn: 292219
-
Davide Italiano authored
llvm-svn: 292182
-
- Jan 16, 2017
-
-
Simon Atanasyan authored
On MIPS .got section cannot be included into the PT_GNU_RELRO segment. Sometimes it might work, but in general it is unsupported. One of the problem is that all sections marked by SHF_MIPS_GPREL should be grouped together because data in these sections is addressable with a gp relative address, but such sections might be writable. This patch exclude mips .got from PT_GNU_RELRO segment and group SHF_MIPS_GPREL sections. llvm-svn: 292161
-
Simon Atanasyan authored
llvm-svn: 292160
-
Rafael Espindola authored
LLD exports symbols that are also present in used shared libraries to make sure they are preempted at runtime. That is a reasonable default, but we must allow for it to be overwritten with linker script. If we don't, libraries that expect to be able to hide a c++ delete operator will fail. This should fix the firebird build. llvm-svn: 292146
-
George Rimar authored
The same as https://reviews.llvm.org/rL292102, fixes next testcases under msvs2015/win32: 25> Failing Tests (3): 25> lld :: COFF/lldmap.test 25> lld :: COFF/weak-external.test 25> lld :: COFF/weak-external3.test llvm-svn: 292104
-
George Rimar authored
I had a error in map-file.s testcase under MSVS2015/win32: map-file.s:30:16: error: expected string not found in input // CHECK-NEXT: 0000000000200158 0000000000000030 8 .eh_frame <stdin>:2:1: note: scanning from here 0000000000200158 10 30 .eh_frame Format string '%0*x' requires an argument of type 'unsigned int', but argument has type 'uint64_t'. Proper format is '%0*llx' then. This fixes testcase failture for me. llvm-svn: 292102
-
Rui Ueyama authored
llvm-svn: 292090
-
- Jan 15, 2017
-
-
Rui Ueyama authored
llvm-svn: 292049
-
Rui Ueyama authored
llvm-svn: 292048
-
Rui Ueyama authored
llvm-svn: 292046
-
Rui Ueyama authored
llvm-svn: 292045
-
Rui Ueyama authored
llvm-svn: 292044
-
Rui Ueyama authored
llvm-svn: 292042
-
Rui Ueyama authored
Previous code had a bug that if the program exits with an assert() or fail() before the control reaches end of writeMapFile(), it leaves a temporary file, because FileRemover's dtor isn't called in that case. I could fix that by removeFileOnSignal() and other functions, but I think we can simply write to the result file directly. I think that is straightforward and easy to understand. Additionally, that allows something like `-Map /dev/null` or a bash hack such as `-Map >(grep symbol-im-looking-for)`. Previously, that kind of things didn't work. Differential Revision: https://reviews.llvm.org/D28714 llvm-svn: 292041
-
- Jan 14, 2017
-
-
Peter Collingbourne authored
Differential Revision: https://reviews.llvm.org/D28717 llvm-svn: 291990
-
Rafael Espindola authored
llvm-svn: 291989
-
Rui Ueyama authored
llvm-svn: 291984
-
- Jan 13, 2017
-
-
Bob Haarman authored
Summary: When we encouter a relocation type we don't know how to handle, this change causes us to print out the hexadecimal value of the relocation type. This makes troubleshooting a little easier. Reviewers: ruiu, zturner Differential Revision: https://reviews.llvm.org/D28576 llvm-svn: 291962
-
Rafael Espindola authored
The format is not exactly the same as the one in bfd since bfd always follows a linker script and prints it along. llvm-svn: 291958
-
Rafael Espindola authored
The freebsd dynamic linker doesn't check if the value is null (and it is reasonable for it to do that). That means that producing a .so with a null DT_INIT/DT_FINI causes the base address to be called. This should fix the libreoffice build. llvm-svn: 291944
-
George Rimar authored
These were 3 last synthetics that were added in addPredefinedSections() instead of createSyntheticSections(). Now it is possible to move addition to correct common place. Also patch fixes testcase which discards .shstrtab, by restricting doing that. Differential revision: https://reviews.llvm.org/D28561 llvm-svn: 291908
-
- Jan 12, 2017
-
-
Rui Ueyama authored
Now we have the consistent interface for all log/warn/error/fatal functions. llvm-svn: 291847
-
Rui Ueyama authored
llvm-svn: 291840
-
Hans Wennborg authored
llvm-svn: 291839
-
Rui Ueyama authored
llvm-svn: 291835
-
Rui Ueyama authored
llvm-svn: 291834
-
Hans Wennborg authored
llvm-svn: 291833
-