mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 00:59:15 +08:00
as: Reject unknown -gXXX option
* as.c (parse_args): Reject unknown -gXXX option. * testsuite/gas/all/empty.s: New file. * testsuite/gas/all/pr29067.d: Likewise. * testsuite/gas/all/pr29067.err: Likewise. * testsuite/gas/all/gas.exp: Run pr29067.
This commit is contained in:
2
gas/as.c
2
gas/as.c
@ -836,6 +836,8 @@ This program has absolutely no warranty.\n"));
|
|||||||
versions/sections/options. */
|
versions/sections/options. */
|
||||||
if (startswith (old_argv[optind - 1], "-gdwarf"))
|
if (startswith (old_argv[optind - 1], "-gdwarf"))
|
||||||
as_fatal (_("unknown DWARF option %s\n"), old_argv[optind - 1]);
|
as_fatal (_("unknown DWARF option %s\n"), old_argv[optind - 1]);
|
||||||
|
else if (old_argv[optind - 1][1] == 'g' && optarg != NULL)
|
||||||
|
as_fatal (_("unknown option `%s'"), old_argv[optind - 1]);
|
||||||
|
|
||||||
if (md_debug_format_selector)
|
if (md_debug_format_selector)
|
||||||
debug_type = md_debug_format_selector (& use_gnu_debug_info_extensions);
|
debug_type = md_debug_format_selector (& use_gnu_debug_info_extensions);
|
||||||
|
1
gas/testsuite/gas/all/empty.s
Normal file
1
gas/testsuite/gas/all/empty.s
Normal file
@ -0,0 +1 @@
|
|||||||
|
/* Empty input. */
|
@ -506,3 +506,4 @@ run_dump_test "pr27384"
|
|||||||
run_dump_test "pr27381"
|
run_dump_test "pr27381"
|
||||||
run_dump_test "multibyte1"
|
run_dump_test "multibyte1"
|
||||||
run_dump_test "multibyte2"
|
run_dump_test "multibyte2"
|
||||||
|
run_dump_test "pr29067"
|
||||||
|
2
gas/testsuite/gas/all/pr29067.d
Normal file
2
gas/testsuite/gas/all/pr29067.d
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#as: -gsomething-not-already-a-long-option
|
||||||
|
#error_output: pr29067.err
|
2
gas/testsuite/gas/all/pr29067.err
Normal file
2
gas/testsuite/gas/all/pr29067.err
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Assembler messages:
|
||||||
|
Fatal error: unknown option `-gsomething-not-already-a-long-option'
|
Reference in New Issue
Block a user