diff options
author | Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> | 2010-10-21 12:29:02 +0000 |
---|---|---|
committer | Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> | 2010-10-21 12:29:02 +0000 |
commit | 7dc98aeaf1f3fe256e284347a41f1c150955c37d (patch) | |
tree | e23ae18c7da2ab9067dc8a1fd70355977aad6344 /bfd/elflink.c | |
parent | 3e057702240894f82645b6d788b88ebba50d1550 (diff) | |
download | gdb-7dc98aeaf1f3fe256e284347a41f1c150955c37d.zip gdb-7dc98aeaf1f3fe256e284347a41f1c150955c37d.tar.gz gdb-7dc98aeaf1f3fe256e284347a41f1c150955c37d.tar.bz2 |
* elf-bfd.h (struct elf_backend_data): New member
static_tls_alignment.
* elfxx-target.h (elf_backend_static_tls_alignment): Provide
default.
(elfNN_bed): Initialize static_tls_alignment.
* elflink.c (bfd_elf_final_link): Don't round end of TLS section
if static TLS has special alignment requirements.
* elf32-i386.c (elf_i386_tpoff): Define bed, static_tls_size.
Consider static_tls_alignment.
(elf_backend_static_tls_alignment): Redefine for Solaris 2.
Undef again for VxWorks.
* elf64-x86-64.c (elf64_x86_64_tpoff): Define bed,
static_tls_size.
Consider static_tls_alignment.
(elf_backend_static_tls_alignment): Redefine for Solaris 2.
Undef again for Intel L1OM.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 6d37dc8..6726d46 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -10624,7 +10624,11 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) end = sec->vma + size; } base = elf_hash_table (info)->tls_sec->vma; - end = align_power (end, elf_hash_table (info)->tls_sec->alignment_power); + /* Only align end of TLS section if static TLS doesn't have special + alignment requirements. */ + if (bed->static_tls_alignment == 1) + end = align_power (end, + elf_hash_table (info)->tls_sec->alignment_power); elf_hash_table (info)->tls_size = end - base; } |