mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-03-19 18:00:23 +08:00
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:
parent
367d59e272
commit
c084467eba
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user