forked from Imagelibrary/binutils-gdb
ld: Support input section description keyword: REVERSE
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.
This commit is contained in:
13
ld/ld.h
13
ld/ld.h
@@ -96,11 +96,14 @@ extern sort_type sort_section;
|
||||
|
||||
struct wildcard_spec
|
||||
{
|
||||
const char *name;
|
||||
struct name_list *exclude_name_list;
|
||||
struct flag_info *section_flag_list;
|
||||
size_t namelen, prefixlen, suffixlen;
|
||||
sort_type sorted;
|
||||
const char * name;
|
||||
struct name_list * exclude_name_list;
|
||||
struct flag_info * section_flag_list;
|
||||
size_t namelen;
|
||||
size_t prefixlen;
|
||||
size_t suffixlen;
|
||||
sort_type sorted;
|
||||
bool reversed;
|
||||
};
|
||||
|
||||
struct wildcard_list
|
||||
|
||||
Reference in New Issue
Block a user