diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-11-18 07:03:56 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-11-18 07:03:56 +0000 |
| commit | f8f6f1e78352fd437771f97fe6cf740fbd921ecf (patch) | |
| tree | c539fbbe6f168aa575b77fb93df653f40362744e | |
| parent | 009d1742297c75be13426cfd8703a9aebca70494 (diff) | |
| download | bcm5719-llvm-f8f6f1e78352fd437771f97fe6cf740fbd921ecf.tar.gz bcm5719-llvm-f8f6f1e78352fd437771f97fe6cf740fbd921ecf.zip | |
Update comment.
llvm-svn: 287325
| -rw-r--r-- | lld/ELF/LinkerScript.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 9500d01bf36..a9a5a0b36ce 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -1304,12 +1304,17 @@ std::vector<SectionPattern> ScriptParser::readInputSectionsList() { return Ret; } -// Section pattern grammar can have complex expressions, for example: -// *(SORT(.foo.* EXCLUDE_FILE (*file1.o) .bar.*) .bar.* SORT(.zed.*)) -// Generally is a sequence of globs and excludes that may be wrapped in a SORT() -// commands, like: SORT(glob0) glob1 glob2 SORT(glob4) -// This methods handles wrapping sequences of excluded files and section globs -// into SORT() if that needed and reads them all. +// Reads contents of "SECTIONS" directive. That directive contains a +// list of glob patterns for input sections. The grammar is as follows. +// +// <patterns> ::= <section-list> +// | <sort> "(" <section-list> ")" +// | <sort> "(" <sort> "(" <section-list> ")" ")" +// +// <sort> ::= "SORT" | "SORT_BY_NAME" | "SORT_BY_ALIGNMENT" +// | "SORT_BY_INIT_PRIORITY" | "SORT_NONE" +// +// <section-list> is parsed by readInputSectionsList(). InputSectionDescription * ScriptParser::readInputSectionRules(StringRef FilePattern) { auto *Cmd = new InputSectionDescription(FilePattern); |

