mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-18 03:27:52 +08:00
x86-64: Add some x32 ELF property tests
* testsuite/ld-x86-64/property-x86-3-x32.d: New file. * testsuite/ld-x86-64/property-x86-4a-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-4b-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-3.d: Also pass -defsym __64_bit__=1 to asssembler. * testsuite/ld-x86-64/property-x86-4a.d: Likewise. * testsuite/ld-x86-64/property-x86-4b.d: Likewise. * testsuite/ld-x86-64/property-x86-3.s: Align to 4 bytes if __64_bit__ isn't defined. * testsuite/ld-x86-64/property-x86-4a.s: Likewise. * testsuite/ld-x86-64/property-x86-4b.s: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run property-x86-3-x32, property-x86-4a-x32 and property-x86-4b-x32.
This commit is contained in:
16
ld/ChangeLog
16
ld/ChangeLog
@ -1,3 +1,19 @@
|
|||||||
|
2017-06-09 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* testsuite/ld-x86-64/property-x86-3-x32.d: New file.
|
||||||
|
* testsuite/ld-x86-64/property-x86-4a-x32.d: Likewise.
|
||||||
|
* testsuite/ld-x86-64/property-x86-4b-x32.d: Likewise.
|
||||||
|
* testsuite/ld-x86-64/property-x86-3.d: Also pass
|
||||||
|
-defsym __64_bit__=1 to asssembler.
|
||||||
|
* testsuite/ld-x86-64/property-x86-4a.d: Likewise.
|
||||||
|
* testsuite/ld-x86-64/property-x86-4b.d: Likewise.
|
||||||
|
* testsuite/ld-x86-64/property-x86-3.s: Align to 4 bytes if
|
||||||
|
__64_bit__ isn't defined.
|
||||||
|
* testsuite/ld-x86-64/property-x86-4a.s: Likewise.
|
||||||
|
* testsuite/ld-x86-64/property-x86-4b.s: Likewise.
|
||||||
|
* testsuite/ld-x86-64/x86-64.exp: Run property-x86-3-x32,
|
||||||
|
property-x86-4a-x32 and property-x86-4b-x32.
|
||||||
|
|
||||||
2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
|
2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
|
||||||
|
|
||||||
* testsuite/ld-arc/tls_ie-01.d: Changed expected result.
|
* testsuite/ld-arc/tls_ie-01.d: Changed expected result.
|
||||||
|
10
ld/testsuite/ld-x86-64/property-x86-3-x32.d
Normal file
10
ld/testsuite/ld-x86-64/property-x86-3-x32.d
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#source: property-x86-3.s
|
||||||
|
#as: --x32
|
||||||
|
#ld: -shared -m elf32_x86_64
|
||||||
|
#readelf: -n
|
||||||
|
|
||||||
|
Displaying notes found in: .note.gnu.property
|
||||||
|
Owner Data size Description
|
||||||
|
GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0
|
||||||
|
Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
|
||||||
|
x86 ISA needed: i486, 586, SSE2, SSE3
|
@ -1,4 +1,4 @@
|
|||||||
#as: --64
|
#as: --64 -defsym __64_bit__=1
|
||||||
#ld: -shared -m elf_x86_64
|
#ld: -shared -m elf_x86_64
|
||||||
#readelf: -n
|
#readelf: -n
|
||||||
|
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
.section ".note.gnu.property", "a"
|
.section ".note.gnu.property", "a"
|
||||||
|
.ifdef __64_bit__
|
||||||
.p2align 3
|
.p2align 3
|
||||||
|
.else
|
||||||
|
.p2align 2
|
||||||
|
.endif
|
||||||
.long 1f - 0f /* name length. */
|
.long 1f - 0f /* name length. */
|
||||||
.long 3f - 1f /* data length. */
|
.long 3f - 1f /* data length. */
|
||||||
/* NT_GNU_PROPERTY_TYPE_0 */
|
/* NT_GNU_PROPERTY_TYPE_0 */
|
||||||
@ -7,21 +11,33 @@
|
|||||||
0:
|
0:
|
||||||
.asciz "GNU" /* vendor name. */
|
.asciz "GNU" /* vendor name. */
|
||||||
1:
|
1:
|
||||||
|
.ifdef __64_bit__
|
||||||
.p2align 3
|
.p2align 3
|
||||||
|
.else
|
||||||
|
.p2align 2
|
||||||
|
.endif
|
||||||
/* GNU_PROPERTY_X86_ISA_1_USED */
|
/* GNU_PROPERTY_X86_ISA_1_USED */
|
||||||
.long 0xc0000000 /* pr_type. */
|
.long 0xc0000000 /* pr_type. */
|
||||||
.long 5f - 4f /* pr_datasz. */
|
.long 5f - 4f /* pr_datasz. */
|
||||||
4:
|
4:
|
||||||
.long 0xa
|
.long 0xa
|
||||||
5:
|
5:
|
||||||
|
.ifdef __64_bit__
|
||||||
.p2align 3
|
.p2align 3
|
||||||
|
.else
|
||||||
|
.p2align 2
|
||||||
|
.endif
|
||||||
/* GNU_PROPERTY_X86_ISA_1_NEEDED */
|
/* GNU_PROPERTY_X86_ISA_1_NEEDED */
|
||||||
.long 0xc0000001 /* pr_type. */
|
.long 0xc0000001 /* pr_type. */
|
||||||
.long 5f - 4f /* pr_datasz. */
|
.long 5f - 4f /* pr_datasz. */
|
||||||
4:
|
4:
|
||||||
.long 0x3
|
.long 0x3
|
||||||
5:
|
5:
|
||||||
|
.ifdef __64_bit__
|
||||||
.p2align 3
|
.p2align 3
|
||||||
|
.else
|
||||||
|
.p2align 2
|
||||||
|
.endif
|
||||||
3:
|
3:
|
||||||
|
|
||||||
.section ".note.gnu.property", "a"
|
.section ".note.gnu.property", "a"
|
||||||
@ -33,19 +49,31 @@
|
|||||||
0:
|
0:
|
||||||
.asciz "GNU" /* vendor name. */
|
.asciz "GNU" /* vendor name. */
|
||||||
1:
|
1:
|
||||||
|
.ifdef __64_bit__
|
||||||
.p2align 3
|
.p2align 3
|
||||||
|
.else
|
||||||
|
.p2align 2
|
||||||
|
.endif
|
||||||
/* GNU_PROPERTY_X86_ISA_1_USED */
|
/* GNU_PROPERTY_X86_ISA_1_USED */
|
||||||
.long 0xc0000000 /* pr_type. */
|
.long 0xc0000000 /* pr_type. */
|
||||||
.long 5f - 4f /* pr_datasz. */
|
.long 5f - 4f /* pr_datasz. */
|
||||||
4:
|
4:
|
||||||
.long 0xa0
|
.long 0xa0
|
||||||
5:
|
5:
|
||||||
|
.ifdef __64_bit__
|
||||||
.p2align 3
|
.p2align 3
|
||||||
|
.else
|
||||||
|
.p2align 2
|
||||||
|
.endif
|
||||||
/* GNU_PROPERTY_X86_ISA_1_NEEDED */
|
/* GNU_PROPERTY_X86_ISA_1_NEEDED */
|
||||||
.long 0xc0000001 /* pr_type. */
|
.long 0xc0000001 /* pr_type. */
|
||||||
.long 5f - 4f /* pr_datasz. */
|
.long 5f - 4f /* pr_datasz. */
|
||||||
4:
|
4:
|
||||||
.long 0x30
|
.long 0x30
|
||||||
5:
|
5:
|
||||||
|
.ifdef __64_bit__
|
||||||
.p2align 3
|
.p2align 3
|
||||||
|
.else
|
||||||
|
.p2align 2
|
||||||
|
.endif
|
||||||
3:
|
3:
|
||||||
|
10
ld/testsuite/ld-x86-64/property-x86-4a-x32.d
Normal file
10
ld/testsuite/ld-x86-64/property-x86-4a-x32.d
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#source: property-x86-4a.s
|
||||||
|
#source: property-x86-4b.s
|
||||||
|
#as: --x32
|
||||||
|
#ld: -m elf32_x86_64 --gc-sections --entry=main
|
||||||
|
#readelf: -n
|
||||||
|
|
||||||
|
Displaying notes found in: .note.gnu.property
|
||||||
|
Owner Data size Description
|
||||||
|
GNU 0x00000008 NT_GNU_PROPERTY_TYPE_0
|
||||||
|
Properties: no copy on protected
|
@ -1,6 +1,6 @@
|
|||||||
#source: property-x86-4a.s
|
#source: property-x86-4a.s
|
||||||
#source: property-x86-4b.s
|
#source: property-x86-4b.s
|
||||||
#as: --64
|
#as: --64 -defsym __64_bit__=1
|
||||||
#ld: -m elf_x86_64 --gc-sections --entry=main
|
#ld: -m elf_x86_64 --gc-sections --entry=main
|
||||||
#readelf: -n
|
#readelf: -n
|
||||||
|
|
||||||
|
10
ld/testsuite/ld-x86-64/property-x86-4b-x32.d
Normal file
10
ld/testsuite/ld-x86-64/property-x86-4b-x32.d
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#source: property-x86-4a.s
|
||||||
|
#source: property-x86-4b.s
|
||||||
|
#as: --x32
|
||||||
|
#ld: -m elf32_x86_64 --gc-sections --entry=main
|
||||||
|
#readelf: -S --wide
|
||||||
|
|
||||||
|
#failif
|
||||||
|
#...
|
||||||
|
+\[ [0-9]\] .debug_info.*
|
||||||
|
#...
|
@ -1,6 +1,6 @@
|
|||||||
#source: property-x86-4a.s
|
#source: property-x86-4a.s
|
||||||
#source: property-x86-4b.s
|
#source: property-x86-4b.s
|
||||||
#as: --64
|
#as: --64 -defsym __64_bit__=1
|
||||||
#ld: -m elf_x86_64 --gc-sections --entry=main
|
#ld: -m elf_x86_64 --gc-sections --entry=main
|
||||||
#readelf: -S --wide
|
#readelf: -S --wide
|
||||||
|
|
||||||
|
@ -5,16 +5,29 @@ t.c.4903c230:
|
|||||||
.byte 0x28
|
.byte 0x28
|
||||||
|
|
||||||
.section ".note.gnu.property", "a"
|
.section ".note.gnu.property", "a"
|
||||||
|
.ifdef __64_bit__
|
||||||
.p2align 3
|
.p2align 3
|
||||||
|
.else
|
||||||
|
.p2align 2
|
||||||
|
.endif
|
||||||
.long 1f - 0f /* name length. */
|
.long 1f - 0f /* name length. */
|
||||||
.long 3f - 2f /* data length. */
|
.long 3f - 2f /* data length. */
|
||||||
/* NT_GNU_PROPERTY_TYPE_0 */
|
/* NT_GNU_PROPERTY_TYPE_0 */
|
||||||
.long 5 /* note type. */
|
.long 5 /* note type. */
|
||||||
0: .asciz "GNU" /* vendor name. */
|
0: .asciz "GNU" /* vendor name. */
|
||||||
1: .p2align 3
|
1:
|
||||||
|
.ifdef __64_bit__
|
||||||
|
.p2align 3
|
||||||
|
.else
|
||||||
|
.p2align 2
|
||||||
|
.endif
|
||||||
2:
|
2:
|
||||||
/* GNU_PROPERTY_NO_COPY_ON_PROTECTED */
|
/* GNU_PROPERTY_NO_COPY_ON_PROTECTED */
|
||||||
.long 2 /* pr_type. */
|
.long 2 /* pr_type. */
|
||||||
.long 0 /* pr_datasz. */
|
.long 0 /* pr_datasz. */
|
||||||
|
.ifdef __64_bit__
|
||||||
.p2align 3
|
.p2align 3
|
||||||
|
.else
|
||||||
|
.p2align 2
|
||||||
|
.endif
|
||||||
3:
|
3:
|
||||||
|
@ -332,6 +332,9 @@ run_dump_test "pr20093-2"
|
|||||||
run_dump_test "property-x86-3"
|
run_dump_test "property-x86-3"
|
||||||
run_dump_test "property-x86-4a"
|
run_dump_test "property-x86-4a"
|
||||||
run_dump_test "property-x86-4b"
|
run_dump_test "property-x86-4b"
|
||||||
|
run_dump_test "property-x86-3-x32"
|
||||||
|
run_dump_test "property-x86-4a-x32"
|
||||||
|
run_dump_test "property-x86-4b-x32"
|
||||||
|
|
||||||
if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} {
|
if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} {
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user