aboutsummaryrefslogtreecommitdiff
path: root/GnuLdLexer.g4
diff options
context:
space:
mode:
Diffstat (limited to 'GnuLdLexer.g4')
-rw-r--r--GnuLdLexer.g43
1 files changed, 2 insertions, 1 deletions
diff --git a/GnuLdLexer.g4 b/GnuLdLexer.g4
index 16c4a9e..eb6090f 100644
--- a/GnuLdLexer.g4
+++ b/GnuLdLexer.g4
@@ -131,6 +131,7 @@ SIZEOF_HEADERS : 'SIZEOF_HEADERS';
SIZEOF : 'SIZEOF';
SORT_BY_ALIGNMENT : 'SORT_BY_ALIGNMENT';
SORT_BY_INIT_PRIORITY : 'SORT_BY_INIT_PRIORITY';
+SORT : 'SORT';
SORT_BY_NAME : 'SORT_BY_NAME';
SORT_NONE : 'SORT_NONE';
SPECIAL : 'SPECIAL';
@@ -159,7 +160,7 @@ QUOTE : '"' -> skip, pushMode(STRING);
// | NAME # namePlain;
//NAME : [\._a-zA-Z][\._a-zA-Z0-9]*;
-NAME : [*\._a-zA-Z][*\.\/_a-zA-Z0-9]*;
+NAME : [*\._a-zA-Z][*\.\/_a-zA-Z0-9]* | '/DISCARD/';
// TODO: ld supports some really fancy expressions here, like "0101010b", "ffH", "ffx", "$Aa" etc
//INT : '0x' [0-9a-fA-F]+