extern void
script_end_as_needed(void* closure);
+/* Called by the bison parser to parse an OPTION. */
+extern void
+script_parse_option(void* closure, const char*);
+
#ifdef __cplusplus
}
#endif
{ "NOLOAD", NOLOAD },
{ "ONLY_IF_RO", ONLY_IF_RO },
{ "ONLY_IF_RW", ONLY_IF_RW },
+ { "OPTION", OPTION },
{ "ORIGIN", ORIGIN },
{ "OUTPUT", OUTPUT },
{ "OUTPUT_ARCH", OUTPUT_ARCH },
Parser_closure* closure = static_cast<Parser_closure*>(closurev);
closure->position_dependent_options().clear_as_needed();
}
+
+// Called by the bison parser to parse an OPTION.
+
+extern "C" void
+script_parse_option(void* closurev, const char* option)
+{
+ Parser_closure* closure = static_cast<Parser_closure*>(closurev);
+ printf("%s: Saw option %s\n", closure->filename(), option); //!!
+}
%token TRUNCATE
%token VERSIONK /* VERSION */
+/* Keywords, part 2. These are keywords that are unique to gold,
+ and not present in the old GNU linker. As before, unless the
+ comments say otherwise, the keyword is recognized as the token
+ name in upper case. */
+
+%token OPTION
+
%%
file_list:
{ script_start_group(closure); }
'(' input_list ')'
{ script_end_group(closure); }
+ | OPTION '(' STRING ')'
+ { script_parse_option(closure, $3); }
;
input_list: