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.
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") ||
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") ||