- Apr 05, 2017
-
-
George Rimar authored
GNU linkers define __bss_start symbol. Patch teaches LLD to do that. This is PR32051. Below is part of standart ld.bfd script: .data1 : { *(.data1) } _edata = .; PROVIDE (edata = .); . = .; __bss_start = .; .bss : { Currently LLD can emit up to 3 .bss* sections as one of testcase shows. Implementation inserts this symbol before first .bss* output section. Differential revision: https://reviews.llvm.org/D30419 llvm-svn: 299528
-
George Rimar authored
It was not NFC unfortunaly, one of changes decrements begin() iterator and that is not allowed by MSVS. llvm-svn: 299525
-
Rui Ueyama authored
llvm-svn: 299521
-
Rui Ueyama authored
llvm-svn: 299520
-
Rui Ueyama authored
Looks like we can use consume() in many more places. llvm-svn: 299519
-
Rui Ueyama authored
llvm-svn: 299518
-
Rui Ueyama authored
This class is used only within this file, so it can be file-local. llvm-svn: 299516
-
Rui Ueyama authored
LinkerScript.cpp contains both the linker script processor and the linker script parser. I put both into a single file, but the file grown too large, so it's time to put them into two different files. llvm-svn: 299515
-
Rui Ueyama authored
llvm-svn: 299514
-
Rui Ueyama authored
ScriptParser is not a ScriptLexer, so this should be a private inheritance. llvm-svn: 299513
-
Rui Ueyama authored
llvm-svn: 299512
-
Rui Ueyama authored
A for-loop is more boring than a find_if, but I think this is easier to read. llvm-svn: 299511
-
Rui Ueyama authored
llvm-svn: 299509
-
Rui Ueyama authored
llvm-svn: 299508
-
Rui Ueyama authored
llvm-svn: 299506
-
Rui Ueyama authored
It simplifies variable types. llvm-svn: 299505
-
Rui Ueyama authored
llvm-svn: 299504
-
Rui Ueyama authored
llvm-svn: 299503
-
Rui Ueyama authored
llvm-svn: 299502
-
Rui Ueyama authored
`!V.size()` where V is a vector is equivalent to `V.empty()`. llvm-svn: 299501
-
Rui Ueyama authored
llvm-svn: 299500
-
Rui Ueyama authored
llvm-svn: 299499
-
Rui Ueyama authored
This should improve readability. llvm-svn: 299498
-
Rui Ueyama authored
llvm-svn: 299495
-
Rui Ueyama authored
llvm-svn: 299494
-
Rui Ueyama authored
llvm-svn: 299493
-
Rui Ueyama authored
llvm-svn: 299492
-
- Apr 04, 2017
-
-
Rafael Espindola authored
The ELF spec says: all of the non-default visibility attributes, when applied to a symbol reference, imply that a definition to satisfy that reference must be provided within the current executable or shared object. But we were trying to resolve those undef references to shared symbols. That causes odd results like creating a got entry with a relocation pointing to 0. llvm-svn: 299464
-
James Henderson authored
As with the changes made in r297645, we do not want a potentially long link to be run, if it will ultimately fail because the map file is not writable. This change reuses the same functionality as the output file path check. See https://reviews.llvm.org/D30449 for further justification and explanations. Reviewers: ruiu Differential Revision: https://reviews.llvm.org/D31603 llvm-svn: 299420
-
Peter Smith authored
The existing names for the ARM and Thumb Thunks highlight their current use as interworking Thunks. These Thunks can also be used for range extension Thunks where there is no state change. This change makes the name more generic so it is suitable for range extension. Differential Revision: https://reviews.llvm.org/D31605 llvm-svn: 299418
-
- Apr 03, 2017
-
-
Rui Ueyama authored
Previous error message style: error: /home/alice/src/bar.c:12: relocation R_X86_64_PLT32 cannot refer to absolute symbol 'answer' defined in /home/alice/src/foo.o New error message style: error: relocation R_X86_64_PLT32 cannot refer to absolute symbol: foo >>> defined in /home/alice/src/foo.o >>> referenced by bar.c:12 (/home/alice/src/bar.c:12) >>> /home/alice/src/bar.o:(.text+0x1) llvm-svn: 299390
-
Rui Ueyama authored
llvm-svn: 299377
-
Rui Ueyama authored
LogName member was added to construct input file names for logging only once. This patch does this in a different way. Now toString caches its results. Differential Revision: https://reviews.llvm.org/D31546 llvm-svn: 299375
-
- Apr 01, 2017
-
-
Rui Ueyama authored
llvm-svn: 299289
-
Rui Ueyama authored
This patch is intended to improve readability of "duplicate symbol" error messages. Without this patch: /ssd/clang/bin/ld.lld: error: /ssd/llvm-project/lld/ELF/Relocations.cpp:1054: duplicate symbol 'lld::elf::demangle(llvm::StringRef)' /ssd/clang/bin/ld.lld: error: /ssd/llvm-project/lld/ELF/Strings.cpp:93: previous definition was here With this patch: /ssd/clang/bin/ld.lld: error: duplicate symbol: lld::elf::demangle(llvm::StringRef) >>> defined at Strings.cpp:93 (/ssd/llvm-project/lld/ELF/Strings.cpp:93) >>> Strings.cpp.o:(lld::elf::demangle(llvm::StringRef)) in archive lib/liblldELF.a >>> defined at Relocations.cpp:1054 (/ssd/llvm-project/lld/ELF/Relocations.cpp:1054) >>> Relocations.cpp.o:(.text+0x4C30) in archive lib/liblldELF.a Discussion thread: http://lists.llvm.org/pipermail/llvm-dev/2017-March/111459.html Differential Revision: https://reviews.llvm.org/D31507 llvm-svn: 299280
-
- Mar 31, 2017
-
-
James Henderson authored
llvm-svn: 299208
-
Peter Collingbourne authored
llvm-svn: 299184
-
Peter Collingbourne authored
Introduce symbol table data structures that can be potentially written to disk, have the LTO library build those data structures using temporarily constructed modules and redirect the LTO library implementation to go through those data structures. This allows us to remove the LLVMContext and Modules owned by InputFile. With this change I measured a peak memory consumption decrease from 5.4GB to 2.8GB in a no-op incremental ThinLTO link of Chromium on Linux. The impact on memory consumption is larger in COFF linkers where we are currently forced to materialize all metadata in order to read linker options. Peak memory consumption linking a large piece of Chromium for Windows with full LTO and debug info decreases from >64GB (OOM) to 15GB. Part of PR27551. Differential Revision: https://reviews.llvm.org/D31364 llvm-svn: 299168
-
Rui Ueyama authored
llvm-svn: 299128
-