- Aug 24, 2017
-
-
Simon Atanasyan authored
Currently LLD reads the R_MIPS_HI16's addends in the `computeMipsAddend` function, the R_MIPS_LO16's addends in both `computeMipsAddend` and `getImplicitAddend` functions. This patch moves reading all addends to the `getImplicitAddend` function. As a side effect it fixes a "paired" HI16/LO16 addend calculation if "LO16" part of a pair is not found. llvm-svn: 311711
-
Simon Atanasyan authored
llvm-svn: 311710
-
Rui Ueyama authored
Fixes https://bugs.llvm.org/show_bug.cgi?id=34311 llvm-svn: 311682
-
Rui Ueyama authored
Before this patch, lld printed out something like error: -O: number expected, but got After this patch, it prints out the same error message like this: error: -O: number expected, but got '' Fixes https://bugs.llvm.org/show_bug.cgi?id=34311 llvm-svn: 311681
-
- Aug 23, 2017
-
-
Sam Clegg authored
Also remove unused include of raw_ostream.h Differential Revision: https://reviews.llvm.org/D37048 llvm-svn: 311587
-
Petr Hosek authored
Currently, LLD checks whether there's enough space for headers by checking if headers fit below the address of the first allocated section. However, that's always thue if the binary doesn't start at zero which means that LLD always emits a segment for headers, even if no other sections belong to that segment. This is a problem in cases when linker script is being used with a non-zero start address when we don't want to make the headers visible by not leaving enough space for them. This pattern is common in embedded programming but doesn't work in LLD. This patch changes the behavior of LLD in case when linker script is being to match the behavior of BFD ld and gold, which is to only place headers into a segment when they're covered by some output section. Differential Revision: https://reviews.llvm.org/D36256 llvm-svn: 311586
-
George Rimar authored
Previously up to 3 errors were reported at once, with patch we always will report only one, just like in other linker code. Differential revision: https://reviews.llvm.org/D37015 llvm-svn: 311537
-
George Rimar authored
Code suggested by Rui Ueyama in PR34238 comments. Previously LTO optimized away symbols referenced from linker script because did not see that them are used from regular objects. Patch adds such symbols as undefined earlier, before running LTO, what sets IsUsedInRegularObj for them and fixes the issue. Differential revision: https://reviews.llvm.org/D37009 llvm-svn: 311534
-
- Aug 22, 2017
-
-
Rui Ueyama authored
This reverts commit r311468 because it broke some CFI bots. llvm-svn: 311497
-
Rui Ueyama authored
Patch by Rafael Espíndola. This is PR34053. The implementation is a bit of a hack, given the precise location where IsPreemtible is set, it cannot be used from SymbolTable::handleAnonymousVersion. I could add another method to SymbolTable if you think that would be better. Differential Revision: https://reviews.llvm.org/D36499 llvm-svn: 311468
-
George Rimar authored
This is PR33097. Previously when doing relocatable link, all IR symbols were absent in result object file. Patch makes external symbols to be exported. Differential revision: https://reviews.llvm.org/D36957 llvm-svn: 311431
-
- Aug 21, 2017
-
-
George Rimar authored
With fix: explicitly specify ouput format for hexdump tool call. Original commit message: [ELF] - Do not forget to fill last bytes of PT_LOADs with trap instructions. Previously last 4 bytes of executable loads were not filled with trap instructions, patch fixes this bug. Differential revision: https://reviews.llvm.org/D36262 llvm-svn: 311315
-
George Rimar authored
[ELF] - Revert r311310 "[ELF] - Do not forget to fill last bytes of PT_LOADs with trap instructions." It broke BB: http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/11792/steps/test_lld/logs/stdio llvm-svn: 311314
-
George Rimar authored
[ELF] - Do not segfault when doing logical and/or operations on symbols that have no output sections. Previously we would crash on samples from testcase, because were trying to access zero pointer to output section. Differential revision: https://reviews.llvm.org/D36145 llvm-svn: 311311
-
George Rimar authored
Previously last 4 bytes of executable loads were not filled with trap instructions, patch fixes this bug. Differential revision: https://reviews.llvm.org/D36262 llvm-svn: 311310
-
- Aug 19, 2017
-
-
Rui Ueyama authored
I renamed corresponding classes in r309199 but forgot to rename enums at the moment. Rename them now to make them consistent. llvm-svn: 311214
-
- Aug 18, 2017
-
-
Ben Dunbobbin authored
Removed extraneous comment markers llvm-svn: 311169
-
- Aug 17, 2017
-
-
George Rimar authored
We would previously crash on next script: MEMORY { name : ORIGIN = .; } Patch fixes that. Differential revision: https://reviews.llvm.org/D36138 llvm-svn: 311073
-
Rui Ueyama authored
We had a lock to guard BAlloc from being used concurrently, but that is not very easy to understand. This patch replaces it with a std::unique_ptr. llvm-svn: 311056
-
- Aug 16, 2017
-
-
Davide Italiano authored
Also add a test. This fixes r310995 and PR34200. llvm-svn: 310998
-
George Rimar authored
Clang passes this options to linker. We should ignore them, anyways they are always enabled by default atm. Fixes https://bugs.llvm.org/show_bug.cgi?id=34200. llvm-svn: 310995
-
- Aug 15, 2017
-
-
Rui Ueyama authored
GdbIndexSection doesn't need lazy finalization because when an instance of the class is created, we already know all debug info sections. We can initialize the instnace in the ctor. llvm-svn: 310931
-
Rui Ueyama authored
llvm-svn: 310930
-
Rui Ueyama authored
llvm-svn: 310929
-
Rui Ueyama authored
This function doesn't seem to add value to the symbol table as it is easy to write code without it. llvm-svn: 310925
-
- Aug 14, 2017
-
-
Rui Ueyama authored
Also refactored the code a bit. llvm-svn: 310886
-
Rui Ueyama authored
A TODO is not a todo unless we really have to do it, but they are not required at the moment. llvm-svn: 310864
-
George Rimar authored
Attemp to fix BB. Previously we ignored all --plugin-opt options, but now (after r310826) error out on non implemented ones. This caused BB to fail: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/3405/steps/check-cfi-and-supported%20in%20gcc%20build/logs/stdio llvm-svn: 310835
-
George Rimar authored
This is relative to PR30720. Previously we ignored all --plugin-opt arguments. Patch adds support for them. Patch does not add any new LTO options, and just implements mapping from --plugin-opt to existent ones. Differential revision: https://reviews.llvm.org/D36227 llvm-svn: 310826
-
- Aug 11, 2017
-
-
Rui Ueyama authored
llvm-svn: 310757
-
Rafael Espindola authored
llvm-svn: 310736
-
George Rimar authored
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/11517/steps/build_Lld/logs/stdio llvm-svn: 310705
-
George Rimar authored
This is PR33886, previously we did not output common symbols to map, patch fixes that. Differential revision: https://reviews.llvm.org/D36466 llvm-svn: 310703
-
Rafael Espindola authored
The start of a segment should not have a gap that needs trap instructions. llvm-svn: 310696
-
- Aug 10, 2017
-
-
Rui Ueyama authored
ResolvedReloc struct is always passed to a callback function and not stored anywhere. That is, in effect, we use the struct to pack multiple arguments to one argument, which doesn't make much sense. This patch removes the struct and passes the members to the callback directly. llvm-svn: 310620
-
Rui Ueyama authored
Liveness is usually a notion of input sections, but this patch adds "liveness" bit to common symbols because they don't belong to any input section. This patch is based on https://reviews.llvm.org/D36520 Differential Revision: https://reviews.llvm.org/D36546 llvm-svn: 310617
-
Hafiz Abid Qadeer authored
Summary: This small patch adds the support for ! operator in linker scripts. Reviewers: ruiu, rafael Reviewed By: ruiu Subscribers: meadori, grimar, emaste, llvm-commits Differential Revision: https://reviews.llvm.org/D36451 llvm-svn: 310607
-
Rafael Espindola authored
This is probably a small optimization, but the main motivation is having a way of fixing pr34053 that doesn't require a hash lookup in isPreempitible. llvm-svn: 310602
-
George Rimar authored
This patch restricts following construction: /DISCARD/ : { *(COMMON) } Previously LLD would crash. Differential revision: https://reviews.llvm.org/D36468 llvm-svn: 310554
-
- Aug 09, 2017
-
-
Rui Ueyama authored
--icf=none negates --icf=all. llvm-svn: 310526
-