[ELF] Support archive:file syntax in input section descriptions
authorFangrui Song <maskray@google.com>
Tue, 25 Feb 2020 05:52:47 +0000 (21:52 -0800)
committerFangrui Song <maskray@google.com>
Tue, 25 Feb 2020 15:57:43 +0000 (07:57 -0800)
commit93331a17e8b3d6205efc8f1d4e7a74523f3b7035
treed97fc8f33eb20e60a9260b723b17f3fb2860284b
parente6d0bad843c4c84bb762cf93a56c5bdd5cc535c0
[ELF] Support archive:file syntax in input section descriptions

Fixes https://bugs.llvm.org/show_bug.cgi?id=44450

https://sourceware.org/binutils/docs/ld/Input-Section-Basics.html#Input-Section-Basics
The following two rules are not implemented.

* `archive:` matches every file in the archive.
* `:file` matches a file not in an archive.

Reviewed By: grimar, ruiu

Differential Revision: https://reviews.llvm.org/D75100
lld/ELF/LinkerScript.cpp
lld/test/ELF/linkerscript/input-archive.s [new file with mode: 0644]