From f8f6f1e78352fd437771f97fe6cf740fbd921ecf Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Fri, 18 Nov 2016 07:03:56 +0000 Subject: [PATCH] Update comment. llvm-svn: 287325 --- lld/ELF/LinkerScript.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 9500d01..a9a5a0b 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -1304,12 +1304,17 @@ std::vector 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. +// +// ::= +// | "(" ")" +// | "(" "(" ")" ")" +// +// ::= "SORT" | "SORT_BY_NAME" | "SORT_BY_ALIGNMENT" +// | "SORT_BY_INIT_PRIORITY" | "SORT_NONE" +// +// is parsed by readInputSectionsList(). InputSectionDescription * ScriptParser::readInputSectionRules(StringRef FilePattern) { auto *Cmd = new InputSectionDescription(FilePattern); -- 2.7.4