]> granicus.if.org Git - strace/commitdiff
syscall.c: define personality names for all multi-personality architectures
authorEugene Syromyatnikov <evgsyr@gmail.com>
Sun, 27 Aug 2017 16:49:01 +0000 (18:49 +0200)
committerEugene Syromyatnikov <evgsyr@gmail.com>
Mon, 28 Aug 2017 00:32:52 +0000 (02:32 +0200)
I see no reason for not having these definitions for SPARC64 and RISC-V.
Also, borrow the check template from supported_personalities.h.

* syscall.c (update_personality) [defined RISCV, defined SPARC64]
<PERSONALITY_NAMES>: Define it for these architectures.

Co-authored-by: Dmitry V. Levin <ldv@altlinux.org>
syscall.c

index 87825e6bdb4e6ae3604b583429757079c0de63f6..1d3b12328a405d4eb85651ff87a408b326d6232a 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -308,12 +308,12 @@ update_personality(struct tcb *tcp, unsigned int personality)
        tcp->currpers = personality;
 
 # undef PERSONALITY_NAMES
-# if defined POWERPC64 || defined AARCH64 || defined TILE
-#  define PERSONALITY_NAMES {"64 bit", "32 bit"}
-# elif defined X86_64
+# if defined X86_64
 #  define PERSONALITY_NAMES {"64 bit", "32 bit", "x32"}
 # elif defined X32
 #  define PERSONALITY_NAMES {"x32", "32 bit"}
+# elif SUPPORTED_PERSONALITIES == 2
+#  define PERSONALITY_NAMES {"64 bit", "32 bit"}
 # endif
 # ifdef PERSONALITY_NAMES
        if (!qflag) {