+ $$ = $3;
+ $$.sorted = by_none;
+ }
+ ;
+
+section_name_spec:
+ wildcard_maybe_exclude
+ | SORT_BY_NAME '(' wildcard_maybe_exclude ')'
+ {
+ $$ = $3;
+ $$.sorted = by_name;
+ }
+ | SORT_BY_ALIGNMENT '(' wildcard_maybe_exclude ')'
+ {
+ $$ = $3;
+ $$.sorted = by_alignment;
+ }
+ | SORT_NONE '(' wildcard_maybe_exclude ')'
+ {
+ $$ = $3;
+ $$.sorted = by_none;
+ }
+ | SORT_BY_NAME '(' SORT_BY_ALIGNMENT '(' wildcard_maybe_exclude ')' ')'
+ {
+ $$ = $5;
+ $$.sorted = by_name_alignment;
+ }
+ | SORT_BY_NAME '(' SORT_BY_NAME '(' wildcard_maybe_exclude ')' ')'
+ {
+ $$ = $5;
+ $$.sorted = by_name;
+ }
+ | SORT_BY_ALIGNMENT '(' SORT_BY_NAME '(' wildcard_maybe_exclude ')' ')'
+ {
+ $$ = $5;
+ $$.sorted = by_alignment_name;
+ }
+ | SORT_BY_ALIGNMENT '(' SORT_BY_ALIGNMENT '(' wildcard_maybe_exclude ')' ')'
+ {
+ $$ = $5;
+ $$.sorted = by_alignment;
+ }
+ | SORT_BY_INIT_PRIORITY '(' wildcard_maybe_exclude ')'
+ {
+ $$ = $3;
+ $$.sorted = by_init_priority;
+ }
+ ;
+
+sect_flag_list: NAME
+ {
+ struct flag_info_list *n;
+ n = ((struct flag_info_list *) xmalloc (sizeof *n));
+ if ($1[0] == '!')
+ {
+ n->with = without_flags;
+ n->name = &$1[1];
+ }
+ else
+ {
+ n->with = with_flags;
+ n->name = $1;
+ }
+ n->valid = FALSE;
+ n->next = NULL;
+ $$ = n;
+ }
+ | sect_flag_list '&' NAME
+ {
+ struct flag_info_list *n;
+ n = ((struct flag_info_list *) xmalloc (sizeof *n));
+ if ($3[0] == '!')
+ {
+ n->with = without_flags;
+ n->name = &$3[1];
+ }
+ else
+ {
+ n->with = with_flags;
+ n->name = $3;
+ }
+ n->valid = FALSE;
+ n->next = $1;
+ $$ = n;
+ }
+ ;
+
+sect_flags:
+ INPUT_SECTION_FLAGS '(' sect_flag_list ')'
+ {
+ struct flag_info *n;
+ n = ((struct flag_info *) xmalloc (sizeof *n));
+ n->flag_list = $3;
+ n->flags_initialized = FALSE;
+ n->not_with_flags = 0;
+ n->only_with_flags = 0;
+ $$ = n;