a.out: restore CMAGIC
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Mon, 26 Sep 2022 15:15:54 +0000 (17:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Sep 2022 16:51:51 +0000 (18:51 +0200)
Part of UAPI and the on-disk format:
this means that it's not a magic number per magic-number.rst,
and it's best to leave it untouched to avoid breaking userspace
and suffer the same fate as a.out in general

Fixes: 53c2bd679017 ("a.out: remove define-only CMAGIC, previously magic number")
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Link: https://lore.kernel.org/r/20220926151554.7gxd6unp5727vw3c@tarta.nabijaczleweli.xyz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/uapi/linux/a.out.h

index bb15da96df2a10f34964e820fbaded2d2be96b25..5fafde3798e57cd6bd05b34e9831de392432ea04 100644 (file)
@@ -70,6 +70,9 @@ enum machine_type {
    The first page is unmapped to help trap NULL pointer references */
 #define QMAGIC 0314
 
+/* Code indicating core file.  */
+#define CMAGIC 0421
+
 #if !defined (N_BADMAG)
 #define N_BADMAG(x)      (N_MAGIC(x) != OMAGIC         \
                        && N_MAGIC(x) != NMAGIC         \