OSDN Git Service

* elflink.c (elf_link_add_object_symbols): Don't create .tcommon
authorJakub Jelinek <jakub@redhat.com>
Tue, 20 Jun 2006 16:36:18 +0000 (16:36 +0000)
committerJakub Jelinek <jakub@redhat.com>
Tue, 20 Jun 2006 16:36:18 +0000 (16:36 +0000)
section for relocatable link.

* ld-elf/tls_common.exp: New test.
* ld-elf/tls_common.s: New file.

bfd/ChangeLog
bfd/elflink.c

index b6996a8..8b32685 100644 (file)
@@ -1,3 +1,8 @@
+2006-06-20  Jakub Jelinek  <jakub@redhat.com>
+
+       * elflink.c (elf_link_add_object_symbols): Don't create .tcommon
+       section for relocatable link.
+
 2006-06-21  Alan Modra  <amodra@bigpond.net.au>
 
        * elf-bfd.h (struct elf_backend_data): Add
index 0a32963..4b20749 100644 (file)
@@ -3621,7 +3621,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
        goto error_free_vers;
 
       if (isym->st_shndx == SHN_COMMON
-         && ELF_ST_TYPE (isym->st_info) == STT_TLS)
+         && ELF_ST_TYPE (isym->st_info) == STT_TLS
+         && !info->relocatable)
        {
          asection *tcomm = bfd_get_section_by_name (abfd, ".tcommon");