]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bfd/
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 23 Jul 2009 21:22:20 +0000 (21:22 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 23 Jul 2009 21:22:20 +0000 (21:22 +0000)
2009-07-23  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/10434
* elf64-x86-64.c (elf64_x86_64_check_relocs): Check executable
instead of shared for R_X86_64_TPOFF32.
(elf64_x86_64_relocate_section): Likewise.

ld/testsuite/

2009-07-23  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/10434
* ld-x86-64/tlsle1.d: New.
* ld-x86-64/tlsle1.s: Likewise.

* ld-x86-64/x86-64.exp: Run tlsle1.

bfd/ChangeLog
bfd/elf64-x86-64.c
ld/testsuite/ChangeLog
ld/testsuite/ld-x86-64/tlsle1.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/tlsle1.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/x86-64.exp

index 42dd8e3ce33160edce27ac094069c446e16c4ef6..f15da419feaa26712ea93d742ea4e6216c598fa3 100644 (file)
@@ -1,3 +1,10 @@
+2009-07-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/10434
+       * elf64-x86-64.c (elf64_x86_64_check_relocs): Check executable
+       instead of shared for R_X86_64_TPOFF32.
+       (elf64_x86_64_relocate_section): Likewise.
+
 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
 
        * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field.
index 718f07610a8ca51bf7f6f404b7137c82f5a308d7..2364233a65e14c64dc3a487907525de1fe3507cc 100644 (file)
@@ -1231,7 +1231,7 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info,
          goto create_got;
 
        case R_X86_64_TPOFF32:
-         if (info->shared)
+         if (!info->executable)
            {
              if (h)
                name = h->root.root.string;
@@ -3639,7 +3639,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
          break;
 
        case R_X86_64_TPOFF32:
-         BFD_ASSERT (! info->shared);
+         BFD_ASSERT (info->executable);
          relocation = elf64_x86_64_tpoff (info, relocation);
          break;
 
index e1333f2690a2e1b0f0364873dd61c408745ae9cb..c50a8075a183e3ff4690df7ae194c4c5f4bd6135 100644 (file)
@@ -1,3 +1,11 @@
+2009-07-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/10434
+       * ld-x86-64/tlsle1.d: New.
+       * ld-x86-64/tlsle1.s: Likewise.
+
+       * ld-x86-64/x86-64.exp: Run tlsle1.
+
 2009-07-21  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/10426
diff --git a/ld/testsuite/ld-x86-64/tlsle1.d b/ld/testsuite/ld-x86-64/tlsle1.d
new file mode 100644 (file)
index 0000000..2142ef5
--- /dev/null
@@ -0,0 +1,6 @@
+#name: TLS LE with PIE
+#as: --64
+#ld: -melf_x86_64 -pie
+#readelf: -r
+
+There are no relocations in this file.
diff --git a/ld/testsuite/ld-x86-64/tlsle1.s b/ld/testsuite/ld-x86-64/tlsle1.s
new file mode 100644 (file)
index 0000000..4346a5d
--- /dev/null
@@ -0,0 +1,11 @@
+       .text
+       .globl _start
+_start:
+       movl    $0, %fs:foo@TPOFF
+       .globl  foo
+       .section        .tdata,"awT",@progbits
+       .align 4
+       .type   foo, @object
+       .size   foo, 4
+foo:
+       .long   100
index 0b8e6146602e212e4ad4005bbc9459e5009cc876..cb6c1a6037abb1ffe5f0e12701969436ca2ebc72 100644 (file)
@@ -92,4 +92,4 @@ run_dump_test "hidden3"
 run_dump_test "protected1"
 run_dump_test "protected2"
 run_dump_test "protected3"
-
+run_dump_test "tlsle1"