diff options
author | Igor Kudrin <ikudrin@accesssoftek.com> | 2016-06-28 13:56:05 -0700 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2016-06-28 13:56:05 -0700 |
commit | f224a3c59068fc8060c261d329f54bdc7374d63a (patch) | |
tree | b7426a9f3f684eeaab4ed25c8545e670faf191fa /gold/yyscript.y | |
parent | 9abdce70ac7a3ee8f92285c314fa7728d3c1aa43 (diff) | |
download | gdb-f224a3c59068fc8060c261d329f54bdc7374d63a.zip gdb-f224a3c59068fc8060c261d329f54bdc7374d63a.tar.gz gdb-f224a3c59068fc8060c261d329f54bdc7374d63a.tar.bz2 |
Implement SORT_BY_INIT_PRIORITY.
2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
gold/
PR gold/18098
* script-c.h (Sort_wildcard): Add SORT_WILDCARD_BY_INIT_PRIORITY.
* script-sections.cc (Input_section_sorter::get_init_priority): New method.
(Input_section_sorter::operator()): Handle SORT_WILDCARD_BY_INIT_PRIORITY.
(Output_section_element_input::print): Likewise.
* script.cc (script_keyword_parsecodes): Add entry SORT_BY_INIT_PRIORITY.
* yyscript.y (SORT_BY_INIT_PRIORITY): New token.
(wildcard_section): Handle SORT_BY_INIT_PRIORITY.
* testsuite/Makefile.am (script_test_14): New test.
* testsuite/Makefile.in: Regenerate.
* testsuite/script_test_14.s: New test source file.
* testsuite/script_test_14.sh: New test script.
* testsuite/script_test_14.t: New test linker script.
Diffstat (limited to 'gold/yyscript.y')
-rw-r--r-- | gold/yyscript.y | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gold/yyscript.y b/gold/yyscript.y index 4f3fa50..7e6bd27 100644 --- a/gold/yyscript.y +++ b/gold/yyscript.y @@ -175,6 +175,7 @@ %token SIZEOF %token SIZEOF_HEADERS /* SIZEOF_HEADERS, sizeof_headers */ %token SORT_BY_ALIGNMENT +%token SORT_BY_INIT_PRIORITY %token SORT_BY_NAME %token SPECIAL %token SQUAD @@ -677,6 +678,11 @@ wildcard_section: abort(); } } + | SORT_BY_INIT_PRIORITY '(' wildcard_name ')' + { + $$.name = $3; + $$.sort = SORT_WILDCARD_BY_INIT_PRIORITY; + } ; /* A list of file names to exclude. */ |