summaryrefslogtreecommitdiffstats
path: root/lld
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove Size from Undefined symbol.Rui Ueyama2016-04-285-27/+16
| | | | | | | | | | | There seems to be no reason to keep st_size of undefined symbols. This patch removes the member for it. This patch will change outputs in cases that undefined symbols are copied to output, but I think this is unimportant. Differential Revision: http://reviews.llvm.org/D19574 llvm-svn: 267826
* Do not lookup the symbol table twice for each --wrap.Rui Ueyama2016-04-281-2/+3
| | | | llvm-svn: 267822
* Sort includes. NFC.Rafael Espindola2016-04-271-1/+1
| | | | llvm-svn: 267821
* [ELF] -R is an alias for -rpath.Davide Italiano2016-04-271-0/+1
| | | | | | | perl-5 uses the former, so provide an alias. Found while linking the whole set of FreeBSD ports with lld. llvm-svn: 267801
* ELF: Create .gnu.version and .gnu.version_r sections when linking against ↵Peter Collingbourne2016-04-2711-4/+434
| | | | | | | | versioned DSOs. Differential Revision: http://reviews.llvm.org/D19464 llvm-svn: 267775
* Reduce usage of isRelRelative.Rafael Espindola2016-04-272-69/+23
| | | | | | | | | | It is now used only for relocations that only set the low bits inside a page. Everything else is handled by getRelExpr. I will send a another review renaming and better documenting isRelRelative. llvm-svn: 267705
* Represent TOC relative relocations as GOTREL.Rafael Espindola2016-04-271-10/+19
| | | | | | That way we only need to subtract the offset is relocateOne. llvm-svn: 267702
* Create a .got when PPC64 uses a TOC.Rafael Espindola2016-04-274-33/+60
| | | | | | This simplifies the logic for computing the value of the toc base. llvm-svn: 267701
* Simplify handling of R_PPC64_TOC. NFC.Rafael Espindola2016-04-272-10/+11
| | | | llvm-svn: 267698
* Removed dead code. NFC.George Rimar2016-04-271-1/+0
| | | | llvm-svn: 267685
* [ELF] - Align sections file offsets correctly.George Rimar2016-04-272-4/+102
| | | | | | | | | | | System V ABI 4.1 specifies that program header's p_vaddr should equal p_offset, modulo p_align. (https://docs.oracle.com/cd/E19683-01/816-1386/chapter6-83432/index.html). It was possible to violate this using the linkerscript. Patch fixes the issue. Differential revision: http://reviews.llvm.org/D19416 llvm-svn: 267684
* [ELF][MIPS] Remove getMipsGpAddr(). NFCSimon Atanasyan2016-04-273-14/+1
| | | | llvm-svn: 267673
* Simplify. NFC.Rui Ueyama2016-04-271-1/+1
| | | | llvm-svn: 267663
* Remove unnecessary trailing semicolons.Rui Ueyama2016-04-2723-24/+24
| | | | | | | Since this semicolon existed in an early test file, it has spread to many files. llvm-svn: 267659
* ELF: Merge UndefinedBitcode and UndefinedElf. NFC.Peter Collingbourne2016-04-275-64/+45
| | | | | | Differential Revision: http://reviews.llvm.org/D19566 llvm-svn: 267640
* ELF: Re-implement -u directly and remove CanKeepUndefined flag.Peter Collingbourne2016-04-277-31/+29
| | | | | | | | | | | | | | | | The semantics of the -u flag are to load the lazy symbol named by the flag. We were previously relying on this behavior falling out of symbol resolution against a synthetic undefined symbol, but that didn't quite give us the correct behavior, so we needed a flag to mark symbols created with -u so we could treat them specially in the writer. However, it's simpler and less error prone to implement the required behavior directly and remove the flag. This fixes an issue where symbols loaded with -u would receive hidden visibility even when the definition in an object file had wider visibility. Differential Revision: http://reviews.llvm.org/D19560 llvm-svn: 267639
* ELF: Move code to where it is used, and related cleanups. NFC.Peter Collingbourne2016-04-267-97/+74
| | | | | | Differential Revision: http://reviews.llvm.org/D19490 llvm-svn: 267637
* Return R_GOTREL for R_MIPS_GPREL*.Rafael Espindola2016-04-262-5/+6
| | | | | | | This lets Writer.cpp know that they are got relative, which will allow further simplifications. llvm-svn: 267613
* Call repl in getSymbolBody. NFC.Rafael Espindola2016-04-265-7/+7
| | | | | | Every caller was doing it. llvm-svn: 267603
* Move utility functions to DriverUtils.cpp.Rui Ueyama2016-04-263-28/+32
| | | | llvm-svn: 267602
* Handle Windows drive letters and ".." for --reproduce.Rui Ueyama2016-04-262-34/+54
| | | | | | | | | | | | | | | | When --reproduce <path> is given, then we need to concatenate input file paths to the given path to save input files to the directory. Previously, path concatenation didn't handle Windows drive letters so it could generate invalid paths such as "C:\D:\foo". It also didn't handle ".." path components, so it could produce some bad paths such as "foo/../../etc/passwd". In this patch, Windows drive letters and ".." are removed before concatenating paths. Differential Revision: http://reviews.llvm.org/D19551 llvm-svn: 267600
* Make test/ELF/reproduces.s test to work on Windows.Rui Ueyama2016-04-261-18/+13
| | | | | | | | | | Previously, the test didn't work on Windows because it tried to concatenate two (possibly) absolute paths. If two paths are absolute paths that have drive letters, then the result would become something like C:\foo\D:\bar. That's not a valid path. I changed the test to use relative paths. llvm-svn: 267588
* Remove unnecessary function type directives for ifuncs.Peter Collingbourne2016-04-267-13/+0
| | | | llvm-svn: 267569
* Don't gc symbols that have to go in the dynamic symbol table.Rafael Espindola2016-04-262-4/+37
| | | | | | | | | We were only doing it for .so and --export-dynamic, but those are not the only ways a symbol ends up in the dynamic symbol table. Problem diagnostic and earlier patch version by Peter Collingbourne. llvm-svn: 267568
* ELF: Treat IFunc definitions in DSOs as functions.Peter Collingbourne2016-04-263-1/+23
| | | | | | Differential Revision: http://reviews.llvm.org/D19517 llvm-svn: 267566
* [ELF] Avoid polluting source directory with temp files.Davide Italiano2016-04-261-7/+7
| | | | llvm-svn: 267565
* Handle --as-needed with symbols, not relocations.Rafael Espindola2016-04-262-8/+30
| | | | | | This matches the behavior of both gold and bfd. llvm-svn: 267558
* Store the binding in the Symbol.Rafael Espindola2016-04-266-13/+48
| | | | | | | This remove a fixme, cleans up the weak undef interaction with archives and lets us keep weak undefs still weak if they resolve to shared. llvm-svn: 267555
* [ELF] Simplify. Pointed out by Rui Ueyama.Davide Italiano2016-04-261-2/+1
| | | | llvm-svn: 267523
* [Tests] Run reproduces.s only on UNIX until I investigate a windows failure.Davide Italiano2016-04-261-1/+1
| | | | llvm-svn: 267505
* [ELF] Introduce --reproduce flag.Davide Italiano2016-04-264-0/+73
| | | | | | | | | | --reproduce dumps the object files in a directory chosen (preserving the file system layout) and the linker invocation so that people can create an archive and upload for debugging. Differential Revision: http://reviews.llvm.org/D19494 llvm-svn: 267497
* [ELF][MIPS] Move MIPS GOT header generation to the GotSectionSimon Atanasyan2016-04-253-35/+28
| | | | | | | | | | | MIPS is the only target requires GOT header. We already have MIPS specific code in the `GotSection` class, so move MIPS GOT header generation there and delete redundant stuff like `GotHeaderEntriesNum` field and `writeGotHeader` method. Differential Revision: http://reviews.llvm.org/D19465 llvm-svn: 267460
* Add support for R_X86_64_PC64.Rafael Espindola2016-04-252-0/+37
| | | | llvm-svn: 267409
* Simplify. NFC.Rafael Espindola2016-04-251-30/+18
| | | | llvm-svn: 267396
* Delete needsCopyRelImpl. It is redundant with getRelExpr.Rafael Espindola2016-04-253-56/+17
| | | | llvm-svn: 267394
* [ELF] Delete extra line. NFCSimon Atanasyan2016-04-251-1/+0
| | | | llvm-svn: 267391
* [ELF] - Implemented comparsion operators for linkerscript.George Rimar2016-04-253-8/+146
| | | | | | | | Patch adds support of <,>,!=,==,>=,<= operators. Differential revision: http://reviews.llvm.org/D19419 llvm-svn: 267382
* [ELF] - Removed dead declarations. NFC.George Rimar2016-04-251-5/+0
| | | | llvm-svn: 267381
* Add a note to the test explaining why it doesn't match gold's behaviour.Peter Collingbourne2016-04-251-0/+3
| | | | llvm-svn: 267371
* [ELF] Reinstate 'else' which was previously removed.Davide Italiano2016-04-241-1/+2
| | | | | | It turns out it's actually needed. llvm-svn: 267358
* [ELF] Simplify. Remove unneeded else. NFC.Davide Italiano2016-04-241-2/+1
| | | | llvm-svn: 267333
* [ELF][MIPS] Add test case to check creation of GOT entries for weak symbols. NFCSimon Atanasyan2016-04-241-0/+172
| | | | llvm-svn: 267327
* ELF: Simplify preemption logic. Do not include weak undefined symbols in ↵Peter Collingbourne2016-04-243-7/+55
| | | | | | | | non-DSOs. Add a test for -Bsymbolic + undefined symbols. llvm-svn: 267323
* Test what I intended to test.Peter Collingbourne2016-04-241-1/+1
| | | | llvm-svn: 267316
* ELF: Forbid undefined symbols with non-default visibility in DSOs.Peter Collingbourne2016-04-242-2/+21
| | | | llvm-svn: 267315
* ELF: Always include undefined DSO symbols in the symbol table.Peter Collingbourne2016-04-242-7/+41
| | | | | | | | | Fixes check-llvm when bootstrapping. Also remove mostly dead and most likely incorrect logic regarding preemption of weak undefined symbols. llvm-svn: 267314
* [ELF] Use llvm-mc rather than checking in a file.Davide Italiano2016-04-242-4/+11
| | | | | | Now that the support for the 'new' relocations is available. llvm-svn: 267310
* Add a file comment about the Ulrich's document and don't repeat it in other ↵Rui Ueyama2016-04-231-55/+48
| | | | | | comments. llvm-svn: 267261
* Add more comment.Rui Ueyama2016-04-231-0/+1
| | | | llvm-svn: 267260
* Add comments.Rui Ueyama2016-04-231-0/+7
| | | | llvm-svn: 267259
OpenPOWER on IntegriCloud