mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-03-01 13:26:47 +08:00
PR 27565 * ldlex.l: Add REVERSE. * ldgram.y: Allow REVERSE to be used wherever a sorting command can be used. * ld.h (struct wildcard_spec): Add 'reversed' field. * ldlang.h (lang_wild_statement_struct): Add 'filenames_reversed' field. * ldlang.c (compare_sections): Add reversed parameter. (wild_sort): Reverse the comparison if requested. (print_wild_statement): Handle the reversed field. * ld.texi: Document the new feature. * NEWS: Mention the new feature. * testsuite/ld-scripts/sort-file-reversed-1.d: New test driver. * testsuite/ld-scripts/sort-file-reversed-1.t: New test source. * testsuite/ld-scripts/sort-file-reversed-2.t: New test source. * testsuite/ld-scripts/sort-file-reversed-2.d: New test driver. * testsuite/ld-scripts/sort-sections-reversed-1.d: New test driver. * testsuite/ld-scripts/sort-sections-reversed-1.t: New test source. * testsuite/ld-scripts/sort-sections-reversed-2.t: New test source. * testsuite/ld-scripts/sort-sections-reversed-2.d: New test driver. * testsuite/ld-scripts/sort-sections-reversed-3.d: New test driver. * testsuite/ld-scripts/sort-sections-reversed-3.t: New test source.
19 lines
437 B
Makefile
19 lines
437 B
Makefile
#source: sort-file1.s
|
|
#source: sort-file2.s
|
|
#ld: -T sort-file-reversed-1.t --no-warn-rwx-segments
|
|
#nm: -n
|
|
|
|
# Check that SORT_BY_NAME+REVERSE on filenames works.
|
|
# The text sections should come in reversed sorted order, the data
|
|
# sections in input order. Note how we specifically pass
|
|
# the object filenames in alphabetical order
|
|
#...
|
|
0[0-9a-f]* t infile2
|
|
#...
|
|
0[0-9a-f]* t infile1
|
|
#...
|
|
0[0-9a-f]* d data1
|
|
#...
|
|
0[0-9a-f]* d data2
|
|
#pass
|