]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
authorAndreas Schwab <schwab@linux-m68k.org>
Tue, 22 Feb 2011 15:46:13 +0000 (15:46 +0000)
committerAndreas Schwab <schwab@linux-m68k.org>
Tue, 22 Feb 2011 15:46:13 +0000 (15:46 +0000)
relocation read the value from the second GOT slot.

bfd/ChangeLog
bfd/elf32-m68k.c

index 1ab968c295fc438d67052b3a85c73a3c88da100d..a8907a0b02beff8a3efc0a2e71897a2c24cf5747 100644 (file)
@@ -1,3 +1,8 @@
+2011-02-22  Andreas Schwab  <schwab@redhat.com>
+
+       * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
+       relocation read the value from the second GOT slot.
+
 2011-02-15  Tristan Gingold  <gingold@adacore.com>
 
        * vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
index 1d9d6a43ebc4a1c3c7636a5e49e555633008c4f0..b4f7bc2c94c9346a2b7a3e4fd522fe1e4c41bccf 100644 (file)
@@ -1,6 +1,6 @@
 /* Motorola 68k series support for 32-bit ELF
    Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -4390,6 +4390,11 @@ elf_m68k_finish_dynamic_symbol (output_bfd, info, h, sym)
                  break;
 
                case R_68K_TLS_GD32:
+                 /* The value for this relocation is actually put in
+                    the second GOT slot.  */
+                 relocation = bfd_get_signed_32 (output_bfd,
+                                                 (sgot->contents
+                                                  + got_entry_offset + 4));
                  relocation += dtpoff_base (info);
                  break;