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) {
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) {