* elfcode.h (swap_out_syms): Use elf_section_from_bfd_section to
authorIan Lance Taylor <ian@airs.com>
Mon, 24 Jan 1994 23:54:51 +0000 (23:54 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 24 Jan 1994 23:54:51 +0000 (23:54 +0000)
get the index of a common section, rather than always using
SHN_COMMON (MIPS has multiple common sections).

bfd/elfcode.h

index 81a3bca17ff2a558d5a457194e932476b4021828..98719121f9dee7f6849838dffedd67765d0839df 100644 (file)
@@ -2095,7 +2095,8 @@ swap_out_syms (abfd)
            sym.st_size = value;
            /* Should retrieve this from somewhere... */
            sym.st_value = 16;
-           sym.st_shndx = SHN_COMMON;
+           sym.st_shndx = elf_section_from_bfd_section (abfd,
+                                                        syms[idx]->section);
          }
        else
          {