aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-02-04 06:02:13 -0800
committerH.J. Lu <hjl.tools@gmail.com>2021-02-04 06:06:44 -0800
commit1a2f1b54a520b28891910846c8671e1c4bcaf348 (patch)
treeb61a6448f833763aac399ceb12ff22d71ef6e2ec /ld
parent37707bd8221c2e3f7676de8bee0c42ce3ab38c77 (diff)
downloadbinutils-1a2f1b54a520b28891910846c8671e1c4bcaf348.zip
binutils-1a2f1b54a520b28891910846c8671e1c4bcaf348.tar.gz
binutils-1a2f1b54a520b28891910846c8671e1c4bcaf348.tar.bz2
x86-64: Provide more info when failed to convert GOTPCREL
Provide [hjl@gnu-cfl-2 ld]$ ./ld-new -z norelro -L/export/gnu/import/git/gitlab/x86-binutils/ld/testsuite/ld-x86-64 -melf32_x86_64 -Ttext=0x80000000 -o tmpdir/dump tmpdir/pr19609-7.o tmpdir/pr19609-7.o: in function `_start': (.text+0x2): failed to convert GOTPCREL relocation against 'foobar'; relink with --no-relax [hjl@gnu-cfl-2 ld]$ instead of [hjl@gnu-cfl-2 ld]$ ld -z norelro -L/export/gnu/import/git/gitlab/x86-binutils/ld/testsuite/ld-x86-64 -melf32_x86_64 -Ttext=0x80000000 -o tmpdir/dump tmpdir/pr19609-7.o ld: failed to convert GOTPCREL relocation; relink with --no-relax [hjl@gnu-cfl-2 ld]$ bfd/ PR ld/19609 * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more info when failed to convert GOTPCREL relocation. ld/ PR ld/19609 * testsuite/ld-x86-64/pr19609-2a.d: Updated. * testsuite/ld-x86-64/pr19609-2b.d: Likewise. * testsuite/ld-x86-64/pr19609-4a.d: Likewise. * testsuite/ld-x86-64/pr19609-4c.d: Likewise. * testsuite/ld-x86-64/pr19609-5d.d: Likewise. * testsuite/ld-x86-64/pr19609-7a.d: Likewise. * testsuite/ld-x86-64/pr19609-7c.d: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog11
-rw-r--r--ld/testsuite/ld-x86-64/pr19609-2a.d2
-rw-r--r--ld/testsuite/ld-x86-64/pr19609-2b.d2
-rw-r--r--ld/testsuite/ld-x86-64/pr19609-4a.d2
-rw-r--r--ld/testsuite/ld-x86-64/pr19609-4c.d2
-rw-r--r--ld/testsuite/ld-x86-64/pr19609-5d.d2
-rw-r--r--ld/testsuite/ld-x86-64/pr19609-7a.d2
-rw-r--r--ld/testsuite/ld-x86-64/pr19609-7c.d2
8 files changed, 18 insertions, 7 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 3cd2be0..52639f3 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,16 @@
2021-02-04 H.J. Lu <hongjiu.lu@intel.com>
+ PR ld/19609
+ * testsuite/ld-x86-64/pr19609-2a.d: Updated.
+ * testsuite/ld-x86-64/pr19609-2b.d: Likewise.
+ * testsuite/ld-x86-64/pr19609-4a.d: Likewise.
+ * testsuite/ld-x86-64/pr19609-4c.d: Likewise.
+ * testsuite/ld-x86-64/pr19609-5d.d: Likewise.
+ * testsuite/ld-x86-64/pr19609-7a.d: Likewise.
+ * testsuite/ld-x86-64/pr19609-7c.d: Likewise.
+
+2021-02-04 H.J. Lu <hongjiu.lu@intel.com>
+
PR ld/15146
* testsuite/ld-plugin/lto.exp: Run PR ld/15146 tests.
* testsuite/ld-plugin/pr15146.d: Restored.
diff --git a/ld/testsuite/ld-x86-64/pr19609-2a.d b/ld/testsuite/ld-x86-64/pr19609-2a.d
index 2bed641..6d3db92 100644
--- a/ld/testsuite/ld-x86-64/pr19609-2a.d
+++ b/ld/testsuite/ld-x86-64/pr19609-2a.d
@@ -1,4 +1,4 @@
#source: pr19609-2.s
#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64 -Ttext=0x70000000 -Tdata=0xa0000000
-#error: failed to convert GOTPCREL relocation; relink with --no-relax
+#error: .*failed to convert GOTPCREL relocation against 'foo'; relink with --no-relax.*
diff --git a/ld/testsuite/ld-x86-64/pr19609-2b.d b/ld/testsuite/ld-x86-64/pr19609-2b.d
index 3741ebb..4fee93d 100644
--- a/ld/testsuite/ld-x86-64/pr19609-2b.d
+++ b/ld/testsuite/ld-x86-64/pr19609-2b.d
@@ -1,4 +1,4 @@
#source: pr19609-2.s
#as: --x32 -mrelax-relocations=yes
#ld: -melf32_x86_64 -Ttext=0x70000000 -Tdata=0xa0000000
-#error: failed to convert GOTPCREL relocation; relink with --no-relax
+#error: .*failed to convert GOTPCREL relocation against 'foo'; relink with --no-relax.*
diff --git a/ld/testsuite/ld-x86-64/pr19609-4a.d b/ld/testsuite/ld-x86-64/pr19609-4a.d
index f08843c..eb37d0c 100644
--- a/ld/testsuite/ld-x86-64/pr19609-4a.d
+++ b/ld/testsuite/ld-x86-64/pr19609-4a.d
@@ -1,4 +1,4 @@
#source: pr19609-4.s
#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64 -Ttext=0x70000000 -Tdata=0xa0000000
-#error: failed to convert GOTPCREL relocation; relink with --no-relax
+#error: .*failed to convert GOTPCREL relocation against 'foo'; relink with --no-relax.*failed to convert GOTPCREL relocation against 'foo'; relink with --no-relax.*
diff --git a/ld/testsuite/ld-x86-64/pr19609-4c.d b/ld/testsuite/ld-x86-64/pr19609-4c.d
index f08843c..eb37d0c 100644
--- a/ld/testsuite/ld-x86-64/pr19609-4c.d
+++ b/ld/testsuite/ld-x86-64/pr19609-4c.d
@@ -1,4 +1,4 @@
#source: pr19609-4.s
#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64 -Ttext=0x70000000 -Tdata=0xa0000000
-#error: failed to convert GOTPCREL relocation; relink with --no-relax
+#error: .*failed to convert GOTPCREL relocation against 'foo'; relink with --no-relax.*failed to convert GOTPCREL relocation against 'foo'; relink with --no-relax.*
diff --git a/ld/testsuite/ld-x86-64/pr19609-5d.d b/ld/testsuite/ld-x86-64/pr19609-5d.d
index 608c97b..0ab28ef 100644
--- a/ld/testsuite/ld-x86-64/pr19609-5d.d
+++ b/ld/testsuite/ld-x86-64/pr19609-5d.d
@@ -1,4 +1,4 @@
#source: pr19609-5.s
#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64 -Ttext=0x80000000
-#error: failed to convert GOTPCREL relocation; relink with --no-relax
+#error: .*failed to convert GOTPCREL relocation against 'bar'; relink with --no-relax
diff --git a/ld/testsuite/ld-x86-64/pr19609-7a.d b/ld/testsuite/ld-x86-64/pr19609-7a.d
index 015a6ff..34704a9 100644
--- a/ld/testsuite/ld-x86-64/pr19609-7a.d
+++ b/ld/testsuite/ld-x86-64/pr19609-7a.d
@@ -1,4 +1,4 @@
#source: pr19609-7.s
#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64 -Ttext=0x80000000
-#error: failed to convert GOTPCREL relocation; relink with --no-relax
+#error: .*failed to convert GOTPCREL relocation against 'foobar'; relink with --no-relax
diff --git a/ld/testsuite/ld-x86-64/pr19609-7c.d b/ld/testsuite/ld-x86-64/pr19609-7c.d
index ff60049..09488e2 100644
--- a/ld/testsuite/ld-x86-64/pr19609-7c.d
+++ b/ld/testsuite/ld-x86-64/pr19609-7c.d
@@ -1,4 +1,4 @@
#source: pr19609-7.s
#as: --x32 -mrelax-relocations=yes
#ld: -melf32_x86_64 -Ttext=0x80000000
-#error: failed to convert GOTPCREL relocation; relink with --no-relax
+#error: .*failed to convert GOTPCREL relocation against 'foobar'; relink with --no-relax