aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2011-10-21 19:37:15 +0000
committerH.J. Lu <hjl.tools@gmail.com>2011-10-21 19:37:15 +0000
commit9892017203958346ddb7920e8c4678d8c1640775 (patch)
treeee3cc095f4bd2c5c3438c1bbeac6574b09621e60 /ld
parent6cda5a20820e95cf01d510f2478cd4b992cf416b (diff)
downloadfsf-binutils-gdb-9892017203958346ddb7920e8c4678d8c1640775.zip
fsf-binutils-gdb-9892017203958346ddb7920e8c4678d8c1640775.tar.gz
fsf-binutils-gdb-9892017203958346ddb7920e8c4678d8c1640775.tar.bz2
Replace IRELATIVE relocations with RELATIVE in .rel.dyn.
bfd/ 2011-10-21 H.J. Lu <hongjiu.lu@intel.com> PR ld/13302 * elf32-i386.c (elf_i386_relocate_section): Replace R_386_IRELATIVE with R_386_RELATIVE. * elf64-x86-64.c (elf_x86_64_relocate_section): Replace R_X86_64_IRELATIVE with R_X86_64_RELATIVE. ld/testsuite/ 2011-10-21 H.J. Lu <hongjiu.lu@intel.com> PR ld/13302 * ld-i386/i386.exp: Run pr13302. * ld-i386/pr13302.d: New. * ld-i386/pr13302.s: Likewise. * ld-x86-64/pr13082-5b.d: Updated. * ld-x86-64/pr13082-6a.d: Likewise. * ld-x86-64/pr13082-6b.d: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog12
-rw-r--r--ld/testsuite/ld-i386/i386.exp1
-rw-r--r--ld/testsuite/ld-i386/pr13302.d12
-rw-r--r--ld/testsuite/ld-i386/pr13302.s11
-rw-r--r--ld/testsuite/ld-x86-64/pr13082-5b.d2
-rw-r--r--ld/testsuite/ld-x86-64/pr13082-6a.d2
-rw-r--r--ld/testsuite/ld-x86-64/pr13082-6b.d2
7 files changed, 39 insertions, 3 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 8480fee..2b444ac 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,6 +1,18 @@
2011-10-21 H.J. Lu <hongjiu.lu@intel.com>
PR ld/13302
+ * ld-i386/i386.exp: Run pr13302.
+
+ * ld-i386/pr13302.d: New.
+ * ld-i386/pr13302.s: Likewise.
+
+ * ld-x86-64/pr13082-5b.d: Updated.
+ * ld-x86-64/pr13082-6a.d: Likewise.
+ * ld-x86-64/pr13082-6b.d: Likewise.
+
+2011-10-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/13302
* ld-ifunc/ifunc-16-i386.d: New.
* ld-ifunc/ifunc-16-x86-64.d: Likewise.
* ld-ifunc/ifunc-16-x86.s: Likewise.
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index 68b71fb..1727922 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -210,3 +210,4 @@ if { !([istarget "i?86-*-linux*"]
run_dump_test "compressed1"
run_dump_test "pr12627"
+run_dump_test "pr13302"
diff --git a/ld/testsuite/ld-i386/pr13302.d b/ld/testsuite/ld-i386/pr13302.d
new file mode 100644
index 0000000..3d85d08
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr13302.d
@@ -0,0 +1,12 @@
+#name: PR ld/13302
+#as: --32
+#ld: -pie -melf_i386
+#readelf: -r --wide
+
+Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
+ Offset Info Type Sym. Value Symbol's Name
+[0-9a-f]+ +[0-9a-f]+ +R_386_RELATIVE +
+
+Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 1 entries:
+ Offset Info Type Sym. Value Symbol's Name
+[0-9a-f]+ +[0-9a-f]+ +R_386_IRELATIVE +
diff --git a/ld/testsuite/ld-i386/pr13302.s b/ld/testsuite/ld-i386/pr13302.s
new file mode 100644
index 0000000..cfd2717
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr13302.s
@@ -0,0 +1,11 @@
+ .text
+ .globl _start
+ .type ifunc, @gnu_indirect_function
+_start:
+ lea .Ljmp@GOTOFF(%ebx), %eax
+ifunc:
+ jmp *(%eax)
+ .section .data.rel.ro.local,"aw",@progbits
+ .align 4
+.Ljmp:
+ .long ifunc
diff --git a/ld/testsuite/ld-x86-64/pr13082-5b.d b/ld/testsuite/ld-x86-64/pr13082-5b.d
index 1c5a5e7..48e37c3 100644
--- a/ld/testsuite/ld-x86-64/pr13082-5b.d
+++ b/ld/testsuite/ld-x86-64/pr13082-5b.d
@@ -6,7 +6,7 @@
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
Offset Info Type Sym. Value Symbol's Name \+ Addend
-[0-9a-f]+ +[0-9a-f]+ +R_X86_64_IRELATIVE +[0-9a-f]+
+[0-9a-f]+ +[0-9a-f]+ +R_X86_64_RELATIVE +[0-9a-f]+
Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entries:
Offset Info Type Sym. Value Symbol's Name \+ Addend
diff --git a/ld/testsuite/ld-x86-64/pr13082-6a.d b/ld/testsuite/ld-x86-64/pr13082-6a.d
index 9a1a655..de90bb8 100644
--- a/ld/testsuite/ld-x86-64/pr13082-6a.d
+++ b/ld/testsuite/ld-x86-64/pr13082-6a.d
@@ -6,7 +6,7 @@
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
Offset Info Type Sym. Value Symbol's Name \+ Addend
-[0-9a-f]+ +[0-9a-f]+ +R_X86_64_IRELATIVE +[0-9a-f]+
+[0-9a-f]+ +[0-9a-f]+ +R_X86_64_RELATIVE +[0-9a-f]+
Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entries:
Offset Info Type Sym. Value Symbol's Name \+ Addend
diff --git a/ld/testsuite/ld-x86-64/pr13082-6b.d b/ld/testsuite/ld-x86-64/pr13082-6b.d
index 792c348..66ff59b 100644
--- a/ld/testsuite/ld-x86-64/pr13082-6b.d
+++ b/ld/testsuite/ld-x86-64/pr13082-6b.d
@@ -6,7 +6,7 @@
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
Offset Info Type Sym. Value Symbol's Name \+ Addend
-[0-9a-f]+ +[0-9a-f]+ +R_X86_64_IRELATIVE +[0-9a-f]+
+[0-9a-f]+ +[0-9a-f]+ +R_X86_64_RELATIVE +[0-9a-f]+
Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entries:
Offset Info Type Sym. Value Symbol's Name \+ Addend