* elf32-sh.c (tpoff): Take alignment into account.
authorKaz Kojima <kkojima@rr.iij4u.or.jp>
Thu, 28 Oct 2004 12:00:17 +0000 (12:00 +0000)
committerKaz Kojima <kkojima@rr.iij4u.or.jp>
Thu, 28 Oct 2004 12:00:17 +0000 (12:00 +0000)
bfd/ChangeLog
bfd/elf32-sh.c

index bc8ab224d3a4dfe04fa3415a82b8206f895c3571..b228690fa74482d56501b348c5f2dff59f1687ad 100644 (file)
@@ -1,3 +1,7 @@
+2004-10-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
+
+       * elf32-sh.c (tpoff): Take alignment into account.
+
 2004-10-28  Nick Clifton  <nickc@redhat.com>
 
        * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
index de827f39f030b422a76c48e4adc6700aa217ff0a..80c0f811b1c1173f18ed0820ac9848c93933b086 100644 (file)
@@ -6002,7 +6002,9 @@ tpoff (struct bfd_link_info *info, bfd_vma address)
     return 0;
   /* SH TLS ABI is variant I and static TLS block start just after tcbhead
      structure which has 2 pointer fields.  */
-  return address - elf_hash_table (info)->tls_sec->vma + 8;
+  return (address - elf_hash_table (info)->tls_sec->vma
+         + align_power ((bfd_vma) 8,
+                        elf_hash_table (info)->tls_sec->alignment_power));
 }
 
 static asection *
This page took 0.033473 seconds and 4 git commands to generate.