Put .dynbss and .rel.bss shortcuts in main elf hash table
[deliverable/binutils-gdb.git] / bfd / elflink.c
index 07b79013d90c710def29183b29a3b2d3541b8305..9728e29feaf82745358bd4ab4a59fae56d3268a8 100644 (file)
@@ -427,6 +427,7 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
                                              (SEC_ALLOC | SEC_LINKER_CREATED));
       if (s == NULL)
        return FALSE;
+      htab->sdynbss = s;
 
       /* The .rel[a].bss section holds copy relocs.  This section is not
         normally needed.  We need to create it here, though, so that the
@@ -439,7 +440,7 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
         be needed, we can discard it later.  We will never need this
         section when generating a shared object, since they do not use
         copy relocs.  */
-      if (! bfd_link_pic (info))
+      if (bfd_link_executable (info))
        {
          s = bfd_make_section_anyway_with_flags (abfd,
                                                  (bed->rela_plts_and_copies_p
@@ -448,6 +449,7 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
          if (s == NULL
              || ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
            return FALSE;
+         htab->srelbss = s;
        }
     }
 
This page took 0.025671 seconds and 4 git commands to generate.