aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-sh.c
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@rr.iij4u.or.jp>2004-10-28 12:00:17 +0000
committerKaz Kojima <kkojima@rr.iij4u.or.jp>2004-10-28 12:00:17 +0000
commit044ad7e3d72dacb50a59aa55998122e3cadbb33a (patch)
treea4a8631b5552b9e415b41c0ccd47ea250c3782b7 /bfd/elf32-sh.c
parentc18c06be5e314ee96c2ca5a10dc16499b2a17cab (diff)
downloadgdb-044ad7e3d72dacb50a59aa55998122e3cadbb33a.zip
gdb-044ad7e3d72dacb50a59aa55998122e3cadbb33a.tar.gz
gdb-044ad7e3d72dacb50a59aa55998122e3cadbb33a.tar.bz2
* elf32-sh.c (tpoff): Take alignment into account.
Diffstat (limited to 'bfd/elf32-sh.c')
-rw-r--r--bfd/elf32-sh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index de827f3..80c0f81 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -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 *