diff options
author | Daniel Jacobowitz <drow@false.org> | 2009-07-31 18:14:07 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2009-07-31 18:14:07 +0000 |
commit | cd000bffb245795be23f4a024481dc192d30cae7 (patch) | |
tree | 5a44720c83799855bcb7c2945bf59c91bf87ac0a /gas/testsuite | |
parent | 79d0a52d5db573cf4c24606f97008d8fd359a494 (diff) | |
download | gdb-cd000bffb245795be23f4a024481dc192d30cae7.zip gdb-cd000bffb245795be23f4a024481dc192d30cae7.tar.gz gdb-cd000bffb245795be23f4a024481dc192d30cae7.tar.bz2 |
binutils/testsuite/
* binutils-all/arm/thumb2-cond.s: Use instructions instead of
.short.
gas/
* config/obj-elf.c (obj_elf_ident): Notify section change to the hook.
* config/tc-arm.c (make_mapping_symbol): New function, from
mapping_state. Save mapping symbols in the frag.
(insert_data_mapping_symbol): New.
(mapping_state): Use make_mapping_symbol, improve state transitions.
(mapping_state_2): New. Provide dummy definition.
(opcode_select): Do not call mapping_state.
(s_bss): Call md_elf_section_change_hook instead of mapping_state.
(output_inst): Update use of tc_frag_data.
(new_automatic_it_block): Call mapping_state before emitting the
IT instruction.
(md_assemble): Move mapping_state to just before outputting the
new instruction.
(arm_handle_align): Update use of tc_frag_data.
Call insert_data_mapping_symbol.
(arm_init_frag): Update use of tc_frag_data. Call
mapping_state_2.
(arm_elf_change_section): Always update the mapping symbol FSM state.
(check_mapping_symbols): New function.
(arm_adjust_symtab): Use check_mapping_symbols.
* config/tc-arm.h (struct arm_frag_type): New.
(TC_FRAG_TYPE): Change to struct arm_frag_type.
(TC_FRAG_INIT): Pass max_chars.
(arm_init_frag): Update prototype.
gas/testsuite/
* gas/arm/mapdir.d, gas/arm/mapdir.s: New files.
* gas/arm/mapping.d: Adapted to new symbols generation.
* gas/arm/mapping2.d: New test case.
* gas/arm/mapping2.s: New file.
* gas/arm/mapping3.d: New test case.
* gas/arm/mapping3.s: New file.
* gas/arm/mapping4.d: New test case.
* gas/arm/mapping4.s: New file.
* gas/arm/mapshort-eabi.d: Adapted to new symbols generation.
* gas/elf/section2.e-armeabi: Adapted to new symbols generation.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/insn-error-a.d | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/insn-error-a.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/insn-error-a.s | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/insn-error-t.d | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/insn-error-t.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/insn-error-t.s | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mapdir.d | 35 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mapdir.s | 23 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mapping.d | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mapping2.d | 19 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mapping2.s | 19 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mapping3.d | 16 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mapping3.s | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mapping4.d | 15 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mapping4.s | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mapshort-eabi.d | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/section2.e-armeabi | 5 |
18 files changed, 183 insertions, 5 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index ebe6b7e..4ab5e72 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,17 @@ +2009-07-15 Daniel Gutson <dgutson@codesourcery.com> + Daniel Jacobowitz <dan@codesourcery.com> + + * gas/arm/mapdir.d, gas/arm/mapdir.s: New files. + * gas/arm/mapping.d: Adapted to new symbols generation. + * gas/arm/mapping2.d: New test case. + * gas/arm/mapping2.s: New file. + * gas/arm/mapping3.d: New test case. + * gas/arm/mapping3.s: New file. + * gas/arm/mapping4.d: New test case. + * gas/arm/mapping4.s: New file. + * gas/arm/mapshort-eabi.d: Adapted to new symbols generation. + * gas/elf/section2.e-armeabi: Adapted to new symbols generation. + 2009-07-27 Jan Beulich <jbeulich@novell.com> * gas/elf/file.[ds]: New. diff --git a/gas/testsuite/gas/arm/insn-error-a.d b/gas/testsuite/gas/arm/insn-error-a.d new file mode 100644 index 0000000..d3b492a --- /dev/null +++ b/gas/testsuite/gas/arm/insn-error-a.d @@ -0,0 +1,6 @@ +# Check that changing arm -> thumb state immediately +# after an invalid instruction does not cause an internal error. +#name: invalid instruction recovery test - ARM version +#objdump: -d --prefix-addresses --show-raw-insn +#skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* +#error-output: insn-error-a.l diff --git a/gas/testsuite/gas/arm/insn-error-a.l b/gas/testsuite/gas/arm/insn-error-a.l new file mode 100644 index 0000000..ce9ca19 --- /dev/null +++ b/gas/testsuite/gas/arm/insn-error-a.l @@ -0,0 +1,2 @@ +[^:]*: Assembler messages: +[^:]*:4: Error: ARM register expected -- `movne r33,r9' diff --git a/gas/testsuite/gas/arm/insn-error-a.s b/gas/testsuite/gas/arm/insn-error-a.s new file mode 100644 index 0000000..9a8359d --- /dev/null +++ b/gas/testsuite/gas/arm/insn-error-a.s @@ -0,0 +1,6 @@ +.syntax unified +.arch armv7a +.arm +movne r33,r9 +.thumb + diff --git a/gas/testsuite/gas/arm/insn-error-t.d b/gas/testsuite/gas/arm/insn-error-t.d new file mode 100644 index 0000000..01b3ad0 --- /dev/null +++ b/gas/testsuite/gas/arm/insn-error-t.d @@ -0,0 +1,6 @@ +# Check that changing thumb -> arm state immediately +# after an invalid instruction does not cause an internal error. +#name: invalid instruction recovery test - Thumb version +#objdump: -d --prefix-addresses --show-raw-insn +#skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* +#error-output: insn-error-t.l diff --git a/gas/testsuite/gas/arm/insn-error-t.l b/gas/testsuite/gas/arm/insn-error-t.l new file mode 100644 index 0000000..b3727e0 --- /dev/null +++ b/gas/testsuite/gas/arm/insn-error-t.l @@ -0,0 +1,2 @@ +[^:]*: Assembler messages: +[^:]*:4: Error: thumb conditional instruction should be in IT block -- `movne r1,r9' diff --git a/gas/testsuite/gas/arm/insn-error-t.s b/gas/testsuite/gas/arm/insn-error-t.s new file mode 100644 index 0000000..1d01138 --- /dev/null +++ b/gas/testsuite/gas/arm/insn-error-t.s @@ -0,0 +1,6 @@ +.syntax unified +.arch armv7a +.thumb +movne r1,r9 +.arm + diff --git a/gas/testsuite/gas/arm/mapdir.d b/gas/testsuite/gas/arm/mapdir.d new file mode 100644 index 0000000..549fe94 --- /dev/null +++ b/gas/testsuite/gas/arm/mapdir.d @@ -0,0 +1,35 @@ +#as: -EL -I$srcdir/$subdir +#objdump: --syms --special-syms -d +#name: ARM Mapping Symbols for .arm/.thumb +# This test is only valid on EABI based ports. +#target: *-*-*eabi *-*-symbianelf *-*-linux-* *-*-elf +#source: mapdir.s + + +.*: +file format .*arm.* + +SYMBOL TABLE: +0+00 l d .text 00000000 .text +0+00 l d .data 00000000 .data +0+00 l d .bss 00000000 .bss +0+00 l d .fini_array 00000000 .fini_array +0+00 l .fini_array 00000000 \$d +0+00 l O .fini_array 00000000 __do_global_dtors_aux_fini_array_entry +0+00 l d .code 00000000 .code +0+00 l .code 00000000 \$a +0+00 l d .tcode 00000000 .tcode +0+00 l .tcode 00000000 \$t +0+00 l d .ARM.attributes 00000000 .ARM.attributes +0+00 \*UND\* 00000000 __do_global_dtors_aux + + + +Disassembly of section .code: + +00000000 <.code>: + 0: e1a00000 nop ; \(mov r0, r0\) + +Disassembly of section .tcode: + +00000000 <.tcode>: + 0: 46c0 nop ; \(mov r8, r8\) diff --git a/gas/testsuite/gas/arm/mapdir.s b/gas/testsuite/gas/arm/mapdir.s new file mode 100644 index 0000000..7260dd0 --- /dev/null +++ b/gas/testsuite/gas/arm/mapdir.s @@ -0,0 +1,23 @@ +# Test that .arm / .thumb do not cause mapping symbols to be +# generated. This could lead to duplicate mapping symbols at +# the same address. + + .section .fini_array,"aw",%fini_array + .thumb + .align 2 + .type __do_global_dtors_aux_fini_array_entry, %object +__do_global_dtors_aux_fini_array_entry: + .word __do_global_dtors_aux + + .section .code,"ax",%progbits + .thumb + .arm + nop + +# .bss should not automatically emit $d. + .bss + +# Make sure that mapping symbols are placed in the correct section. + .thumb + .section .tcode,"ax",%progbits + nop diff --git a/gas/testsuite/gas/arm/mapping.d b/gas/testsuite/gas/arm/mapping.d index e6db1a9..c4819d2 100644 --- a/gas/testsuite/gas/arm/mapping.d +++ b/gas/testsuite/gas/arm/mapping.d @@ -13,7 +13,6 @@ SYMBOL TABLE: 0+00 l d .bss 0+0 (|.bss) 0+00 l .text 0+0 \$a 0+08 l .text 0+0 \$t -0+00 l .data 0+0 \$d 0+00 l d foo 0+0 (|foo) 0+00 l foo 0+0 \$t #Maybe section symbol for .ARM.attributes diff --git a/gas/testsuite/gas/arm/mapping2.d b/gas/testsuite/gas/arm/mapping2.d new file mode 100644 index 0000000..42b300d --- /dev/null +++ b/gas/testsuite/gas/arm/mapping2.d @@ -0,0 +1,19 @@ +#objdump: --syms --special-syms +#name: ARM Mapping Symbols Test 2 +# This test is only valid on ELF based ports. +#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* + +.*: +file format.*arm.* + +SYMBOL TABLE: +00000000 l d .text 00000000 .text +00000000 l d .data 00000000 .data +00000000 l d .bss 00000000 .bss +00000000 l .text 00000000 \$t +00000002 l .text 00000000 foo +00000000 l d .note 00000000 .note +00000000 l d .comment 00000000 .comment +00000000 l d .ARM.attributes 00000000 .ARM.attributes +00000000 g F .text 00000008 main + + diff --git a/gas/testsuite/gas/arm/mapping2.s b/gas/testsuite/gas/arm/mapping2.s new file mode 100644 index 0000000..adcadc4 --- /dev/null +++ b/gas/testsuite/gas/arm/mapping2.s @@ -0,0 +1,19 @@ + .syntax unified + .arch armv7-a + .fpu softvfp + .version "dfg" + .thumb + .text + .align 2 + .global main + .thumb + .thumb_func + .type main, %function +main: + push {r4, lr} +foo: + pop {r4, lr} + bx lr + .size main, .-main + .ident "" + diff --git a/gas/testsuite/gas/arm/mapping3.d b/gas/testsuite/gas/arm/mapping3.d new file mode 100644 index 0000000..2c70a72 --- /dev/null +++ b/gas/testsuite/gas/arm/mapping3.d @@ -0,0 +1,16 @@ +#objdump: --syms --special-syms +#name: ARM Mapping Symbols Test 3 +# This test is only valid on ELF based ports. +#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* + +.*: +file format.*arm.* + +SYMBOL TABLE: +00000000 l d .text 00000000 .text +00000000 l d .data 00000000 .data +00000000 l d .bss 00000000 .bss +00000000 l .text 00000000 \$d +00000004 l .text 00000000 \$a +00000000 l d .ARM.attributes 00000000 .ARM.attributes + + diff --git a/gas/testsuite/gas/arm/mapping3.s b/gas/testsuite/gas/arm/mapping3.s new file mode 100644 index 0000000..9ee9bb4 --- /dev/null +++ b/gas/testsuite/gas/arm/mapping3.s @@ -0,0 +1,5 @@ + .syntax unified + .arch armv7-a +.text +.word 0 + nop diff --git a/gas/testsuite/gas/arm/mapping4.d b/gas/testsuite/gas/arm/mapping4.d new file mode 100644 index 0000000..2d82a1a --- /dev/null +++ b/gas/testsuite/gas/arm/mapping4.d @@ -0,0 +1,15 @@ +#objdump: --syms --special-syms +#name: ARM Mapping Symbols Test 4 +# This test is only valid on ELF based ports. +#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* + +.*: +file format.*arm.* + +SYMBOL TABLE: +00000000 l d .text 00000000 .text +00000000 l d .data 00000000 .data +00000000 l d .bss 00000000 .bss +00000000 l .text 00000000 \$a +00000000 l d .ARM.attributes 00000000 .ARM.attributes + + diff --git a/gas/testsuite/gas/arm/mapping4.s b/gas/testsuite/gas/arm/mapping4.s new file mode 100644 index 0000000..8a24a4a --- /dev/null +++ b/gas/testsuite/gas/arm/mapping4.s @@ -0,0 +1,7 @@ + .text + nop + .data + .word 0 + .text + nop + diff --git a/gas/testsuite/gas/arm/mapshort-eabi.d b/gas/testsuite/gas/arm/mapshort-eabi.d index 4bcc0e1..1f920d3 100644 --- a/gas/testsuite/gas/arm/mapshort-eabi.d +++ b/gas/testsuite/gas/arm/mapshort-eabi.d @@ -22,7 +22,6 @@ SYMBOL TABLE: 0+1c l .text 00000000 \$d 0+1f l .text 00000000 bar 0+00 l .data 00000000 wibble -0+00 l .data 00000000 \$d 0+00 l d .ARM.attributes 00000000 .ARM.attributes diff --git a/gas/testsuite/gas/elf/section2.e-armeabi b/gas/testsuite/gas/elf/section2.e-armeabi index 44ecffc..84463b1 100644 --- a/gas/testsuite/gas/elf/section2.e-armeabi +++ b/gas/testsuite/gas/elf/section2.e-armeabi @@ -1,10 +1,9 @@ -Symbol table '.symtab' contains 7 entries: +Symbol table '.symtab' contains 6 entries: Num: Value[ ]* Size Type Bind Vis Ndx Name 0: 0+0 0 NOTYPE LOCAL DEFAULT UND 1: 0+0 0 SECTION LOCAL DEFAULT 1 2: 0+0 0 SECTION LOCAL DEFAULT 2 3: 0+0 0 SECTION LOCAL DEFAULT 3 4: 0+0 0 SECTION LOCAL DEFAULT 4 - 5: 0+0 0 NOTYPE LOCAL DEFAULT 4 \$d - 6: 0+0 0 SECTION LOCAL DEFAULT 5 + 5: 0+0 0 SECTION LOCAL DEFAULT 5 |