aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-i386/no-plt.exp
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-06-13 11:06:10 -0700
committerH.J. Lu <hjl.tools@gmail.com>2016-06-13 11:11:23 -0700
commit712ec27916b5604d29d928dec060fd1ba0fd9edb (patch)
tree221a14aa497e282aad40ccacf3bd8abbe30a9de8 /ld/testsuite/ld-i386/no-plt.exp
parentca8c86efe7765262e25ebb08004012ba2fdadf52 (diff)
downloadgdb-712ec27916b5604d29d928dec060fd1ba0fd9edb.zip
gdb-712ec27916b5604d29d928dec060fd1ba0fd9edb.tar.gz
gdb-712ec27916b5604d29d928dec060fd1ba0fd9edb.tar.bz2
Add the GOT base for GOT32 relocs against IFUNC
Add the GOT base for R_386_GOT32/R_386_GOT32X relocations against IFUNC symbols if there is no base register and disallow them for PIC. bfd/ PR ld/20244 * elf32-i386.c (elf_i386_relocate_section): Add the .got.plt section address for R_386_GOT32/R_386_GOT32X relocations against IFUNC symbols if there is no base register and return error for PIC. ld/ PR ld/20244 * testsuite/ld-i386/i386.exp: Run pr20244-2a, pr20244-2b, pr20244-2c and pr20244-2d. * testsuite/ld-i386/no-plt.exp: Run pr20244-3a and pr20244-3b. * testsuite/ld-i386/pr20244-2.s: New file. * testsuite/ld-i386/pr20244-2a.d: Likewise. * testsuite/ld-i386/pr20244-2b.d: Likewise. * testsuite/ld-i386/pr20244-2c.d: Likewise. * testsuite/ld-i386/pr20244-2d.d: Likewise. * testsuite/ld-i386/pr20244-3a.c: Likewise. * testsuite/ld-i386/pr20244-3b.S: Likewise. * testsuite/ld-i386/pr20244-3c.S: Likewise. * testsuite/ld-i386/pr20244-3d.S: Likewise.
Diffstat (limited to 'ld/testsuite/ld-i386/no-plt.exp')
-rw-r--r--ld/testsuite/ld-i386/no-plt.exp33
1 files changed, 33 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/no-plt.exp b/ld/testsuite/ld-i386/no-plt.exp
index 87d64b9..c4af0a9 100644
--- a/ld/testsuite/ld-i386/no-plt.exp
+++ b/ld/testsuite/ld-i386/no-plt.exp
@@ -255,3 +255,36 @@ run_ld_link_exec_tests [] [list \
"pass.out" \
] \
]
+
+# Run-time tests which require working IFUNC support.
+if { [check_ifunc_available] } {
+ run_cc_link_tests [list \
+ [list \
+ "Build pr20244-3a.o pr20244-3b.o pr20244-3c.o pr20244-3d.o" \
+ "" \
+ "-fPIC -O2 -g" \
+ { pr20244-3a.c pr20244-3b.S pr20244-3c.S pr20244-3d.S } \
+ ] \
+ ]
+
+ run_ld_link_exec_tests [] [list \
+ [list \
+ "Run pr20244-3a" \
+ "tmpdir/pr20244-3a.o tmpdir/pr20244-3b.o \
+ tmpdir/pr20244-3c.o tmpdir/pr20244-3d.o" \
+ "" \
+ { dummy.c } \
+ "pr20244-3a" \
+ "pass.out" \
+ ] \
+ [list \
+ "Run pr20244-3b" \
+ "--static tmpdir/pr20244-3a.o tmpdir/pr20244-3b.o \
+ tmpdir/pr20244-3c.o tmpdir/pr20244-3d.o" \
+ "" \
+ { dummy.c } \
+ "pr20244-3b" \
+ "pass.out" \
+ ] \
+ ]
+}