diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2014-06-13 12:38:00 -0700 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2014-06-13 12:38:00 -0700 |
commit | 54f1b3cf509cd889905287cb8ce6c5ae33911a21 (patch) | |
tree | e39b1a7fa04db86a8215b7f9d4656d74e394aec0 /binutils-2.25/binutils/testsuite/binutils-all/i386 | |
parent | 2a6558a8ecfb81d75215b4ec7dc61113e12cfd5f (diff) | |
download | toolchain_binutils-54f1b3cf509cd889905287cb8ce6c5ae33911a21.tar.gz toolchain_binutils-54f1b3cf509cd889905287cb8ce6c5ae33911a21.tar.bz2 toolchain_binutils-54f1b3cf509cd889905287cb8ce6c5ae33911a21.zip |
Add upstream binutils-2.25 snapshot 4/4 2014
For MIPS -mmsa support
Change-Id: I08c4f002fa7b33dec85ed75956e6ab551bb03c96
Diffstat (limited to 'binutils-2.25/binutils/testsuite/binutils-all/i386')
5 files changed, 381 insertions, 0 deletions
diff --git a/binutils-2.25/binutils/testsuite/binutils-all/i386/compressed-1.s b/binutils-2.25/binutils/testsuite/binutils-all/i386/compressed-1.s new file mode 100644 index 00000000..54c6d993 --- /dev/null +++ b/binutils-2.25/binutils/testsuite/binutils-all/i386/compressed-1.s @@ -0,0 +1,147 @@ + .file "compressed-1.c" + .section .debug_abbrev,"",@progbits +.Ldebug_abbrev0: + .section .debug_info,"",@progbits +.Ldebug_info0: + .section .debug_line,"",@progbits +.Ldebug_line0: + .text +.Ltext0: + .cfi_sections .debug_frame + .p2align 4,,15 +.globl foo2 + .type foo2, @function +foo2: +.LFB1: + .file 1 "compressed-1.c" + .loc 1 11 0 + .cfi_startproc + .loc 1 12 0 + rep + ret + .cfi_endproc +.LFE1: + .size foo2, .-foo2 + .p2align 4,,15 +.globl foo1 + .type foo1, @function +foo1: +.LFB0: + .loc 1 5 0 + .cfi_startproc + subl $12, %esp + .cfi_def_cfa_offset 16 + .loc 1 7 0 + addl $12, %esp + .cfi_def_cfa_offset 4 + .loc 1 6 0 + jmp bar + .cfi_endproc +.LFE0: + .size foo1, .-foo1 +.Letext0: + .section .debug_info + .long 0x46 + .value 0x3 + .long .Ldebug_abbrev0 + .byte 0x4 + .uleb128 0x1 + .long .LASF2 + .byte 0x1 + .long .LASF3 + .long .LASF4 + .long .Ltext0 + .long .Letext0 + .long .Ldebug_line0 + .uleb128 0x2 + .byte 0x1 + .long .LASF0 + .byte 0x1 + .byte 0xa + .long .LFB1 + .long .LFE1 + .byte 0x1 + .byte 0x9c + .uleb128 0x2 + .byte 0x1 + .long .LASF1 + .byte 0x1 + .byte 0x4 + .long .LFB0 + .long .LFE0 + .byte 0x1 + .byte 0x9c + .byte 0x0 + .section .debug_abbrev + .uleb128 0x1 + .uleb128 0x11 + .byte 0x1 + .uleb128 0x25 + .uleb128 0xe + .uleb128 0x13 + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x1b + .uleb128 0xe + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x1 + .uleb128 0x10 + .uleb128 0x6 + .byte 0x0 + .byte 0x0 + .uleb128 0x2 + .uleb128 0x2e + .byte 0x0 + .uleb128 0x3f + .uleb128 0xc + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x1 + .uleb128 0x40 + .uleb128 0xa + .byte 0x0 + .byte 0x0 + .byte 0x0 + .section .debug_pubnames,"",@progbits + .long 0x20 + .value 0x2 + .long .Ldebug_info0 + .long 0x4a + .long 0x25 + .string "foo2" + .long 0x37 + .string "foo1" + .long 0x0 + .section .debug_aranges,"",@progbits + .long 0x1c + .value 0x2 + .long .Ldebug_info0 + .byte 0x4 + .byte 0x0 + .value 0x0 + .value 0x0 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long 0x0 + .long 0x0 + .section .debug_str,"MS",@progbits,1 +.LASF2: + .string "GNU C 4.4.4" +.LASF0: + .string "foo2" +.LASF1: + .string "foo1" +.LASF4: + .string "." +.LASF3: + .string "compressed-1.c" diff --git a/binutils-2.25/binutils/testsuite/binutils-all/i386/compressed-1a.d b/binutils-2.25/binutils/testsuite/binutils-all/i386/compressed-1a.d new file mode 100644 index 00000000..f1883aa2 --- /dev/null +++ b/binutils-2.25/binutils/testsuite/binutils-all/i386/compressed-1a.d @@ -0,0 +1,160 @@ +#PROG: objcopy +#source: compressed-1.s +#as: --32 --compress-debug-sections +#objcopy: +#readelf: -w +#name: objcopy on compressed debug sections + +Contents of the .[z]?debug_abbrev section: + + Number TAG \(0x0\) + 1 DW_TAG_compile_unit \[has children\] + DW_AT_producer DW_FORM_strp + DW_AT_language DW_FORM_data1 + DW_AT_name DW_FORM_strp + DW_AT_comp_dir DW_FORM_strp + DW_AT_low_pc DW_FORM_addr + DW_AT_high_pc DW_FORM_addr + DW_AT_stmt_list DW_FORM_data4 + DW_AT value: 0 DW_FORM value: 0 + 2 DW_TAG_subprogram \[no children\] + DW_AT_external DW_FORM_flag + DW_AT_name DW_FORM_strp + DW_AT_decl_file DW_FORM_data1 + DW_AT_decl_line DW_FORM_data1 + DW_AT_low_pc DW_FORM_addr + DW_AT_high_pc DW_FORM_addr + DW_AT_frame_base DW_FORM_block1 + DW_AT value: 0 DW_FORM value: 0 + +Contents of the .[z]?debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x46 \(32-bit\) + Version: 3 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0><b>: Abbrev Number: 1 \(DW_TAG_compile_unit\) + <c> DW_AT_producer : \(indirect string, offset: 0x0\): GNU C 4.4.4 + <10> DW_AT_language : 1 \(ANSI C\) + <11> DW_AT_name : \(indirect string, offset: 0x18\): compressed-1.c + <15> DW_AT_comp_dir : \(indirect string, offset: 0x16\): . + <19> DW_AT_low_pc : 0x0 + <1d> DW_AT_high_pc : 0x1b + <21> DW_AT_stmt_list : 0x0 + <1><25>: Abbrev Number: 2 \(DW_TAG_subprogram\) + <26> DW_AT_external : 1 + <27> DW_AT_name : \(indirect string, offset: 0xc\): foo2 + <2b> DW_AT_decl_file : 1 + <2c> DW_AT_decl_line : 10 + <2d> DW_AT_low_pc : 0x0 + <31> DW_AT_high_pc : 0x2 + <35> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) + <1><37>: Abbrev Number: 2 \(DW_TAG_subprogram\) + <38> DW_AT_external : 1 + <39> DW_AT_name : \(indirect string, offset: 0x11\): foo1 + <3d> DW_AT_decl_file : 1 + <3e> DW_AT_decl_line : 4 + <3f> DW_AT_low_pc : 0x10 + <43> DW_AT_high_pc : 0x1b + <47> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) + <1><49>: Abbrev Number: 0 + +Raw dump of debug contents of section .[z]?debug_line: + + Offset: 0x0 + Length: 64 + DWARF Version: 2 + Prologue Length: 37 + Minimum Instruction Length: 1 + Initial value of 'is_stmt': 1 + Line Base: -5 + Line Range: 14 + Opcode Base: 13 + + Opcodes: + Opcode 1 has 0 args + Opcode 2 has 1 args + Opcode 3 has 1 args + Opcode 4 has 1 args + Opcode 5 has 1 args + Opcode 6 has 0 args + Opcode 7 has 0 args + Opcode 8 has 0 args + Opcode 9 has 1 args + Opcode 10 has 0 args + Opcode 11 has 0 args + Opcode 12 has 1 args + + The Directory Table is empty. + + The File Name Table \(offset 0x.*\): + Entry Dir Time Size Name + 1 0 0 0 compressed-1.c + + Line Number Statements: + \[0x.*\] Extended opcode 2: set Address to 0x0 + \[0x.*\] Advance Line by 10 to 11 + \[0x.*\] Copy + \[0x.*\] Special opcode 6: advance Address by 0 to 0x0 and Line by 1 to 12 + \[0x.*\] Advance Line by -7 to 5 + \[0x.*\] Special opcode 229: advance Address by 16 to 0x10 and Line by 0 to 5 + \[0x.*\] Special opcode 49: advance Address by 3 to 0x13 and Line by 2 to 7 + \[0x.*\] Special opcode 46: advance Address by 3 to 0x16 and Line by -1 to 6 + \[0x.*\] Advance PC by 5 to 0x1b + \[0x.*\] Extended opcode 1: End of Sequence + + +Contents of the .[z]?debug_pubnames section: + + Length: 32 + Version: 2 + Offset into .[z]?debug_info section: 0x0 + Size of area in .[z]?debug_info section: 74 + + Offset Name + 25 foo2 + 37 foo1 + +Contents of the .[z]?debug_aranges section: + + Length: 28 + Version: 2 + Offset into .[z]?debug_info: 0x0 + Pointer Size: 4 + Segment Size: 0 + + Address Length + 00000000 0000001b + 00000000 00000000 + +Contents of the .[z]?debug_str section: + + 0x00000000 474e5520 4320342e 342e3400 666f6f32 GNU C 4.4.4.foo2 + 0x00000010 00666f6f 31002e00 636f6d70 72657373 .foo1...compress + 0x00000020 65642d31 2e6300 ed-1.c. + +Contents of the .[z]?debug_frame section: + +00000000 00000010 ffffffff CIE + Version: 1 + Augmentation: "" + Code alignment factor: 1 + Data alignment factor: -4 + Return address column: 8 + + DW_CFA_def_cfa: r4 \(esp\) ofs 4 + DW_CFA_offset: r8 \(eip\) at cfa-4 + DW_CFA_nop + DW_CFA_nop + +00000014 0000000c 00000000 FDE cie=00000000 pc=00000000..00000002 + +00000024 00000014 00000000 FDE cie=00000000 pc=00000010..0000001b + DW_CFA_advance_loc: 3 to 00000013 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 3 to 00000016 + DW_CFA_def_cfa_offset: 4 + DW_CFA_nop + DW_CFA_nop + diff --git a/binutils-2.25/binutils/testsuite/binutils-all/i386/compressed-1b.d b/binutils-2.25/binutils/testsuite/binutils-all/i386/compressed-1b.d new file mode 100644 index 00000000..8cc9653e --- /dev/null +++ b/binutils-2.25/binutils/testsuite/binutils-all/i386/compressed-1b.d @@ -0,0 +1,18 @@ +#PROG: strip +#source: compressed-1.s +#as: --32 +#strip: +#readelf: -S --wide +#name: strip on uncompressed debug sections + +There are 5 section headers, starting at offset 0x78: + +Section Headers: + \[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al + \[ 0\] NULL 00000000 000000 000000 00 0 0 0 + \[ 1\] .text PROGBITS 00000000 000040 00001b 00 AX 0 0 16 + \[ 2\] .data PROGBITS 00000000 00005b 000000 00 WA 0 0 1 + \[ 3\] .bss NOBITS 00000000 00005b 000000 00 WA 0 0 1 + \[ 4\] .shstrtab STRTAB 00000000 00005b 00001c 00 0 0 1 +Key to Flags: +#... diff --git a/binutils-2.25/binutils/testsuite/binutils-all/i386/compressed-1c.d b/binutils-2.25/binutils/testsuite/binutils-all/i386/compressed-1c.d new file mode 100644 index 00000000..f05380fc --- /dev/null +++ b/binutils-2.25/binutils/testsuite/binutils-all/i386/compressed-1c.d @@ -0,0 +1,18 @@ +#PROG: strip +#source: compressed-1.s +#as: --32 --compress-debug-sections +#strip: +#readelf: -S --wide +#name: strip on compressed debug sections + +There are 5 section headers, starting at offset 0x78: + +Section Headers: + \[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al + \[ 0\] NULL 00000000 000000 000000 00 0 0 0 + \[ 1\] .text PROGBITS 00000000 000040 00001b 00 AX 0 0 16 + \[ 2\] .data PROGBITS 00000000 00005b 000000 00 WA 0 0 1 + \[ 3\] .bss NOBITS 00000000 00005b 000000 00 WA 0 0 1 + \[ 4\] .shstrtab STRTAB 00000000 00005b 00001c 00 0 0 1 +Key to Flags: +#... diff --git a/binutils-2.25/binutils/testsuite/binutils-all/i386/i386.exp b/binutils-2.25/binutils/testsuite/binutils-all/i386/i386.exp new file mode 100644 index 00000000..4b9fffdc --- /dev/null +++ b/binutils-2.25/binutils/testsuite/binutils-all/i386/i386.exp @@ -0,0 +1,38 @@ +# Copyright 2010, 2012 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + +if {!([istarget "i*86-*-linux*"] + || [istarget "i*86-*-gnu*"] + || [istarget "i*86-*-nacl*"] + || [istarget "x86_64-*-linux*"] + || [istarget "x86_64-*-nacl*"]) + || ![is_elf_format] + || [is_remote host]} then { + return +} + +global tempfile +global copyfile +set tempfile tmpdir/i386temp.o +set copyfile tmpdir/i386copy + +set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]] +foreach t $test_list { + # We need to strip the ".d", but can leave the dirname. + verbose [file rootname $t] + run_dump_test [file rootname $t] +} |