diff options
author | marcel <marcel@FreeBSD.org> | 2005-12-17 23:24:34 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2005-12-17 23:24:34 +0000 |
commit | c9778a66ea822f4243d1ca8bbb95ab49386b0e23 (patch) | |
tree | ec5ca8d4647564378b3aead93aa22cbc13abfa93 /usr.bin/elfdump/elfdump.c | |
parent | 8f7e8790b1a43b2dfe0f99c331ca62bee4ae84e7 (diff) | |
download | FreeBSD-src-c9778a66ea822f4243d1ca8bbb95ab49386b0e23.zip FreeBSD-src-c9778a66ea822f4243d1ca8bbb95ab49386b0e23.tar.gz |
Know the machines FreeBSD runs on. Print the machine value for
unknown machines.
MFC after: 1 week
Diffstat (limited to 'usr.bin/elfdump/elfdump.c')
-rw-r--r-- | usr.bin/elfdump/elfdump.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/elfdump/elfdump.c b/usr.bin/elfdump/elfdump.c index e9fcb21..baae63c 100644 --- a/usr.bin/elfdump/elfdump.c +++ b/usr.bin/elfdump/elfdump.c @@ -243,6 +243,8 @@ d_tags(u_int64_t tag) { static const char * e_machines(u_int mach) { + static char machdesc[64]; + switch (mach) { case EM_NONE: return "EM_NONE"; case EM_M32: return "EM_M32"; @@ -250,12 +252,18 @@ e_machines(u_int mach) case EM_386: return "EM_386"; case EM_68K: return "EM_68K"; case EM_88K: return "EM_88K"; - case EM_486: return "EM_486"; case EM_860: return "EM_860"; case EM_MIPS: return "EM_MIPS"; + case EM_PPC: return "EM_PPC"; + case EM_ARM: return "EM_ARM"; + case EM_ALPHA: return "EM_ALPHA (legacy)"; + case EM_SPARCV9:return "EM_SPARCV9"; case EM_IA_64: return "EM_IA_64"; + case EM_X86_64: return "EM_X86_64"; } - return "(unknown machine)"; + snprintf(machdesc, sizeof(machdesc), + "(unknown machine) -- type 0x%x", mach); + return (machdesc); } const char *e_types[] = { |