diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2019-03-13 14:38:15 +0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2019-03-13 14:38:29 +0800 |
commit | 44b27f959abf267fc9ec228f4131c932597b01d4 (patch) | |
tree | a678750a291412005272a2d770452a15f69f33dc /ld/testsuite/ld-i386 | |
parent | 204f543cae7a5dc908264b49d558191d0ceb989c (diff) | |
download | gdb-44b27f959abf267fc9ec228f4131c932597b01d4.zip gdb-44b27f959abf267fc9ec228f4131c932597b01d4.tar.gz gdb-44b27f959abf267fc9ec228f4131c932597b01d4.tar.bz2 |
x86: Properly set IBT and SHSTK properties for -z ibt/shstk
There should be no AND properties if some input doesn't have them. We
should set IBT and SHSTK properties for -z ibt and -z shstk if needed.
bfd/
PR ld/24322
* elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
ld/
PR ld/24322
* testsuite/ld-i386/i386.exp: Run PR ld/24322 tests.
* testsuite/ld-x86-64/x86-64.exp: Likewise.
* testsuite/ld-i386/pr24322a.d: New file.
* testsuite/ld-i386/pr24322b.d: Likewise.
* testsuite/ld-x86-64/pr24322a-x32.d: Likewise.
* testsuite/ld-x86-64/pr24322a.d: Likewise.
* testsuite/ld-x86-64/pr24322b-x32.d: Likewise.
* testsuite/ld-x86-64/pr24322b.d: Likewise.
* testsuite/ld-x86-64/pr24322a.s: Likewise.
* testsuite/ld-x86-64/pr24322b.s: Likewise.
* testsuite/ld-x86-64/pr24322c.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-i386')
-rw-r--r-- | ld/testsuite/ld-i386/i386.exp | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr24322a.d | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr24322b.d | 12 |
3 files changed, 26 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index e51a4c3..1a1a750 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -483,6 +483,8 @@ run_dump_test "pr23486c" run_dump_test "pr23486d" run_dump_test "pr23854" run_dump_test "pr23930" +run_dump_test "pr24322a" +run_dump_test "pr24322b" if { !([istarget "i?86-*-linux*"] || [istarget "i?86-*-gnu*"] diff --git a/ld/testsuite/ld-i386/pr24322a.d b/ld/testsuite/ld-i386/pr24322a.d new file mode 100644 index 0000000..a00ace3 --- /dev/null +++ b/ld/testsuite/ld-i386/pr24322a.d @@ -0,0 +1,12 @@ +#source: ../ld-x86-64/pr24322a.s +#source: ../ld-x86-64/pr24322b.s +#as: --32 -mx86-used-note=yes +#ld: -z shstk -m elf_i386 +#readelf: -n + +Displaying notes found in: .note.gnu.property + Owner Data size Description + GNU 0x00000024 NT_GNU_PROPERTY_TYPE_0 + Properties: x86 feature: SHSTK + x86 ISA used: <None> + x86 feature used: x86 diff --git a/ld/testsuite/ld-i386/pr24322b.d b/ld/testsuite/ld-i386/pr24322b.d new file mode 100644 index 0000000..8c66096 --- /dev/null +++ b/ld/testsuite/ld-i386/pr24322b.d @@ -0,0 +1,12 @@ +#source: ../ld-x86-64/pr24322c.s +#source: ../ld-x86-64/pr24322b.s +#as: --32 -mx86-used-note=yes +#ld: -z shstk -m elf_i386 +#readelf: -n + +Displaying notes found in: .note.gnu.property + Owner Data size Description + GNU 0x00000024 NT_GNU_PROPERTY_TYPE_0 + Properties: x86 feature: SHSTK + x86 ISA used: <None> + x86 feature used: x86 |