[ELF] Implement parsing `-l` prefixed items in the `GROUP` linker script command.
authorSimon Atanasyan <simon@atanasyan.com>
Tue, 15 Jul 2014 17:17:30 +0000 (17:17 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Tue, 15 Jul 2014 17:17:30 +0000 (17:17 +0000)
commit64c0ac2b35df65e38c966089f9a7ab9075bf7f58
treec2093bee27114d037493703dc539241db0ab021e
parentbc94c94be40d289948b4043fe4d973295061e484
[ELF] Implement parsing `-l` prefixed items in the `GROUP` linker script command.
There are two forms of `-l` prefixed expression:

* -l<libname>
* -l:<filename>

In the first case a linker should construct a full library name
`lib + libname + .[so|a]` and search this library as usual. In the second case
a linker should use the `<filename>` as is and search this file through library
search directories.

The patch reviewed by Shankar Easwaran.

llvm-svn: 213077
lld/include/lld/ReaderWriter/LinkerScript.h
lld/lib/Driver/GnuLdInputGraph.cpp
lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
lld/lib/ReaderWriter/LinkerScript.cpp
lld/test/LinkerScript/libname-err-1.test [new file with mode: 0644]
lld/test/LinkerScript/libname-err-2.test [new file with mode: 0644]
lld/test/LinkerScript/linker-script.test
lld/test/elf/Inputs/group-cmd-search-3.ls [new file with mode: 0644]
lld/test/elf/group-cmd-search.test