diff options
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -3093,7 +3093,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *fsarg) compressed. */ asect->flags |= SEC_ELF_COMPRESS; - /* If this section will be compressed, delay adding setion + /* If this section will be compressed, delay adding section name to section name section after it is compressed in _bfd_elf_assign_file_positions_for_non_load. */ delay_st_name_p = TRUE; @@ -3595,10 +3595,6 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) d->rela.idx = 0; } - elf_shstrtab_sec (abfd) = section_number++; - _bfd_elf_strtab_addref (elf_shstrtab (abfd), t->shstrtab_hdr.sh_name); - elf_elfheader (abfd)->e_shstrndx = elf_shstrtab_sec (abfd); - need_symtab = (bfd_get_symcount (abfd) > 0 || (link_info == NULL && ((abfd->flags & (EXEC_P | DYNAMIC | HAS_RELOC)) @@ -3626,6 +3622,10 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) _bfd_elf_strtab_addref (elf_shstrtab (abfd), t->strtab_hdr.sh_name); } + elf_shstrtab_sec (abfd) = section_number++; + _bfd_elf_strtab_addref (elf_shstrtab (abfd), t->shstrtab_hdr.sh_name); + elf_elfheader (abfd)->e_shstrndx = elf_shstrtab_sec (abfd); + if (section_number >= SHN_LORESERVE) { _bfd_error_handler (_("%B: too many sections: %u"), @@ -6028,7 +6028,7 @@ _bfd_elf_assign_file_positions_for_non_load (bfd *abfd) return FALSE; name = new_name; } - /* Add setion name to section name section. */ + /* Add section name to section name section. */ if (shdrp->sh_name != (unsigned int) -1) abort (); shdrp->sh_name @@ -6036,7 +6036,7 @@ _bfd_elf_assign_file_positions_for_non_load (bfd *abfd) name, FALSE); d = elf_section_data (sec); - /* Add reloc setion name to section name section. */ + /* Add reloc section name to section name section. */ if (d->rel.hdr && !_bfd_elf_set_reloc_sh_name (abfd, d->rel.hdr, |