Generate warning for unknown section atributes

Previously, the ELF backends silently ignored incorrect or unknown
attributes on section declarations, and therefore used default values
in cases where the user had make an error in attempting to specify
custom values.
This commit is contained in:
Charles Crayne 2009-01-18 15:27:03 -08:00
parent f1e46600d2
commit cc88d658ce
2 changed files with 4 additions and 2 deletions

View File

@ -484,7 +484,8 @@ static int32_t elf_section_names(char *name, int pass, int *bits)
type = SHT_PROGBITS;
} else if (!nasm_stricmp(q, "nobits")) {
type = SHT_NOBITS;
}
} else if (pass == 1) error(ERR_WARNING, "Unknown section attribute '%s' ignored on"
" declaration of section `%s'", q, name);
}
if (!strcmp(name, ".comment") ||

View File

@ -520,7 +520,8 @@ static int32_t elf_section_names(char *name, int pass, int *bits)
type = SHT_PROGBITS;
} else if (!nasm_stricmp(q, "nobits")) {
type = SHT_NOBITS;
}
} else if (pass == 1) error(ERR_WARNING, "Unknown section attribute '%s' ignored on"
" declaration of section `%s'", q, name);
}
if (!strcmp(name, ".comment") ||