From 8f3bae45202d47cc88273b0060a458841cd46282 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 16 Sep 2010 23:55:10 +0000 Subject: PR gas/12011 * config/obj-elf.c (obj_elf_parse_section_letters): Correct test for error return from md_elf_section_letter. * config/tc-alpha.c (alpha_elf_section_letter): Correct error message. * config/tc-i386.c (x86_64_section_letter): Likewise. * config/tc-ia64.c (ia64_elf_section_letter): Likewise. * config/tc-mep.c (mep_elf_section_letter): Likewise. * gas/elf/bad-section-flag.d, * gas/elf/bad-section-flag.err, * gas/elf/bad-section-flag.s: New test. * gas/elf/elf.exp: Run it. --- gas/testsuite/ChangeLog | 7 +++++++ gas/testsuite/gas/elf/bad-section-flag.d | 2 ++ gas/testsuite/gas/elf/bad-section-flag.err | 2 ++ gas/testsuite/gas/elf/bad-section-flag.s | 1 + gas/testsuite/gas/elf/elf.exp | 1 + 5 files changed, 13 insertions(+) create mode 100644 gas/testsuite/gas/elf/bad-section-flag.d create mode 100644 gas/testsuite/gas/elf/bad-section-flag.err create mode 100644 gas/testsuite/gas/elf/bad-section-flag.s (limited to 'gas/testsuite') diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 976dff4..2bd1bec 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2010-09-17 Andrew Burgess + + PR gas/12011 + * gas/elf/bad-section-flag.d, * gas/elf/bad-section-flag.err, + * gas/elf/bad-section-flag.s: New test. + * gas/elf/elf.exp: Run it. + 2010-09-16 Alan Modra * gas/all/redef3.d: Don't run on arc. diff --git a/gas/testsuite/gas/elf/bad-section-flag.d b/gas/testsuite/gas/elf/bad-section-flag.d new file mode 100644 index 0000000..98cbac8 --- /dev/null +++ b/gas/testsuite/gas/elf/bad-section-flag.d @@ -0,0 +1,2 @@ +#name: Check bad section flag +#error-output: bad-section-flag.err diff --git a/gas/testsuite/gas/elf/bad-section-flag.err b/gas/testsuite/gas/elf/bad-section-flag.err new file mode 100644 index 0000000..0af9b69 --- /dev/null +++ b/gas/testsuite/gas/elf/bad-section-flag.err @@ -0,0 +1,2 @@ +.*bad-section-flag\.s: Assembler messages: +.*bad-section-flag\.s:1: Fatal error: .* diff --git a/gas/testsuite/gas/elf/bad-section-flag.s b/gas/testsuite/gas/elf/bad-section-flag.s new file mode 100644 index 0000000..35496bd --- /dev/null +++ b/gas/testsuite/gas/elf/bad-section-flag.s @@ -0,0 +1 @@ + .section ".rodata", "z~&q" diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp index 04f2749..e6f5f05 100644 --- a/gas/testsuite/gas/elf/elf.exp +++ b/gas/testsuite/gas/elf/elf.exp @@ -167,4 +167,5 @@ if { ([istarget "*-*-*elf*"] run_dump_test "dwarf2-1" run_dump_test "dwarf2-2" run_dump_test "dwarf2-3" + run_dump_test "bad-section-flag" } -- cgit v1.1