From 2b94abd48aef2d91bae1c35c8c10ebfb8757247d Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Fri, 28 Jul 2017 13:01:10 +0100 Subject: Make some improvements to how SORT_* specifiers and EXCLUDE_FILE specifiers are handled in the linker script grammar. * ldgram.y (ldgram_had_keep): Make static. (ldgram_vers_current_lang): Likewise. (filename_spec): New rule. (input_section_spec_no_keep): Use filename_spec. (wildcard_maybe_exclude): New rule. (wildcard_spec): Rename to... (section_name_spec): ...this. (section_NAME_list): Rename to... (section_name_list): ...this. (section_name_spec): Simplifiy and use wildcard_maybe_exclude. * ldlang.c (placed_commons): Delete. (lang_add_wild): No longer set placed_commons. (print_wild_statement): Use full names for SORT specifiers. * testsuite/ld-scripts/align.exp: Run new tests. * testsuite/ld-scripts/align3.d: New file. * testsuite/ld-scripts/align3.t: New file. * testsuite/ld-scripts/align4.d: New file. * testsuite/ld-scripts/align4.t: New file. * testsuite/ld-scripts/align5.d: New file. * testsuite/ld-scripts/align5.t: New file. * testsuite/ld-scripts/exclude-file-5.d: New file. * testsuite/ld-scripts/exclude-file-5.map: New file. * testsuite/ld-scripts/exclude-file-5.t: New file. * testsuite/ld-scripts/exclude-file-6.d: New file. * testsuite/ld-scripts/exclude-file-6.map: New file. * testsuite/ld-scripts/exclude-file-6.t: New file. * NEWS: Mention the changes. --- ld/testsuite/ld-scripts/align4.t | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 ld/testsuite/ld-scripts/align4.t (limited to 'ld/testsuite/ld-scripts/align4.t') diff --git a/ld/testsuite/ld-scripts/align4.t b/ld/testsuite/ld-scripts/align4.t new file mode 100644 index 0000000..fc80905 --- /dev/null +++ b/ld/testsuite/ld-scripts/align4.t @@ -0,0 +1,10 @@ +SECTIONS +{ + .text : { + SORT_BY_INIT_PRIORITY (*) (.text .text.*) + } + + .data : { + SORT_BY_INIT_PRIORITY (*) (.data .data.*) + } +} \ No newline at end of file -- cgit v1.1