outelf.c: add appropriate #ifdefs

Only build outelf.c if ELF32 or ELF64 is included.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2009-06-27 21:10:09 -07:00
parent 28abe7ada5
commit 0638193769

View file

@ -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) */