- Jun 08, 2017
-
-
Rafael Espindola authored
This allows moving clearOutputSections a bit earlier. llvm-svn: 304947
-
- Jun 07, 2017
-
-
Sam Clegg authored
Without this, when building with shared BUILD_SHARED_LIBS=ON I get errors such as: lib/Core/Reader.cpp:40: error: undefined reference to 'llvm::identify_magic(llvm::StringRef)' Differential Revision: https://reviews.llvm.org/D34004 llvm-svn: 304932
-
George Rimar authored
This patch reimplements .gdb_index in more natural way, that makes proccess of switching to multithreaded index building to be trivial. Differential revision: https://reviews.llvm.org/D33552 llvm-svn: 304927
-
George Rimar authored
This is PR32351 Each output section may have a type. The type is a keyword in parentheses. (https://sourceware.org/binutils/docs/ld/Output-Section-Type.html#Output-Section-Type) This patch support only one type, it is NOLOAD. If output section has such type, we force it to be SHT_NOBITS. More details are available on a review page. Differential revision: https://reviews.llvm.org/D33647 llvm-svn: 304925
-
Rafael Espindola authored
llvm-svn: 304914
-
George Rimar authored
Approach significantly simplifies LLD .gdb_index code and makes it much faster. Also it should resolve issues, like D33176 tries to address once and forever in a clean way. LLC binary linking without patch and without --gdb-index: 1,599241063 LLC binary linking without patch and with --gdb-index: 6,064316262 LLC binary linking with patch and with --gdb-index: 4,116792104 Time spent for building gdbindex changes from (6,064316262 - 1,599241063 == 4,465075199) to (4,116792104- 1,599241063 == 2,517551041). That is 2,517551041/4,465075199 = 0,564 or about 44% speedup. Differential revision: https://reviews.llvm.org/D33183 llvm-svn: 304895
-
Peter Smith authored
Thunks are now generated per InputSectionDescription instead of per OutputSection. This allows created ThunkSections to be inserted directly into InputSectionDescription. Changes in this patch: - Loop over InputSectionDescriptions to find relocations to Thunks - Generate a ThunkSection per InputSectionDescription - Remove synchronize() as we no longer need it - Move fabricateDefaultCommands() before createThunks Differential Revision: https://reviews.llvm.org/D33835 llvm-svn: 304887
-
George Rimar authored
Previously we would merge relocation sections by name. That did not work in some cases, like testcase shows. Patch implements logic to merge relocation sections if their target sections were merged into the same output section. Differential revision: https://reviews.llvm.org/D33824 llvm-svn: 304886
-
George Rimar authored
When linking linux kernel LLD currently reports next errors: ld: error: unable to evaluate expression: input section .head.text has no output section assigned ld: error: At least one side of the expression must be absolute ld: error: At least one side of the expression must be absolute That does not provide file/line information and overall looks unclear. Patch adds location information to ExprValue and that allows to provide more clear error messages. Differential revision: https://reviews.llvm.org/D33943 llvm-svn: 304881
-
Galina Kistanova authored
llvm-svn: 304874
-
Galina Kistanova authored
llvm-svn: 304873
-
Zachary Turner authored
This creates a new library called BinaryFormat that has all of the headers from llvm/Support containing structure and layout definitions for various types of binary formats like dwarf, coff, elf, etc as well as the code for identifying a file from its magic. Differential Revision: https://reviews.llvm.org/D33843 llvm-svn: 304864
-
Rafael Espindola authored
This now just requires not calling assignOffsets after it. llvm-svn: 304861
-
Rafael Espindola authored
Before this patch in -r we compute the OutputSection sizes early in the various calls to assignOffsets. With this change we can remove most of those calls. llvm-svn: 304860
-
- Jun 06, 2017
-
-
Rafael Espindola authored
We now used the InputSectionDescriptions in OutputSectionCommand::finalize. This will allow moving clearOutputSections earlier. llvm-svn: 304827
-
Rafael Espindola authored
This removes a mapping from OutputSection to OutputSectionCommand and is another step in moving clearOutputSections earlier. llvm-svn: 304821
-
Rafael Espindola authored
llvm-svn: 304820
-
Rafael Espindola authored
This is defined by both bfd and gold and used by the android libc. llvm-svn: 304803
-
Peter Smith authored
In preparation for inserting Thunks into InputSectionDescription::Sections extract the loop that finds InputSections that may have calls that need Thunks. This isn't much benefit now but this will be useful when we have to extract the InputSectionDescriptions::Sections from the script. Differential Revision: https://reviews.llvm.org/D33834 llvm-svn: 304783
-
Peter Smith authored
In preparation for inserting Thunks into InputSectionDescriptions this simple change associates added Thunks with a vector of InputSections instead of an OutputSection. As of now we are just using OutputSection::Sections. Differential Revision: https://reviews.llvm.org/D33832 llvm-svn: 304782
-
George Rimar authored
That addresses port commit comments for https://reviews.llvm.org/D33646 llvm-svn: 304777
-
George Rimar authored
Previously LLD would fail for case when there are multiple comdats and -r. That happened because it merged all ".group" (SHT_GROUP) sections into single output, producing broken result. Such sections may have similar name, alignment and flags and other properties. We need to produce separate output section for each such input one. Differential revision: https://reviews.llvm.org/D33643 llvm-svn: 304769
-
Rafael Espindola authored
This moves clearOutputSections and OutputSectionCommands creation as early as possible without changing other code. llvm-svn: 304751
-
- Jun 05, 2017
-
-
Konstantin Zhuravlyov authored
Differential Revision: https://reviews.llvm.org/D33691 llvm-svn: 304734
-
Petr Hosek authored
Traditionally, it has been defined in crtbegin.o, which is typically provided by libgcc or as part of the C library on some systems. However, but there's no principled reason for it to be there. We optionaly define this symbol, which can be used on platforms that don't provide __dso_handle in crtbegin.o or which don't use crtbegin.o at all. Differential Revision: https://reviews.llvm.org/D33856 llvm-svn: 304732
-
Dmitry Mikulin authored
procedural optimizations to prevent dropping symbols and allow the linker to process re-directs. PR33145: --wrap doesn't work with lto. Differential Revision: https://reviews.llvm.org/D33621 llvm-svn: 304719
-
George Rimar authored
This is PR33289. Previously LLD leaved section naming as is and that lead to wrong result, because we decompress sections when using -r, and hence should remove ".z" prefix. Differential revision: https://reviews.llvm.org/D33885 llvm-svn: 304711
-
Peter Smith authored
This change alters the sorting for OutputSections with the SHF_LINK_ORDER flag in OutputSection::finalize() to use the InputSectionDescription representation and not the OutputSection::Sections representation. Differential revision: https://reviews.llvm.org/D33772 llvm-svn: 304700
-
- Jun 03, 2017
-
-
Rafael Espindola authored
This allows moving clearOutputSections a bit earlier. llvm-svn: 304654
-
- Jun 02, 2017
-
-
Reid Kleckner authored
This reverts r303374. It breaks Chrome's IAT patching code: http://crbug.com/729077 llvm-svn: 304584
-
Reid Kleckner authored
This reverts commit r304561 and re-lands r303490 & co. The fix was to use "SymbolName" when translating LLD's internal export list to lib/Object's short export struct. The SymbolName reflects the actual symbol name, which may include fastcall and stdcall mangling bits not included in the /EXPORT or .def file EXPORTS name: @@ -434,8 +434,7 @@ std::vector<COFFShortExport> createCOFFShortExportFromConfig() { std::vector<COFFShortExport> Exports; for (Export &E1 : Config->Exports) { COFFShortExport E2; - E2.Name = E1.Name; + // Use SymbolName, which will have any stdcall or fastcall qualifiers. + E2.Name = E1.SymbolName; E2.ExtName = E1.ExtName; E2.Ordinal = E1.Ordinal; E2.Noname = E1.Noname; llvm-svn: 304573
-
Reid Kleckner authored
The .def file parser changes I reverted broke this test case, and exported "__imp__foo" instead of "__imp__foo@8". This was http://crbug.com/728726. llvm-svn: 304572
-
Reid Kleckner authored
This reverts commits r303490, r303491, r303493, and r303494. This caused http://crbug.com/728726. Essentially, exporting stdcall functions doesn't appear to work after this change. Reduced test case soon. llvm-svn: 304561
-
George Rimar authored
Not sure why I did not faced that locally earlier, llvm-readobj did not have -s flag for 2/3 tests. llvm-svn: 304539
-
George Rimar authored
Spec says: (http://www.sco.com/developers/gabi/latest/ch4.sheader.html) sh_info This member holds extra information, whose interpretation depends on the section type. If the sh_flags field for this section header includes the attribute SHF_INFO_LINK, then this member represents a section header table index. SHF_INFO_LINK The sh_info field of this section header holds a section header table index. Since sh_info for SHT_REL[A] sections should contain the section header index of the section to which the relocation applies, this is consistent with spec to put this flag. Behavior matches both bfd and gold as well. Differential revision: https://reviews.llvm.org/D33763 llvm-svn: 304531
-
Rafael Espindola authored
This allows us to remove the PageAlign field. It will also allow moving fabricateDefaultCommands earlier. llvm-svn: 304513
-
Rafael Espindola authored
llvm-svn: 304511
-
- Jun 01, 2017
-
-
Zachary Turner authored
Object files have symbol records not aligned to any particular boundary (e.g. 1-byte aligned), while PDB files have symbol records padded to 4-byte aligned boundaries. Since they share the same reading / writing code, we have to provide an option to specify the alignment and propagate it up to the producer or consumer who knows what the alignment is supposed to be for the given container type. Added a test for this by modifying the existing PDB -> YAML -> PDB round-tripping code to round trip symbol records as well as types. Differential Revision: https://reviews.llvm.org/D33785 llvm-svn: 304484
-
Rafael Espindola authored
This removes a call to getCmd and allows us to move clearOutputSections earlier. llvm-svn: 304439
-
Rafael Espindola authored
This is probably the correct location for it: next to fabricateDefaultCommands. If we don't have a linker script, we fabricate one. If we have one, we patch it. llvm-svn: 304436
-