summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjmg <jmg@FreeBSD.org>2003-07-16 01:14:40 +0000
committerjmg <jmg@FreeBSD.org>2003-07-16 01:14:40 +0000
commitca02557604170c6cca93570c1e46dbaeb335ccf8 (patch)
tree289255e6fe0aab21cb60a38821cade4559daa0a3 /sys
parent68ed1d12ac6cbb18345fb3bcdb41d6807907da13 (diff)
downloadFreeBSD-src-ca02557604170c6cca93570c1e46dbaeb335ccf8.zip
FreeBSD-src-ca02557604170c6cca93570c1e46dbaeb335ccf8.tar.gz
change CLASS depending upon __ELF_WORD_SIZE. This is necessary if
someone wants to try to run 32bit binaries on sparc64.
Diffstat (limited to 'sys')
-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