mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-02-17 17:19:35 +08:00
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:
parent
f1e46600d2
commit
cc88d658ce
@ -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") ||
|
||||
|
@ -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") ||
|
||||
|
Loading…
Reference in New Issue
Block a user