aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-x86-64/ibt-plt-2a.d
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2018-08-17 03:54:05 -0700
committerH.J. Lu <hjl.tools@gmail.com>2018-08-17 03:54:16 -0700
commitbfb1e8c15a6b7d02cd0b9a124d01722a07ebf09a (patch)
treeca561553a9b38085c41dd850e2678b209c860c90 /ld/testsuite/ld-x86-64/ibt-plt-2a.d
parent2ecae92e2372102ac0fa774fce4c4c0d6f8c85f5 (diff)
downloadgdb-bfb1e8c15a6b7d02cd0b9a124d01722a07ebf09a.zip
gdb-bfb1e8c15a6b7d02cd0b9a124d01722a07ebf09a.tar.gz
gdb-bfb1e8c15a6b7d02cd0b9a124d01722a07ebf09a.tar.bz2
x86: Remove empty X86_FEATURE_1_AND property
There is no need to generate .note.gnu.property section with empty X86_FEATURE_1_AND property. This patch adds fixup_gnu_properties to ELF linker backend so that x86 backend can remove it. bfd/ PR ld/23515 * elf-bfd.h (elf_backend_data): Add fixup_gnu_properties. * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Call backend fixup_gnu_properties if it isn't NULL. Discard .note.gnu.property section if all properties have been removed. * elfxx-target.h (elf_backend_fixup_gnu_properties): New. (elfNN_bed): Initialize fixup_gnu_properties. * elfxx-x86.c (_bfd_x86_elf_link_fixup_gnu_properties): New function. * elfxx-x86.h (_bfd_x86_elf_link_fixup_gnu_properties): New prototype. (elf_backend_fixup_gnu_properties): New. ld/ PR ld/23515 * testsuite/ld-i386/ibt-plt-2a.d: Updated. * testsuite/ld-i386/ibt-plt-2b.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2a-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2a.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2b-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2b.d: Likewise.
Diffstat (limited to 'ld/testsuite/ld-x86-64/ibt-plt-2a.d')
-rw-r--r--ld/testsuite/ld-x86-64/ibt-plt-2a.d24
1 files changed, 12 insertions, 12 deletions
diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2a.d b/ld/testsuite/ld-x86-64/ibt-plt-2a.d
index 62d7783..0894354 100644
--- a/ld/testsuite/ld-x86-64/ibt-plt-2a.d
+++ b/ld/testsuite/ld-x86-64/ibt-plt-2a.d
@@ -8,36 +8,36 @@
Disassembly of section .plt:
-0+220 <.plt>:
- +[a-f0-9]+: ff 35 ea 01 20 00 pushq 0x2001ea\(%rip\) # 200410 <_GLOBAL_OFFSET_TABLE_\+0x8>
- +[a-f0-9]+: f2 ff 25 eb 01 20 00 bnd jmpq \*0x2001eb\(%rip\) # 200418 <_GLOBAL_OFFSET_TABLE_\+0x10>
+0+1f0 <.plt>:
+ +[a-f0-9]+: ff 35 ca 01 20 00 pushq 0x2001ca\(%rip\) # 2003c0 <_GLOBAL_OFFSET_TABLE_\+0x8>
+ +[a-f0-9]+: f2 ff 25 cb 01 20 00 bnd jmpq \*0x2001cb\(%rip\) # 2003c8 <_GLOBAL_OFFSET_TABLE_\+0x10>
+[a-f0-9]+: 0f 1f 00 nopl \(%rax\)
+[a-f0-9]+: f3 0f 1e fa endbr64
+[a-f0-9]+: 68 00 00 00 00 pushq \$0x0
- +[a-f0-9]+: f2 e9 e1 ff ff ff bnd jmpq 220 <.plt>
+ +[a-f0-9]+: f2 e9 e1 ff ff ff bnd jmpq 1f0 <.plt>
+[a-f0-9]+: 90 nop
+[a-f0-9]+: f3 0f 1e fa endbr64
+[a-f0-9]+: 68 01 00 00 00 pushq \$0x1
- +[a-f0-9]+: f2 e9 d1 ff ff ff bnd jmpq 220 <.plt>
+ +[a-f0-9]+: f2 e9 d1 ff ff ff bnd jmpq 1f0 <.plt>
+[a-f0-9]+: 90 nop
Disassembly of section .plt.sec:
-0+250 <bar1@plt>:
+0+220 <bar1@plt>:
+[a-f0-9]+: f3 0f 1e fa endbr64
- +[a-f0-9]+: f2 ff 25 c5 01 20 00 bnd jmpq \*0x2001c5\(%rip\) # 200420 <bar1>
+ +[a-f0-9]+: f2 ff 25 a5 01 20 00 bnd jmpq \*0x2001a5\(%rip\) # 2003d0 <bar1>
+[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
-0+260 <bar2@plt>:
+0+230 <bar2@plt>:
+[a-f0-9]+: f3 0f 1e fa endbr64
- +[a-f0-9]+: f2 ff 25 bd 01 20 00 bnd jmpq \*0x2001bd\(%rip\) # 200428 <bar2>
+ +[a-f0-9]+: f2 ff 25 9d 01 20 00 bnd jmpq \*0x20019d\(%rip\) # 2003d8 <bar2>
+[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
Disassembly of section .text:
-0+270 <foo>:
+0+240 <foo>:
+[a-f0-9]+: 48 83 ec 08 sub \$0x8,%rsp
- +[a-f0-9]+: e8 e7 ff ff ff callq 260 <bar2@plt>
+ +[a-f0-9]+: e8 e7 ff ff ff callq 230 <bar2@plt>
+[a-f0-9]+: 48 83 c4 08 add \$0x8,%rsp
- +[a-f0-9]+: e9 ce ff ff ff jmpq 250 <bar1@plt>
+ +[a-f0-9]+: e9 ce ff ff ff jmpq 220 <bar1@plt>
#pass