Elf: Use SHA_ANY constant instead of open coded number

SHA_ANY is not part of Elf specification but rather our own symbolic
definition for convenience.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2010-04-10 14:58:39 +04:00
parent 367d59e272
commit c084467eba
2 changed files with 5 additions and 2 deletions

View File

@ -188,6 +188,9 @@
#define SHN_COMMON 0xfff2
#define SHN_HIRESERVE 0xffff
/* Section align flag */
#define SHA_ANY 1 /* No alignment constraint */
/* Lenght of magic at the start of a file */
#define EI_NIDENT 16

View File

@ -79,12 +79,12 @@ void section_attrib(char *name, char *attr, int pass,
if (!nasm_stricmp(q, "align")) {
*align = atoi(v);
if (*align == 0) {
*align = 1;
*align = SHA_ANY;
} else if (!is_power2(*align)) {
nasm_error(ERR_NONFATAL,
"section alignment %"PRId64" is not a power of two",
*align);
*align = 1;
*align = SHA_ANY;
}
} else if (!nasm_stricmp(q, "alloc")) {
*flags_and |= SHF_ALLOC;