Browse Source
There is no need to generate x86 ISA properties with empty bits in linker output. bfd/ PR ld/23372 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86 ISA properties with empty bits. ld/ PR ld/23372 * testsuite/ld-i386/i386.exp: Run pr23372a and pr23372b. * testsuite/ld-i386/pr23372a.d: New file. * testsuite/ld-i386/pr23372a.s: Likewise. * testsuite/ld-i386/pr23372b.d: Likewise. * testsuite/ld-i386/pr23372b.s: Likewise. * testsuite/ld-i386/pr23372c.s: Likewise. * testsuite/ld-x86-64/pr23372a-x32.d: Likewise. * testsuite/ld-x86-64/pr23372a.d: Likewise. * testsuite/ld-x86-64/pr23372a.s: Likewise. * testsuite/ld-x86-64/pr23372b-x32.d: Likewise. * testsuite/ld-x86-64/pr23372b.d: Likewise. * testsuite/ld-x86-64/pr23372b.s: Likewise. * testsuite/ld-x86-64/pr23372c.s: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run pr23372a, pr23372a-x32, pr23372b and pr23372b-x32.users/ahayward/variable_sve
17 changed files with 230 additions and 4 deletions
@ -0,0 +1,5 @@ |
|||
#source: pr23372a.s |
|||
#source: pr23372b.s |
|||
#as: --32 |
|||
#ld: -r -m elf_i386 |
|||
#readelf: -n |
|||
@ -0,0 +1,18 @@ |
|||
.section ".note.gnu.property", "a" |
|||
.p2align 2 |
|||
.long 1f - 0f /* name length. */ |
|||
.long 4f - 1f /* data length. */ |
|||
/* NT_GNU_PROPERTY_TYPE_0 */ |
|||
.long 5 /* note type. */ |
|||
0: |
|||
.asciz "GNU" /* vendor name. */ |
|||
1: |
|||
.p2align 2 |
|||
/* GNU_PROPERTY_X86_ISA_1_USED */ |
|||
.long 0xc0000000 /* pr_type. */ |
|||
.long 3f - 2f /* pr_datasz. */ |
|||
2: |
|||
.long 0x0 |
|||
3: |
|||
.p2align 2 |
|||
4: |
|||
@ -0,0 +1,5 @@ |
|||
#source: pr23372a.s |
|||
#source: pr23372c.s |
|||
#as: --32 |
|||
#ld: -r -m elf_i386 |
|||
#readelf: -n |
|||
@ -0,0 +1,18 @@ |
|||
.section ".note.gnu.property", "a" |
|||
.p2align 2 |
|||
.long 1f - 0f /* name length. */ |
|||
.long 4f - 1f /* data length. */ |
|||
/* NT_GNU_PROPERTY_TYPE_0 */ |
|||
.long 5 /* note type. */ |
|||
0: |
|||
.asciz "GNU" /* vendor name. */ |
|||
1: |
|||
.p2align 2 |
|||
/* GNU_PROPERTY_X86_ISA_1_USED */ |
|||
.long 0xc0000000 /* pr_type. */ |
|||
.long 3f - 2f /* pr_datasz. */ |
|||
2: |
|||
.long 0x0 |
|||
3: |
|||
.p2align 2 |
|||
4: |
|||
@ -0,0 +1,18 @@ |
|||
.section ".note.gnu.property", "a" |
|||
.p2align 2 |
|||
.long 1f - 0f /* name length. */ |
|||
.long 4f - 1f /* data length. */ |
|||
/* NT_GNU_PROPERTY_TYPE_0 */ |
|||
.long 5 /* note type. */ |
|||
0: |
|||
.asciz "GNU" /* vendor name. */ |
|||
1: |
|||
.p2align 2 |
|||
/* GNU_PROPERTY_X86_ISA_1_NEEDED */ |
|||
.long 0xc0000001 /* pr_type. */ |
|||
.long 3f - 2f /* pr_datasz. */ |
|||
2: |
|||
.long 0x0 |
|||
3: |
|||
.p2align 2 |
|||
4: |
|||
@ -0,0 +1,5 @@ |
|||
#source: pr23372a.s |
|||
#source: pr23372b.s |
|||
#as: --x32 |
|||
#ld: -r -m elf32_x86_64 |
|||
#readelf: -n |
|||
@ -0,0 +1,5 @@ |
|||
#source: pr23372a.s |
|||
#source: pr23372b.s |
|||
#as: --64 -defsym __64_bit__=1 |
|||
#ld: -r -m elf_x86_64 |
|||
#readelf: -n |
|||
@ -0,0 +1,30 @@ |
|||
.section ".note.gnu.property", "a" |
|||
.ifdef __64_bit__ |
|||
.p2align 3 |
|||
.else |
|||
.p2align 2 |
|||
.endif |
|||
.long 1f - 0f /* name length. */ |
|||
.long 4f - 1f /* data length. */ |
|||
/* NT_GNU_PROPERTY_TYPE_0 */ |
|||
.long 5 /* note type. */ |
|||
0: |
|||
.asciz "GNU" /* vendor name. */ |
|||
1: |
|||
.ifdef __64_bit__ |
|||
.p2align 3 |
|||
.else |
|||
.p2align 2 |
|||
.endif |
|||
/* GNU_PROPERTY_X86_ISA_1_USED */ |
|||
.long 0xc0000000 /* pr_type. */ |
|||
.long 3f - 2f /* pr_datasz. */ |
|||
2: |
|||
.long 0x0 |
|||
3: |
|||
.ifdef __64_bit__ |
|||
.p2align 3 |
|||
.else |
|||
.p2align 2 |
|||
.endif |
|||
4: |
|||
@ -0,0 +1,5 @@ |
|||
#source: pr23372a.s |
|||
#source: pr23372c.s |
|||
#as: --x32 |
|||
#ld: -r -m elf32_x86_64 |
|||
#readelf: -n |
|||
@ -0,0 +1,5 @@ |
|||
#source: pr23372a.s |
|||
#source: pr23372c.s |
|||
#as: --64 -defsym __64_bit__=1 |
|||
#ld: -r -m elf_x86_64 |
|||
#readelf: -n |
|||
@ -0,0 +1,30 @@ |
|||
.section ".note.gnu.property", "a" |
|||
.ifdef __64_bit__ |
|||
.p2align 3 |
|||
.else |
|||
.p2align 2 |
|||
.endif |
|||
.long 1f - 0f /* name length. */ |
|||
.long 4f - 1f /* data length. */ |
|||
/* NT_GNU_PROPERTY_TYPE_0 */ |
|||
.long 5 /* note type. */ |
|||
0: |
|||
.asciz "GNU" /* vendor name. */ |
|||
1: |
|||
.ifdef __64_bit__ |
|||
.p2align 3 |
|||
.else |
|||
.p2align 2 |
|||
.endif |
|||
/* GNU_PROPERTY_X86_ISA_1_USED */ |
|||
.long 0xc0000000 /* pr_type. */ |
|||
.long 3f - 2f /* pr_datasz. */ |
|||
2: |
|||
.long 0x0 |
|||
3: |
|||
.ifdef __64_bit__ |
|||
.p2align 3 |
|||
.else |
|||
.p2align 2 |
|||
.endif |
|||
4: |
|||
@ -0,0 +1,30 @@ |
|||
.section ".note.gnu.property", "a" |
|||
.ifdef __64_bit__ |
|||
.p2align 3 |
|||
.else |
|||
.p2align 2 |
|||
.endif |
|||
.long 1f - 0f /* name length. */ |
|||
.long 4f - 1f /* data length. */ |
|||
/* NT_GNU_PROPERTY_TYPE_0 */ |
|||
.long 5 /* note type. */ |
|||
0: |
|||
.asciz "GNU" /* vendor name. */ |
|||
1: |
|||
.ifdef __64_bit__ |
|||
.p2align 3 |
|||
.else |
|||
.p2align 2 |
|||
.endif |
|||
/* GNU_PROPERTY_X86_ISA_1_NEEDED */ |
|||
.long 0xc0000001 /* pr_type. */ |
|||
.long 3f - 2f /* pr_datasz. */ |
|||
2: |
|||
.long 0x0 |
|||
3: |
|||
.ifdef __64_bit__ |
|||
.p2align 3 |
|||
.else |
|||
.p2align 2 |
|||
.endif |
|||
4: |
|||
Loading…
Reference in new issue