diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-06-27 21:10:09 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-06-27 21:10:09 -0700 |
commit | 0638193769f07bb4851d500b11186a05fda24b65 (patch) | |
tree | 150b7a0efa165dcb427f1a7ff3a1dd9a3a69e350 /output | |
parent | 28abe7ada599a62f56349f8172fa123b12e170dc (diff) | |
download | nasm-0638193769f07bb4851d500b11186a05fda24b65.tar.gz |
outelf.c: add appropriate #ifdefs
Only build outelf.c if ELF32 or ELF64 is included.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'output')
-rw-r--r-- | output/outelf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/output/outelf.c b/output/outelf.c index d13fb98a..69915156 100644 --- a/output/outelf.c +++ b/output/outelf.c @@ -9,11 +9,14 @@ #include <inttypes.h> #include "nasm.h" +#include "outform.h" #include "output/elfcommon.h" #include "output/dwarf.h" #include "output/outelf.h" +#if defined(OF_ELF32) || defined(OF_ELF64) + const struct elf_known_section elf_known_sections[] = { { ".text", SHT_PROGBITS, SHF_ALLOC|SHF_EXECINSTR, 16 }, { ".rodata", SHT_PROGBITS, SHF_ALLOC, 4 }, @@ -27,3 +30,5 @@ const struct elf_known_section elf_known_sections[] = { { ".comment", SHT_PROGBITS, 0, 1 }, { NULL, SHT_PROGBITS, SHF_ALLOC, 1 } /* default */ }; + +#endif /* defined(OF_ELF32) || defined(OF_ELF64) */ |