Set SEC_SMALL_DATA on small common
[binutils-gdb.git] / bfd / elf32-nds32.c
index 1f9f9ba964c0e14c98e88dc52fe0e802a7ad3471..233af38c2307e1c66dc02d8d5d2cb966e2293420 100644 (file)
@@ -3368,7 +3368,7 @@ nds32_elf_add_symbol_hook (bfd *abfd,
          || ELF_ST_TYPE (sym->st_info) == STT_TLS)
        break;
 
-      /* st_value is the alignemnt constraint.
+      /* st_value is the alignment constraint.
         That might be its actual size if it is an array or structure.  */
       switch (sym->st_value)
        {
@@ -3388,7 +3388,7 @@ nds32_elf_add_symbol_hook (bfd *abfd,
          return TRUE;
        }
 
-      (*secp)->flags |= SEC_IS_COMMON;
+      (*secp)->flags |= SEC_IS_COMMON | SEC_SMALL_DATA;
       *valp = sym->st_size;
       break;
     }