diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-08-11 06:41:33 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-08-11 06:41:33 -0700 |
commit | ab9e342807d132182892de1be1a92d6e91a5c1da (patch) | |
tree | d32c6022a8a8bc94e13c72470e6ddaacd6aced8c /ld | |
parent | 1dc9e2d63e37839ff1768346b2e3f52e338baba5 (diff) | |
download | gdb-ab9e342807d132182892de1be1a92d6e91a5c1da.zip gdb-ab9e342807d132182892de1be1a92d6e91a5c1da.tar.gz gdb-ab9e342807d132182892de1be1a92d6e91a5c1da.tar.bz2 |
x86: Properly add X86_ISA_1_NEEDED property
Existing properties may be removed during property merging. We avoid
adding X86_ISA_1_NEEDED property only if existing properties won't be
removed.
bfd/
PR ld/23428
* elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
add X86_ISA_1_NEEDED property only if existing properties won't
be removed.
ld/
PR ld/23428
* testsuite/ld-elf/dummy.s: New file.
* testsuite/ld-elf/linux-x86.S: Add X86_FEATURE_1_AND property.
* testsuite/ld-elf/linux-x86.exp: Add dummy.s to pr23428.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/dummy.s | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/linux-x86.S | 28 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/linux-x86.exp | 2 |
4 files changed, 37 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 78d371e..79b8912 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2018-08-11 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/23428 + * testsuite/ld-elf/dummy.s: New file. + * testsuite/ld-elf/linux-x86.S: Add X86_FEATURE_1_AND property. + * testsuite/ld-elf/linux-x86.exp: Add dummy.s to pr23428. + 2018-08-08 H.J. Lu <hongjiu.lu@intel.com> PR ld/23486 diff --git a/ld/testsuite/ld-elf/dummy.s b/ld/testsuite/ld-elf/dummy.s new file mode 100644 index 0000000..403f980 --- /dev/null +++ b/ld/testsuite/ld-elf/dummy.s @@ -0,0 +1 @@ +# Dummy diff --git a/ld/testsuite/ld-elf/linux-x86.S b/ld/testsuite/ld-elf/linux-x86.S index bdf40c6..d94abc1 100644 --- a/ld/testsuite/ld-elf/linux-x86.S +++ b/ld/testsuite/ld-elf/linux-x86.S @@ -61,3 +61,31 @@ syscall: ret /* Return to caller. */ .size syscall, .-syscall .section .note.GNU-stack,"",@progbits + + .section ".note.gnu.property", "a" +#ifdef __LP64__ + .p2align 3 +#else + .p2align 2 +#endif + .long 1f - 0f /* name length */ + .long 5f - 2f /* data length */ + .long 5 /* note type */ +0: .asciz "GNU" /* vendor name */ +1: +#ifdef __LP64__ + .p2align 3 +#else + .p2align 2 +#endif +2: .long 0xc0000002 /* pr_type. */ + .long 4f - 3f /* pr_datasz. */ +3: + .long 0x2 +4: +#ifdef __LP64__ + .p2align 3 +#else + .p2align 2 +#endif +5: diff --git a/ld/testsuite/ld-elf/linux-x86.exp b/ld/testsuite/ld-elf/linux-x86.exp index 36217c6..f6f5a80 100644 --- a/ld/testsuite/ld-elf/linux-x86.exp +++ b/ld/testsuite/ld-elf/linux-x86.exp @@ -37,7 +37,7 @@ run_ld_link_exec_tests [list \ "Run PR ld/23428 test" \ "--no-dynamic-linker -z separate-code" \ "" \ - { linux-x86.S pr23428.c } \ + { linux-x86.S pr23428.c dummy.s } \ "pr23428" \ "pass.out" \ "$NOPIE_CFLAGS -fno-asynchronous-unwind-tables" \ |