- Jul 18, 2017
-
-
George Rimar authored
llvm-svn: 308297
-
Reid Kleckner authored
Assume that the LF_TYPESERVER2 record contains Windows-style paths. In any case, 'sys::path::filename(Path, Style::windows)' will work on Unix-style paths. llvm-svn: 308241
-
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
-
Reid Kleckner authored
Summary: Object files compiled with /Zi emit type information into a type server PDB. The .debug$S section will contain a single TypeServer2Record with the absolute path and GUID of the type server. LLD needs to load the type server PDB and merge all types and items it finds in it into the destination PDB. Depends on D35495 Reviewers: ruiu, inglorion Subscribers: zturner, llvm-commits Differential Revision: https://reviews.llvm.org/D35504 llvm-svn: 308235
-
Reid Kleckner authored
Summary: We were treating the GUIDs in TypeServer2Record as strings, and the non-ASCII bytes in the GUID would not round-trip through YAML. We already had the PDB_UniqueId type portably represent a Windows GUID, but we need to hoist that up to the DebugInfo/CodeView library so that we can use it in the TypeServer2Record as well as in PDB parsing code. Reviewers: inglorion, amccarth Subscribers: llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D35495 llvm-svn: 308234
-
- Jul 17, 2017
-
-
Rui Ueyama authored
They are supposed to contain pointers, so .byte wasn't quite right. llvm-svn: 308214
-
Reid Kleckner authored
Summary: Instead of wiring these through the CVTypeVisitor interface, clients should inspect the CVTypeArray before visiting it and potentially load up the type server's TPI stream if they need it. No tests relied on this functionality because LLD was the only client. Reviewers: ruiu Subscribers: mgorny, hiraditya, zturner, llvm-commits Differential Revision: https://reviews.llvm.org/D35394 llvm-svn: 308212
-
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
-
-
Reid Kleckner authored
I need to print the type index in hex so that I can match it in FileCheck for a test I'm writing. llvm-svn: 308107
-
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
-
George Rimar authored
llvm-svn: 308034
-
George Rimar authored
Previously we used precompiled objects in gdb-index.s and debug-gnu-pubnames.s testcases. We can avoid that. Differential revision: https://reviews.llvm.org/D35360 llvm-svn: 308005
-
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
-
Shoaib Meenai authored
The /appcontainer flag was added in r299728, and the lib.exe dependency for creating import libraries was removed in r275242. Update the docs accordingly. The PDB support also needs updating, but I'll leave that for someone who's more familiar with the current status (probably rnk). llvm-svn: 307998
-
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
-
Reid Kleckner authored
Summary: We've accumulated about five or so data structures that are widely referenced: - PDBBuilder - Type table - Id table - PDB string table - Type server handler I'm about to rewrite type server handling, and I need a new class in LLD where I can put its state. By creating a new PDBLinker class, I hope to put it there next. Reviewers: ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35392 llvm-svn: 307979
-
- 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
-
Reid Kleckner authored
Summary: This would have caught the invalid object file I used in my test case in r307726. The OOB was only caught by ASan later, which is slow and doesn't work on some platforms. LLD should do some basic input validation itself. This check isn't perfect, so relocations can reach OOB by up to seven bytes, but it's better than what we had and probably cheap. Reviewers: ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35371 llvm-svn: 307948
-
Reid Kleckner authored
Summary: This fixes type indices for SDK or CRT static archives. Previously we'd try to look next to the archive object file path, which would not exist on the local machine. Also error out if we can't resolve a type server record. Hypothetically we can recover from this error by discarding debug info for this object, but that is not yet implemented. Reviewers: ruiu, amccarth Subscribers: aprantl, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D35369 llvm-svn: 307946
-
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
-
-
Reid Kleckner authored
This re-commits r307726 with valid line table relocations. llvm-svn: 307829
-
Adrian McCarthy authored
llvm-svn: 307823
-
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
-
Vitaly Buka authored
Revert "[PDB] Tweak bad type index error handling" check-lld with asan detects use-after-poison. This reverts commits r307733 and r307726. llvm-svn: 307752
-
Rui Ueyama authored
llvm-svn: 307750
-
Reid Kleckner authored
llvm-svn: 307733
-
Rafael Espindola authored
llvm-svn: 307728
-
Reid Kleckner authored
Translate invalid type indices to a sentinel value instead of skipping the record. Skipping records isn't a good recovery method, because we can skip a scope open or close record, which will confuse the scope management code. We currently have lots of invalid type indices on Microsoft-provided standard libraries, because the LF_TYPESERVER2 records contain absolute paths that are only valid on their build servers. Our type server handlers need to look at other things (GUIDs) to find these type server PDBs. llvm-svn: 307726
-
- 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
-