aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-i386
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-03-08 09:42:01 -0800
committerH.J. Lu <hjl.tools@gmail.com>2016-03-08 09:42:16 -0800
commitd1ed1c7d69e6656de213b12594e702afec31a66d (patch)
tree3655317b5954f23c569e10eb0506078c6593dd2a /ld/testsuite/ld-i386
parent205ac185771460838370afb3a38d20228927b925 (diff)
downloadgdb-d1ed1c7d69e6656de213b12594e702afec31a66d.zip
gdb-d1ed1c7d69e6656de213b12594e702afec31a66d.tar.gz
gdb-d1ed1c7d69e6656de213b12594e702afec31a66d.tar.bz2
Handle local IFUNC symbols in shared object
Increment PLT reference count for locally defined local IFUNC symbols in shared object since STT_GNU_IFUNC symbol must go through PLT even if it is locally defined and undefined symbol may turn out to be a STT_GNU_IFUNC symbol later. bfd/ PR ld/19784 * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference count for locally defined local IFUNC symbols in shared object. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. ld/ PR ld/19784 * testsuite/ld-i386/i386.exp: Remove pr19636-2e-nacl test. * testsuite/ld-i386/pr19636-2e-nacl.d: Moved to ... * testsuite/ld-i386/pr19636-2e.d: Here. Remove notarget. * testsuite/ld-ifunc/ifunc.exp: Run PR ld/19784 tests. * testsuite/ld-ifunc/pass.out: New file. * testsuite/ld-ifunc/pr19784a.c: Likewise. * testsuite/ld-ifunc/pr19784b.c: Likewise. * testsuite/ld-ifunc/pr19784c.c: Likewise.
Diffstat (limited to 'ld/testsuite/ld-i386')
-rw-r--r--ld/testsuite/ld-i386/i386.exp1
-rw-r--r--ld/testsuite/ld-i386/pr19636-2e-nacl.d21
-rw-r--r--ld/testsuite/ld-i386/pr19636-2e.d5
3 files changed, 4 insertions, 23 deletions
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index 5b9d790..a032ca7 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -337,7 +337,6 @@ run_dump_test "pr19636-2c-nacl"
run_dump_test "pr19636-2d"
run_dump_test "pr19636-2d-nacl"
run_dump_test "pr19636-2e"
-run_dump_test "pr19636-2e-nacl"
run_dump_test "pr19636-3a"
run_dump_test "pr19636-3b"
run_dump_test "pr19636-3c"
diff --git a/ld/testsuite/ld-i386/pr19636-2e-nacl.d b/ld/testsuite/ld-i386/pr19636-2e-nacl.d
deleted file mode 100644
index f791128..0000000
--- a/ld/testsuite/ld-i386/pr19636-2e-nacl.d
+++ /dev/null
@@ -1,21 +0,0 @@
-#source: pr19636-2.s
-#as: --32 -mrelax-relocations=no
-#ld: -shared -Bsymbolic -m elf_i386
-#readelf : -r --wide --dyn-syms
-#target: i?86-*-nacl* x86_64-*-nacl*
-
-Relocation section '\.rel\.dyn' at offset [0x0-9a-f]+ contains 3 entries:
- +Offset +Info +Type +Sym. Value +Symbol's Name
-[0-9a-f]+ +[0-9a-f]+ +R_386_32 +0+ +func
-[0-9a-f]+ +[0-9a-f]+ +R_386_PC32 +0+ +func
-[0-9a-f]+ +[0-9a-f]+ +R_386_GLOB_DAT +0+ +func
-
-Relocation section '\.rel\.plt' at offset [0x0-9a-f]+ contains 1 entries:
- +Offset +Info +Type +Sym. Value +Symbol's Name
-[0-9a-f]+ +[0-9a-f]+ +R_386_JUMP_SLOT +0+ +func
-
-Symbol table '\.dynsym' contains [0-9]+ entries:
- +Num: +Value +Size Type +Bind +Vis +Ndx Name
-#...
- +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +WEAK +DEFAULT +UND +func
-#pass
diff --git a/ld/testsuite/ld-i386/pr19636-2e.d b/ld/testsuite/ld-i386/pr19636-2e.d
index 148e306..c985242 100644
--- a/ld/testsuite/ld-i386/pr19636-2e.d
+++ b/ld/testsuite/ld-i386/pr19636-2e.d
@@ -2,7 +2,6 @@
#as: --32 -mrelax-relocations=no
#ld: -shared -Bsymbolic -m elf_i386
#readelf : -r --wide --dyn-syms
-#notarget: i?86-*-nacl* x86_64-*-nacl*
Relocation section '\.rel\.dyn' at offset [0x0-9a-f]+ contains 3 entries:
+Offset +Info +Type +Sym. Value +Symbol's Name
@@ -10,6 +9,10 @@ Relocation section '\.rel\.dyn' at offset [0x0-9a-f]+ contains 3 entries:
[0-9a-f]+ +[0-9a-f]+ +R_386_PC32 +0+ +func
[0-9a-f]+ +[0-9a-f]+ +R_386_GLOB_DAT +0+ +func
+Relocation section '\.rel\.plt' at offset [0x0-9a-f]+ contains 1 entries:
+ +Offset +Info +Type +Sym. Value +Symbol's Name
+[0-9a-f]+ +[0-9a-f]+ +R_386_JUMP_SLOT +0+ +func
+
Symbol table '\.dynsym' contains [0-9]+ entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
#...