diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-03-16 12:58:26 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-03-16 12:58:26 +0000 |
commit | 21be61f5885f889c05f0bc9c36125a68e4995810 (patch) | |
tree | e79dc6188b772e474de1647469f8214fff6a07a1 /gas/testsuite | |
parent | 9a6f1302f0f4e4d12ce8fb7197d4905480eeecaa (diff) | |
download | gdb-21be61f5885f889c05f0bc9c36125a68e4995810.zip gdb-21be61f5885f889c05f0bc9c36125a68e4995810.tar.gz gdb-21be61f5885f889c05f0bc9c36125a68e4995810.tar.bz2 |
Add --size-check=[error|warning].
gas/
2011-03-16 H.J. Lu <hongjiu.lu@intel.com>
* as.c (show_usage): Add --size-check=.
(parse_args): Add and handle OPTION_SIZE_CHECK.
* as.h (flag_size_check): New.
* config/obj-elf.c (elf_frob_symbol): Use as_bad to report
bad .size directive only for --size-check=error.
* doc/as.texinfo: Document --size-check=.
gas/testsuite/
2011-03-16 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/bad-size.d: New.
* gas/i386/bad-size.s: Likewise.
* gas/i386/bad-size.warn: Likewise.
* gas/i386/i386.exp: Run bad-size for ELF targets.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/bad-size.d | 18 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/bad-size.s | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/bad-size.warn | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 2 |
5 files changed, 36 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 2ec9fdb..6634781 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2011-03-16 H.J. Lu <hongjiu.lu@intel.com> + + * gas/i386/bad-size.d: New. + * gas/i386/bad-size.s: Likewise. + * gas/i386/bad-size.warn: Likewise. + + * gas/i386/i386.exp: Run bad-size for ELF targets. + 2011-03-06 H.J. Lu <hongjiu.lu@intel.com> * gas/elf/bad-size.err: Revert the last change. diff --git a/gas/testsuite/gas/i386/bad-size.d b/gas/testsuite/gas/i386/bad-size.d new file mode 100644 index 0000000..0bcf381 --- /dev/null +++ b/gas/testsuite/gas/i386/bad-size.d @@ -0,0 +1,18 @@ +#as: --size-check=warning +#objdump: -dw +#name: Check bad size directive +#error-output: bad-size.warn + +.*: +file format .* + + +Disassembly of section .text: + +0+ <_test_nop>: +[ ]*[a-f0-9]+: 90 nop + +Disassembly of section .text.entry.continue: + +0+ <.text.entry.continue>: +[ ]*[a-f0-9]+: 90 nop +#pass diff --git a/gas/testsuite/gas/i386/bad-size.s b/gas/testsuite/gas/i386/bad-size.s new file mode 100644 index 0000000..6e02eef --- /dev/null +++ b/gas/testsuite/gas/i386/bad-size.s @@ -0,0 +1,6 @@ + .text +_test_nop: + nop + .section .text.entry.continue, "xa" + nop + .size _test_nop, .-_test_nop diff --git a/gas/testsuite/gas/i386/bad-size.warn b/gas/testsuite/gas/i386/bad-size.warn new file mode 100644 index 0000000..149b3c0 --- /dev/null +++ b/gas/testsuite/gas/i386/bad-size.warn @@ -0,0 +1,2 @@ +.*bad-size\.s: Assembler messages: +.*bad-size\.s:6: Warning: .* diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 306da65..ea5cdac 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -228,6 +228,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_dump_test "debug1" run_dump_test "dw2-compress-2" + + run_dump_test "bad-size" } # This is a PE specific test. |