Browse Source
Verify that debug section is removed by garbage collection when there is a .note.gnu.property section. * testsuite/ld-i386/i386.exp: Run property-x86-4a and property-x86-4b. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-i386/property-x86-4a.d: New file. * testsuite/ld-i386/property-x86-4a.s: Likewise. * testsuite/ld-i386/property-x86-4b.d: Likewise. * testsuite/ld-i386/property-x86-4b.s: Likewise. * testsuite/ld-x86-64/property-x86-4a.d: Likewise. * testsuite/ld-x86-64/property-x86-4a.s: Likewise. * testsuite/ld-x86-64/property-x86-4b.d: Likewise. * testsuite/ld-x86-64/property-x86-4b.s: Likewise.binutils-2_29-branch
11 changed files with 108 additions and 0 deletions
@ -0,0 +1,10 @@ |
|||
#source: property-x86-4a.s |
|||
#source: property-x86-4b.s |
|||
#as: --32 |
|||
#ld: -m elf_i386 --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 |
|||
@ -0,0 +1,5 @@ |
|||
.text |
|||
.globl main |
|||
.type main, @function |
|||
main: |
|||
ret |
|||
@ -0,0 +1,10 @@ |
|||
#source: property-x86-4a.s |
|||
#source: property-x86-4b.s |
|||
#as: --32 |
|||
#ld: -m elf_i386 --gc-sections --entry=main |
|||
#readelf: -S --wide |
|||
|
|||
#failif |
|||
#... |
|||
+\[ [0-9]\] .debug_info.* |
|||
#... |
|||
@ -0,0 +1,20 @@ |
|||
.section .debug_info,"",@progbits |
|||
.hidden t.c.4903c230 |
|||
.globl t.c.4903c230 |
|||
t.c.4903c230: |
|||
.byte 0x28 |
|||
|
|||
.section ".note.gnu.property", "a" |
|||
.p2align 2 |
|||
.long 1f - 0f /* name length. */ |
|||
.long 3f - 2f /* data length. */ |
|||
/* NT_GNU_PROPERTY_TYPE_0 */ |
|||
.long 5 /* note type. */ |
|||
0: .asciz "GNU" /* vendor name. */ |
|||
1: .p2align 2 |
|||
2: |
|||
/* GNU_PROPERTY_NO_COPY_ON_PROTECTED */ |
|||
.long 2 /* pr_type. */ |
|||
.long 0 /* pr_datasz. */ |
|||
.p2align 2 |
|||
3: |
|||
@ -0,0 +1,10 @@ |
|||
#source: property-x86-4a.s |
|||
#source: property-x86-4b.s |
|||
#as: --64 |
|||
#ld: -m elf_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 |
|||
@ -0,0 +1,5 @@ |
|||
.text |
|||
.globl main |
|||
.type main, @function |
|||
main: |
|||
ret |
|||
@ -0,0 +1,10 @@ |
|||
#source: property-x86-4a.s |
|||
#source: property-x86-4b.s |
|||
#as: --64 |
|||
#ld: -m elf_x86_64 --gc-sections --entry=main |
|||
#readelf: -S --wide |
|||
|
|||
#failif |
|||
#... |
|||
+\[ [0-9]\] .debug_info.* |
|||
#... |
|||
@ -0,0 +1,20 @@ |
|||
.section .debug_info,"",@progbits |
|||
.hidden t.c.4903c230 |
|||
.globl t.c.4903c230 |
|||
t.c.4903c230: |
|||
.byte 0x28 |
|||
|
|||
.section ".note.gnu.property", "a" |
|||
.p2align 3 |
|||
.long 1f - 0f /* name length. */ |
|||
.long 3f - 2f /* data length. */ |
|||
/* NT_GNU_PROPERTY_TYPE_0 */ |
|||
.long 5 /* note type. */ |
|||
0: .asciz "GNU" /* vendor name. */ |
|||
1: .p2align 3 |
|||
2: |
|||
/* GNU_PROPERTY_NO_COPY_ON_PROTECTED */ |
|||
.long 2 /* pr_type. */ |
|||
.long 0 /* pr_datasz. */ |
|||
.p2align 3 |
|||
3: |
|||
Loading…
Reference in new issue