aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2011-04-21 22:25:39 +0000
committerH.J. Lu <hjl.tools@gmail.com>2011-04-21 22:25:39 +0000
commitaa71524235bce7aa6f0b9ae12aa679ed8c3fd96f (patch)
tree68c9cae6fe2b22d0d42566b803dd8b3b5540d302 /ld
parentf6df62c820e674bda7550f998e83f8b95f22d0fb (diff)
downloadgdb-aa71524235bce7aa6f0b9ae12aa679ed8c3fd96f.zip
gdb-aa71524235bce7aa6f0b9ae12aa679ed8c3fd96f.tar.gz
gdb-aa71524235bce7aa6f0b9ae12aa679ed8c3fd96f.tar.bz2
Skip local IFUNC symbols when checking dynamic relocs in read-only sections.
bfd/ 2011-04-21 H.J. Lu <hongjiu.lu@intel.com> PR ld/12694 * elf32-i386.c (elf_i386_readonly_dynrelocs): Skip local IFUNC symbols. * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise. ld/testsuite/ 2011-04-21 H.J. Lu <hongjiu.lu@intel.com> PR ld/12694 * ld-ifunc/ifunc-14-i386.d: New. * ld-ifunc/ifunc-14-x86-64.d: Likewise. * ld-ifunc/ifunc-14a.s: Likewise. * ld-ifunc/ifunc-14b.s: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog8
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-14-i386.d11
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-14-x86-64.d11
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-14a.s7
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-14b.s5
5 files changed, 42 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index a9f6083..7a09d41 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2011-04-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/12694
+ * ld-ifunc/ifunc-14-i386.d: New.
+ * ld-ifunc/ifunc-14-x86-64.d: Likewise.
+ * ld-ifunc/ifunc-14a.s: Likewise.
+ * ld-ifunc/ifunc-14b.s: Likewise.
+
2011-04-19 H.J. Lu <hongjiu.lu@intel.com>
* ld-plugin/plugin-ignore.d: Removed.
diff --git a/ld/testsuite/ld-ifunc/ifunc-14-i386.d b/ld/testsuite/ld-ifunc/ifunc-14-i386.d
new file mode 100644
index 0000000..0edc9fb
--- /dev/null
+++ b/ld/testsuite/ld-ifunc/ifunc-14-i386.d
@@ -0,0 +1,11 @@
+#source: ifunc-14a.s
+#source: ifunc-14b.s
+#ld: -shared -m elf_i386 -z nocombreloc
+#as: --32
+#readelf: -d --wide
+#target: x86_64-*-* i?86-*-*
+
+#failif
+#...
+.*\(TEXTREL\).*
+#...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-14-x86-64.d
new file mode 100644
index 0000000..2c4ebbb
--- /dev/null
+++ b/ld/testsuite/ld-ifunc/ifunc-14-x86-64.d
@@ -0,0 +1,11 @@
+#source: ifunc-14a.s
+#source: ifunc-14b.s
+#ld: -shared -m elf_x86_64 -z nocombreloc
+#as: --64
+#readelf: -d
+#target: x86_64-*-*
+
+#failif
+#...
+.*\(TEXTREL\).*
+#...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14a.s b/ld/testsuite/ld-ifunc/ifunc-14a.s
new file mode 100644
index 0000000..9f20604
--- /dev/null
+++ b/ld/testsuite/ld-ifunc/ifunc-14a.s
@@ -0,0 +1,7 @@
+ .text
+ .globl bar
+ .type bar, @function
+bar:
+ jmp foo
+ .size bar, .-bar
+ .hidden foo
diff --git a/ld/testsuite/ld-ifunc/ifunc-14b.s b/ld/testsuite/ld-ifunc/ifunc-14b.s
new file mode 100644
index 0000000..bac22eb
--- /dev/null
+++ b/ld/testsuite/ld-ifunc/ifunc-14b.s
@@ -0,0 +1,5 @@
+ .type foo, %gnu_indirect_function
+ .globl foo
+foo:
+ ret
+ .size foo, .-foo