|
From: Charles C. <ch...@th...> - 2009-01-18 23:42:31
|
Date: Sun, 18 Jan 2009 15:27:03 -0800
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.
---
output/outelf32.c | 3 ++-
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") ||
--
1.6.0.2
|