This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] SH: Fix a glibc TLS test (commited)


Hi,

I've applied the patch below which fixes a glibc test failure
(elf/tst-tls14) on sh4-unknown-linux-gnu.

Regards,
	kaz
--
2004-10-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>

	* elf32-sh.c (tpoff): Take alignment into account.

diff -u3prN ORIG/src/bfd/elf32-sh.c LOCAL/src/bfd/elf32-sh.c
--- ORIG/src/bfd/elf32-sh.c	Mon Oct 25 08:29:19 2004
+++ LOCAL/src/bfd/elf32-sh.c	Thu Oct 28 17:16:59 2004
@@ -6002,7 +6002,9 @@ tpoff (struct bfd_link_info *info, bfd_v
     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 *


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]