]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/elflink.c
* elf-bfd.h (struct elf_backend_data): New member
[thirdparty/binutils-gdb.git] / bfd / elflink.c
index 6d37dc8d4ee31c40a2818a341a21ba60e827900f..6726d464c670dde97ca30ae8df9447f838ab557c 100644 (file)
@@ -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;
     }