x86-64: Properly set converted_reloc
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 5 Sep 2017 20:41:18 +0000 (13:41 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 5 Sep 2017 20:43:02 +0000 (13:43 -0700)
Linker now generates

failed to convert GOTPCREL relocation; relink with --no-relax

for more cases.

bfd/

* elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
converted_reloc.

ld/

* testsuite/ld-x86-64/pr19609-5d.d: Updated.
* testsuite/ld-x86-64/pr19609-7a.d: Likewise.
* testsuite/ld-x86-64/pr19609-7c.d: Likewise.

bfd/ChangeLog
bfd/elf64-x86-64.c
ld/ChangeLog
ld/testsuite/ld-x86-64/pr19609-5d.d
ld/testsuite/ld-x86-64/pr19609-7a.d
ld/testsuite/ld-x86-64/pr19609-7c.d

index 551891d40231ae5659d3cf832663d545e960ef3e..7e98b61c030d721ac7ed5716a3e283c2d834c001 100644 (file)
@@ -1,3 +1,8 @@
+2017-09-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
+       converted_reloc.
+
 2017-09-05  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
index ddbf1330e4df1cd6f191483273764a7650c6800a..bb471911a9359a6e94cc427da5ef34c35b6b223d 100644 (file)
@@ -1597,10 +1597,10 @@ elf_x86_64_convert_load_reloc (bfd *abfd,
   if (no_overflow)
     return TRUE;
 
+convert:
   if (h != NULL)
     ((struct elf_x86_link_hash_entry *) h)->converted_reloc = 1;
 
-convert:
   if (opcode == 0xff)
     {
       /* We have "call/jmp *foo@GOTPCREL(%rip)".  */
index 983c471f7c738be6cc3383a81b45636095dfdeb5..73137958480c83b76a1b095d937a6a5e430bc52c 100644 (file)
@@ -1,3 +1,9 @@
+2017-09-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * testsuite/ld-x86-64/pr19609-5d.d: Updated.
+       * testsuite/ld-x86-64/pr19609-7a.d: Likewise.
+       * testsuite/ld-x86-64/pr19609-7c.d: Likewise.
+
 2017-09-05  H.J. Lu  <hongjiu.lu@intel.com>
 
        * testsuite/ld-x86-64/pr19609-4e.d: Updated.
index 959c63e3d0da6ff2d488364002c845841f96542a..608c97bd6b9034d810e321ab324ef58041e37f24 100644 (file)
@@ -1,4 +1,4 @@
 #source: pr19609-5.s
 #as: --64 -mrelax-relocations=yes
 #ld: -melf_x86_64 -Ttext=0x80000000
-#error: .*relocation truncated to fit: R_X86_64_PC32 .*
+#error: failed to convert GOTPCREL relocation; relink with --no-relax
index d9605728147e2817ffa944a0f7b06dda4d794ec3..015a6ffd0a787dec211e5a6e59cb93b357220be6 100644 (file)
@@ -1,4 +1,4 @@
 #source: pr19609-7.s
 #as: --64 -mrelax-relocations=yes
 #ld: -melf_x86_64 -Ttext=0x80000000
-#error: .*relocation truncated to fit: R_X86_64_PC32 .*
+#error: failed to convert GOTPCREL relocation; relink with --no-relax
index 8bd919a8e4527b914a3cd00b808a17b852adb5bb..ff600498d4f80773ea7daa11e77d99b4f538bf5d 100644 (file)
@@ -1,4 +1,4 @@
 #source: pr19609-7.s
 #as: --x32 -mrelax-relocations=yes
 #ld: -melf32_x86_64 -Ttext=0x80000000
-#error: .*relocation truncated to fit: R_X86_64_PC32 .*
+#error: failed to convert GOTPCREL relocation; relink with --no-relax
This page took 0.034595 seconds and 4 git commands to generate.