diff options
author | Ian Lance Taylor <iant@google.com> | 2008-01-07 05:19:02 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2008-01-07 05:19:02 +0000 |
commit | 2dd3e587bdab39d73086c35be60399e096d48b46 (patch) | |
tree | e2b7630d5eceec2576855673cf33948b62a18caf /gold/yyscript.y | |
parent | d4e917ea7f50bef2b4f15c1c83aac2a7f58e42e7 (diff) | |
download | gdb-2dd3e587bdab39d73086c35be60399e096d48b46.zip gdb-2dd3e587bdab39d73086c35be60399e096d48b46.tar.gz gdb-2dd3e587bdab39d73086c35be60399e096d48b46.tar.bz2 |
Report linker script errors with line numbers. Ignore OUTPUT_FORMAT
with three arguments, and ignore OUTPUT_ARCH.
Diffstat (limited to 'gold/yyscript.y')
-rw-r--r-- | gold/yyscript.y | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gold/yyscript.y b/gold/yyscript.y index 7cfe724..513241b 100644 --- a/gold/yyscript.y +++ b/gold/yyscript.y @@ -168,14 +168,24 @@ file_list: /* A command which may appear at top level of a linker script. */ file_cmd: - OUTPUT_FORMAT '(' STRING ')' - | GROUP + GROUP { script_start_group(closure); } '(' input_list ')' { script_end_group(closure); } | OPTION '(' STRING ')' { script_parse_option(closure, $3); } | file_or_sections_cmd + | ignore_cmd + ; + +/* Top level commands which we ignore. The GNU linker uses these to + select the output format, but we don't offer a choice. Ignoring + these is more-or-less OK since most scripts simply explicitly + choose the default. */ +ignore_cmd: + OUTPUT_FORMAT '(' STRING ')' + | OUTPUT_FORMAT '(' STRING ',' STRING ',' STRING ')' + | OUTPUT_ARCH '(' STRING ')' ; /* A list of input file names. */ |