diff options
Diffstat (limited to 'output/outelf64.c')
-rw-r--r-- | output/outelf64.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/output/outelf64.c b/output/outelf64.c index 18508fb3..1fcd0b36 100644 --- a/output/outelf64.c +++ b/output/outelf64.c @@ -530,17 +530,15 @@ static void elf_deflabel(char *name, int32_t segment, int64_t offset, if (segment == def_seg) { /* we have to be sure at least text section is there */ int tempint; - elf_section_names(".text", 2, &tempint); + if (segment != elf_section_names(".text", 2, &tempint)) + nasm_error(ERR_PANIC, "strange segment conditions in ELF driver"); } - sym->section = nsects; for (i = 0; i < nsects; i++) { if (segment == sects[i]->index) { sym->section = i + 1; break; } } - if (nsects && i == nsects) - nasm_error(ERR_PANIC, "strange segment conditions in ELF driver"); } if (is_global == 2) { |