summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/sparc64/include/elf.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/sparc64/include/elf.h b/sys/sparc64/include/elf.h
index a774843..5532bc9 100644
--- a/sys/sparc64/include/elf.h
+++ b/sys/sparc64/include/elf.h
@@ -162,7 +162,11 @@ __ElfType(Auxinfo);
#define R_SPARC_UA16 55
/* Define "machine" characteristics */
-#define ELF_TARG_CLASS ELFCLASS64
+#if __ELF_WORD_SIZE == 32
+#define ELF_TARG_CLASS ELFCLASS32
+#else
+#define ELF_TARG_CLASS ELFCLASS64
+#endif
#define ELF_TARG_DATA ELFDATA2MSB
#define ELF_TARG_MACH ELF_ARCH
#define ELF_TARG_VER 1
OpenPOWER on IntegriCloud