aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2023-11-01 13:51:17 +0000
committerNick Clifton <nickc@redhat.com>2023-11-01 13:51:17 +0000
commit85921e9a2588bf4820b827fc1630f5d7da22cb1c (patch)
treefb6aeb7e8af93f947d5930d90cfcc3e41812e4d7 /ld/ldlang.h
parentf514e6e48061661cacfc980cd5272fd99887d38b (diff)
downloadgdb-85921e9a2588bf4820b827fc1630f5d7da22cb1c.zip
gdb-85921e9a2588bf4820b827fc1630f5d7da22cb1c.tar.gz
gdb-85921e9a2588bf4820b827fc1630f5d7da22cb1c.tar.bz2
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.
Diffstat (limited to 'ld/ldlang.h')
-rw-r--r--ld/ldlang.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/ld/ldlang.h b/ld/ldlang.h
index 463cce3..63749ea 100644
--- a/ld/ldlang.h
+++ b/ld/ldlang.h
@@ -390,18 +390,19 @@ typedef struct lang_section_bst
struct lang_wild_statement_struct
{
- lang_statement_header_type header;
- const char *filename;
- bool filenames_sorted;
- bool any_specs_sorted;
- struct wildcard_list *section_list;
- bool keep_sections;
- lang_statement_list_type children;
- struct name_list *exclude_name_list;
- lang_statement_list_type matching_sections;
-
- lang_section_bst_type *tree, **rightmost;
- struct flag_info *section_flag_list;
+ lang_statement_header_type header;
+ lang_statement_list_type children;
+ lang_statement_list_type matching_sections;
+ lang_section_bst_type * tree;
+ lang_section_bst_type ** rightmost;
+ struct wildcard_list * section_list;
+ struct name_list * exclude_name_list;
+ struct flag_info * section_flag_list;
+ const char * filename;
+ bool filenames_sorted;
+ bool filenames_reversed;
+ bool any_specs_sorted;
+ bool keep_sections;
};
typedef struct lang_address_statement_struct