PATCH: PR ld/15685: R_X86_64_DTPOFF64 incorrectly handled
H.J. Lu
hjl.tools@gmail.com
Mon Jul 1 16:18:00 GMT 2013
On Fri, Jun 28, 2013 at 8:10 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> Hi,
>
> I checked in this patch to handle R_X86_64_DTPOFF64.
>
>
> H.J.
> --
> diff --git a/bfd/ChangeLog b/bfd/ChangeLog
> index 49a6fe6..a592817 100644
> --- a/bfd/ChangeLog
> +++ b/bfd/ChangeLog
> @@ -1,3 +1,9 @@
> +2013-06-28 H.J. Lu <hongjiu.lu@intel.com>
> +
> + PR ld/15685
> + * elf64-x86-64.c (elf_x86_64_relocate_section): Handle
> + R_X86_64_DTPOFF64.
> +
> 2013-06-28 Nick Clifton <nickc@redhat.com>
>
> PR ld/15302
> diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
> index 758231e..56a1f81 100644
> --- a/bfd/elf64-x86-64.c
> +++ b/bfd/elf64-x86-64.c
> @@ -4332,6 +4332,11 @@ direct:
> relocation = elf_x86_64_tpoff (info, relocation);
> break;
>
> + case R_X86_64_DTPOFF64:
> + BFD_ASSERT ((input_section->flags & SEC_CODE) == 0);
> + relocation -= elf_x86_64_dtpoff_base (info);
> + break;
> +
> default:
> break;
> }
> diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
> index dce58ad..7bc29c8 100644
> --- a/ld/testsuite/ChangeLog
> +++ b/ld/testsuite/ChangeLog
> @@ -1,3 +1,9 @@
> +2013-06-28 H.J. Lu <hongjiu.lu@intel.com>
> +
> + PR ld/15685
> + * ld-x86-64/tlsg.s: Add a test for R_X86_64_DTPOFF64.
> + * ld-x86-64/tlsg.sd: Updated.
> +
> 2013-06-24 Maciej W. Rozycki <macro@codesourcery.com>
>
> * ld-mips-elf/jalx-2.dd: Update for microMIPS PLT support.
> diff --git a/ld/testsuite/ld-x86-64/tlsg.s b/ld/testsuite/ld-x86-64/tlsg.s
> index 048e98f..af390fb 100644
> --- a/ld/testsuite/ld-x86-64/tlsg.s
> +++ b/ld/testsuite/ld-x86-64/tlsg.s
> @@ -10,3 +10,4 @@ a:
> _start:
> .section .debug_foobar
> .long a@dtpoff, 0
> + .quad a@dtpoff
> diff --git a/ld/testsuite/ld-x86-64/tlsg.sd b/ld/testsuite/ld-x86-64/tlsg.sd
> index 7652d57..10c4934 100644
> --- a/ld/testsuite/ld-x86-64/tlsg.sd
> +++ b/ld/testsuite/ld-x86-64/tlsg.sd
> @@ -7,4 +7,4 @@
> .*: +file format elf64-x86-64.*
>
> Contents of section .debug_foobar:
> - 0+ 18000000 0+ +.*
> + 0+ 18000000 0+ +18000000 0+ +.*
I checked in this patch to remove the extra space in
d-x86-64/tlsg.sd.
--
H.J.
---
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 7bc29c8..08c2552 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2013-07-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld-x86-64/tlsg.sd: Adjusted.
+
2013-06-28 H.J. Lu <hongjiu.lu@intel.com>
PR ld/15685
diff --git a/ld/testsuite/ld-x86-64/tlsg.sd b/ld/testsuite/ld-x86-64/tlsg.sd
index 10c4934..bb1284e 100644
--- a/ld/testsuite/ld-x86-64/tlsg.sd
+++ b/ld/testsuite/ld-x86-64/tlsg.sd
@@ -7,4 +7,4 @@
.*: +file format elf64-x86-64.*
Contents of section .debug_foobar:
- 0+ 18000000 0+ +18000000 0+ +.*
+ 0+ 18000000 0+ +18000000 0+ +.*
More information about the Binutils
mailing list