[ELF] - Linkerscript: implemented filename specification.
Scripts can contain something like:
KEEP (*crtbegin.o(.ctors))
What means that "*crtbegin.o" is a wildcard of file to take the sections from.
This is some kind of opposite to EXCLUDE_FILE and used in FreeBSD script:
https://svnweb.freebsd.org/base/head/sys/conf/ldscript.amd64?revision=284870&view=markup#l122
Patch implements this.
Differential revision: https://reviews.llvm.org/D22852
llvm-svn: 277042
diff --git a/lld/ELF/LinkerScript.h b/lld/ELF/LinkerScript.h
index 103be68..5134888 100644
--- a/lld/ELF/LinkerScript.h
+++ b/lld/ELF/LinkerScript.h
@@ -84,8 +84,9 @@
struct InputSectionDescription : BaseCommand {
InputSectionDescription() : BaseCommand(InputSectionKind) {}
static bool classof(const BaseCommand *C);
+ StringRef FilePattern;
std::vector<StringRef> ExcludedFiles;
- std::vector<StringRef> Patterns;
+ std::vector<StringRef> SectionPatterns;
};
struct PhdrsCommand {