- Jul 18, 2017
-
-
George Rimar authored
llvm-svn: 308297
-
Rui Ueyama authored
This reverts commit r307364 because that change is likely to have caused https://bugs.llvm.org/show_bug.cgi?id=33820. llvm-svn: 308239
-
- Jul 17, 2017
-
-
Shoaib Meenai authored
The comment at the top of compareByFilePosition indicates that it relies on stable_sort to preserve the order of synthetic sections. We were using sort instead of stable_sort, however, leading to incorrect synthetic section ordering. Differential Revision: https://reviews.llvm.org/D35473 llvm-svn: 308207
-
Peter Smith authored
In preparation for range extension thunks introduce a function that will check whether a branch identified by a relocation type at a source address can reach a destination. For targets where range extension thunks are not supported the function will return true as it is not expected that branches are out of range. An implementation has been provided for ARM. Differential Revision: https://reviews.llvm.org/D34690 llvm-svn: 308188
-
George Rimar authored
Funny but we list it as ignored for about 1.5 years atm, though LLD started to support version script really long time ago. llvm-svn: 308170
-
George Rimar authored
This is PR33766. -F name --filter=name When creating an ELF shared object, set the internal DT_FILTER field to the specified name. This tells the dynamic linker that the symbol table of the shared object which is being created should be used as a filter on the symbol table of the shared object name. If you later link a program against this filter object, then, when you run the program, the dynamic linker will see the DT_FILTER field. The dynamic linker will resolve symbols according to the symbol table of the filter object as usual, but it will actually link to the definitions found in the shared object name. Thus the filter object can be used to select a subset of the symbols provided by the object name. (https://linux.die.net/man/1/ld). Shared Objects as Filters: https://docs.oracle.com/cd/E19683-01/817-3677/chapter4-31738/index.html Differential revision: https://reviews.llvm.org/D35352 llvm-svn: 308167
-
- Jul 15, 2017
-
-
Rafael Espindola authored
This code runs after clearOutputSections. llvm-svn: 308066
-
- Jul 14, 2017
-
-
Rafael Espindola authored
llvm-svn: 308057
-
Rafael Espindola authored
NFC, just makes the OutputSectionCommand available. llvm-svn: 308056
-
Igor Kudrin authored
In filling the .got sections, InputSection::OutSecOff was added twice when finding the position to apply a relocation: first time in InputSection::writeTo() and then in SectionBase::getOffset(). Differential revision: https://reviews.llvm.org/D34232 llvm-svn: 308003
-
Peter Collingbourne authored
This was previously erroring out if one of the dead symbols was a TLS symbol and we were able to discard all TLS sections. Differential Revision: https://reviews.llvm.org/D35397 llvm-svn: 307984
-
Peter Collingbourne authored
PT_TLS is a type of program header, so we wouldn't expect to see one in an object file. This error should probably be referring to the fact that we didn't see a section with the flag SHF_TLS, which would normally cause us to create a PT_TLS program header. Differential Revision: https://reviews.llvm.org/D35395 llvm-svn: 307983
-
- Jul 13, 2017
-
-
Rui Ueyama authored
Functions declared in Strings.h should provide generic string operations for the linker, but some of them are too specific to some features. This patch moves them to the location where they are used. llvm-svn: 307949
-
Rafael Espindola authored
I have a patch to let DwarfContext defer to lld for getting section contents and relocations. That is a pretty big performance improvement. This is just a refactoring to make that easier to do. This change makes the *creation* of gdb index a dedicated step and makes that templated. That is so that we can uses Elf_Rel in the code. llvm-svn: 307867
-
- Jul 12, 2017
-
-
Rafael Espindola authored
We were producing bogus warnings without it. llvm-svn: 307820
-
George Rimar authored
Patch removes restriction about moving location counter backwards outside of output sections declarations. That may be useful for some apps relying on such scripts, known example is linux kernel. Differential revision: https://reviews.llvm.org/D34977 llvm-svn: 307794
-
George Rimar authored
This fixes PR33712. Imagine following script and code: VER1 { global: foo; local: *; }; VER2 { global: foo; }; .global bar bar: .symver bar, foo@VER1 .global zed zed: .symver zed, foo@@VER2 We add foo@@VER2 as foo to symbol table, because have to resolve references to foo for default symbols. Later we are trying to assign symbol versions from script. For that we are searching for 'foo' again. Here it is placed under VER1 and VER2 at the same time, we find it twice and trying to set version again both times, hence LLD shows a warning. Though sample code is correct: we have 2 different versions of foo. Patch gives a symbol version extracted from name a priority over version set by script. Differential revision: https://reviews.llvm.org/D35207 llvm-svn: 307792
-
George Rimar authored
When version script was used, binding opf undefined weak symbols sometimes was calculated as STB_LOCAL, making them non-preemtible what broke correct relocations handling logic for them. Fixes PR33738. Differential revision: https://reviews.llvm.org/D35263 llvm-svn: 307767
-
Rui Ueyama authored
llvm-svn: 307750
-
- Jul 11, 2017
-
-
Rui Ueyama authored
llvm-svn: 307703
-
Rafael Espindola authored
Thanks to Rui for the suggestion. llvm-svn: 307690
-
George Rimar authored
It was intially implemented in D19517 but then broken. Patch fixes PR33707, testcase is based on PR's case. Differential revision: https://reviews.llvm.org/D35119 llvm-svn: 307652
-
Peter Smith authored
r307367 via D34345 split out the temporary address state used within processCommands() and assignAddresses(). Due to the way that getSymbolValue is used by the ScriptParser there is no way of giving the current OutputSection to getSymbolValue() without somehow accessing the created addressState. The suggestion was that by making a pointer that would go out of scope we would find out by ASAN/MSAN or a crash if someone had misused currentAddressState. Differential Revision: https://reviews.llvm.org/D34345 llvm-svn: 307637
-
- Jul 10, 2017
-
-
Zachary Turner authored
Differential Revision: https://reviews.llvm.org/D35152 llvm-svn: 307590
-
- Jul 07, 2017
-
-
Peter Smith authored
In preparation for the addition of rangeThunks() calculate the addresses of all the inputSections so that ThunkSections can be inserted at the right place. Differential Revision: https://reviews.llvm.org/D34688 llvm-svn: 307373
-
George Rimar authored
This is relative to PR33173, Previously if something wrong happened on DWARF parsers side during parsing object for building gdb index (like was in PR: unsupported relocation) then LLD continued and finished the link. DWARF parsers sure showed error message on their side, but that is all. Patch changes behavior to fail the link in this case and show more detailed message. Differential revision: https://reviews.llvm.org/D34814 llvm-svn: 307370
-
Peter Smith authored
The assignAddresses() function accumulates state in the LinkerScript that prevents it from being called multiple times. This change moves the state into a separate structure AddressState that is created at the start of the function and disposed of at the end. CurAddressState is used rather than passing a reference to the state as a parameter to the functions used by assignAddresses(). This is because the getSymbolValue function needs to be executed in the context of AddressState but it is stored in ScriptParser when AddressState is not available. The AddressState is also used in a limited context by processCommands() Differential Revision: https://reviews.llvm.org/D34345 llvm-svn: 307367
-
George Rimar authored
This fixes last testcase provided in PR28414. In short issue is next: when we had X@@Version symbol in object A, we did not resolve it to X early. Then when in another object B we had reference to undefined X, symbol X from archive was fetched. Since both archive and object A contains another symbol Z, duplicate symbol definition was triggered as a result. Correct behavior is to use X@@Version from object A instead and do not fetch any symbols from archive. Differential revision: https://reviews.llvm.org/D35059 llvm-svn: 307364
-
- Jul 06, 2017
-
-
Rafael Espindola authored
llvm-svn: 307279
-
Rafael Espindola authored
It is now just after the OutputSections are created, which is as early as it can possibly go. llvm-svn: 307225
-
Rafael Espindola authored
llvm-svn: 307220
-
Rafael Espindola authored
This avoids having to compute relocation section sizes early, removing the last use of assignOffsets. llvm-svn: 307219
-
Rafael Espindola authored
llvm-svn: 307217
-
Rafael Espindola authored
llvm-svn: 307214
-
Rafael Espindola authored
llvm-svn: 307211
-
Rafael Espindola authored
llvm-svn: 307209
-
- Jul 05, 2017
-
-
Rafael Espindola authored
This is a bit simpler and avoids a walk over OutputSections. llvm-svn: 307178
-
David Blaikie authored
llvm-svn: 307167
-
Sean Eveson authored
Differential Revision: https://reviews.llvm.org/D34752 llvm-svn: 307162
-
Peter Smith authored
Attempt to fix Windows buildbots From 307131 Replaced return {ET, false}; with return std::make_pair(ET, false); llvm-svn: 307137
-