From 8a10bad25ee86e100e305ac902c11bdb1be1beaa Mon Sep 17 00:00:00 2001 From: Nathan Whitehorn Date: Sat, 10 Jul 2010 22:06:51 +0000 Subject: [PATCH] Teach crunchide(1) about PPC ELF64. --- usr.sbin/crunch/crunchide/Makefile | 2 +- usr.sbin/crunch/crunchide/exec_elf32.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.sbin/crunch/crunchide/Makefile b/usr.sbin/crunch/crunchide/Makefile index 0f8525456733..3e173e48608f 100644 --- a/usr.sbin/crunch/crunchide/Makefile +++ b/usr.sbin/crunch/crunchide/Makefile @@ -10,7 +10,7 @@ CFLAGS+=-DNLIST_AOUT SRCS+= exec_aout.c .endif -.if ${TARGET_ARCH} == ia64 || \ +.if ${TARGET_ARCH} == ia64 || ${TARGET_ARCH} == powerpc64 || \ ${TARGET_ARCH} == sparc64 || ${TARGET_ARCH} == amd64 CFLAGS+=-DNLIST_ELF64 SRCS+= exec_elf64.c diff --git a/usr.sbin/crunch/crunchide/exec_elf32.c b/usr.sbin/crunch/crunchide/exec_elf32.c index 1081ad86e5c9..ed84fc421e86 100644 --- a/usr.sbin/crunch/crunchide/exec_elf32.c +++ b/usr.sbin/crunch/crunchide/exec_elf32.c @@ -176,6 +176,10 @@ ELFNAMEEND(check)(int fd, const char *fn) #define EM_PPC 20 #endif case EM_PPC: break; +#ifndef EM_PPC64 +#define EM_PPC64 21 +#endif + case EM_PPC64: break; #ifndef EM_SPARCV9 #define EM_SPARCV9 43 #endif