diff options
author | Charles Crayne <chuck@thor.crayne.org> | 2009-01-18 15:27:03 -0800 |
---|---|---|
committer | Charles Crayne <chuck@thor.crayne.org> | 2009-01-18 15:27:03 -0800 |
commit | cc88d658ce3ac44192c550171aac5f2f7c217e75 (patch) | |
tree | af6f2f4e6fb86b156acd0a5e51a774a9b1561993 /output | |
parent | f1e46600d2760d357297d87092a72e5d9a813832 (diff) | |
download | nasm-cc88d658ce3ac44192c550171aac5f2f7c217e75.tar.gz nasm-cc88d658ce3ac44192c550171aac5f2f7c217e75.tar.bz2 nasm-cc88d658ce3ac44192c550171aac5f2f7c217e75.zip |
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.
Diffstat (limited to 'output')
-rw-r--r-- | output/outelf32.c | 3 | ||||
-rw-r--r-- | output/outelf64.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/output/outelf32.c b/output/outelf32.c index 0f9ba10..3766cdd 100644 --- a/output/outelf32.c +++ b/output/outelf32.c @@ -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") || diff --git a/output/outelf64.c b/output/outelf64.c index 259d7d5..a12559e 100644 --- a/output/outelf64.c +++ b/output/outelf64.c @@ -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") || |