summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/linkerscript/linkerscript.s
Commit message (Collapse)AuthorAgeFilesLines
* [ELF][test] Change references of %T to %t.dirFangrui Song2019-10-301-2/+3
| | | | | | | | | | | | Test files in the same directory share the same %T. %T is easy to misuse and cause race conditions (when running concurrently) so it has been deprecated since D48842 (see docs/CommandGuide/lit.rst). While here, add `rm -rf %t.dir` so that tests cannot depend on old files lying around. Reviewed By: jhenderson, ruiu Differential Revision: https://reviews.llvm.org/D69572
* lld: unquote possibly quoted `EXTERN("symbol")` entry in linker script.Rui Ueyama2019-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | gold accepts quoted strings. binutils requires quoted strings for some kinds of symbols, e.g.: it accepts quoted symbols with @ in name: $ echo 'EXTERN("__libc_start_main@@GLIBC_2.2.5")' > a.script $ g++ a.script /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' collect2: error: ld returned 1 exit status but rejects them if unquoted: $ echo 'EXTERN(__libc_start_main@@GLIBC_2.2.5)' > a.script $ g++ a.script a.script: file not recognized: File format not recognized collect2: error: ld returned 1 exit status To maintain compatibility with existing linker scripts support quoted strings in lld as well. Patch by Lucian Adrian Grijincu. Differential Revision: https://reviews.llvm.org/D57987 llvm-svn: 353756
* [ELF] Keep tests from wrinting to the test directory.Benjamin Kramer2018-01-191-6/+6
| | | | llvm-svn: 322943
* [ELF] Fall back to search dirs for linker scripts specified with -TAlexander Richardson2017-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: This matches the behaviour of ld.bfd: https://sourceware.org/binutils/docs/ld/Options.html#Options If scriptfile does not exist in the current directory, ld looks for it in the directories specified by any preceding '-L' options. Multiple '-T' options accumulate. Reviewers: ruiu, grimar Reviewed By: ruiu, grimar Subscribers: emaste, llvm-commits Differential Revision: https://reviews.llvm.org/D40129 llvm-svn: 318655
* [ELF] - Do not report multiple errors for single one in ScriptLexer::setError.George Rimar2017-08-231-1/+1
| | | | | | | | | | 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
* [ELF] - Linkerscript: Fall back to search paths when INCLUDE not foundGeorge Rimar2016-12-211-0/+8
| | | | | | | | | | | | From https://sourceware.org/binutils/docs/ld/File-Commands.html: The file will be searched for in the current directory, and in any directory specified with the -L option. Patch done by Alexander Richardson. Differential revision: https://reviews.llvm.org/D27831 llvm-svn: 290247
* Remove `REQUIRES: shell` hack to workaround an echo issue.Rui Ueyama2016-12-091-6/+0
| | | | | | | These tests are disabled on Windows, but they seem to work just fine now, so I'll enable them. llvm-svn: 289251
* Split linkerscript.s into small test files.Rui Ueyama2016-12-081-83/+2
| | | | | | | | | | linkerscript.s is the first test file for linker script, and at the moment it contains all tests for linker scripts. Now that test file doesn't make sense. linkerscript2.s was just badly named. Renamed searchdir.s. llvm-svn: 289148
* Print a warning message if ENTRY() symbol is not found.Rui Ueyama2016-12-081-0/+6
| | | | llvm-svn: 289146
* Allow linker-script-defined entry symbols.Rui Ueyama2016-10-201-0/+8
| | | | | | | | Previously, we were checking the existence of an entry symbol too early. It was done before the linker script processor creates symbols defined in scripts. Fixes bug 30743. llvm-svn: 284676
* Don't produce an error for undefined entry symbol.Rafael Espindola2016-09-201-4/+3
| | | | | | | | | | This is particularly important when the symbol comes from a linker script. It is common to use the same linker script for shared libraries and executables. Without this we would always fail to link shared libraries with -z,defs and a linker script with an ENTRY directive. llvm-svn: 281989
* Redirect stderr to /dev/null. NFC.Rafael Espindola2016-09-201-6/+6
| | | | | | Makes the error output less confusing when this test fails. llvm-svn: 281985
* [ELF] Move linker script tests to a subdirectory. NFCI.Davide Italiano2016-07-241-0/+120
llvm-svn: 276582
OpenPOWER on IntegriCloud