From: Christoph Hellwig <hch@infradead.org>
To: Zack Weinberg <zackw@panix.com>
Cc: linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] uapi/linux/a.out.h: don't use deprecated system-specific predefines.
Date: Fri, 2 Jun 2017 00:10:14 -0700 [thread overview]
Message-ID: <20170602071014.GA16118@infradead.org> (raw)
In-Reply-To: <20170601210045.8638-1-zackw@panix.com>
> /* Address of data segment in memory after it is loaded.
> Note that it is up to you to define SEGMENT_SIZE
> on machines not listed here. */
> -#if defined(vax) || defined(hp300) || defined(pyr)
> +#if defined(__vax__) || defined(__hp300__) || defined(__pyr__)
> #define SEGMENT_SIZE page_size
> #endif
> -#ifdef sony
> +#ifdef __sony__
> #define SEGMENT_SIZE 0x2000
> #endif /* Sony. */
> -#ifdef is68k
> +#ifdef __is68k__
> #define SEGMENT_SIZE 0x20000
> #endif
> -#if defined(m68k) && defined(PORTAR)
> +#if defined(__m68k__) && defined(__PORTAR__)
> #define PAGE_SIZE 0x400
> #define SEGMENT_SIZE PAGE_SIZE
> #endif
Can we please fix these conditionals so that only those
relevant to Linux remain? e.g. something like the patch below:
diff --git a/include/uapi/linux/a.out.h b/include/uapi/linux/a.out.h
index 7caf44c7fa51..295cd3ef6330 100644
--- a/include/uapi/linux/a.out.h
+++ b/include/uapi/linux/a.out.h
@@ -112,24 +112,7 @@ enum machine_type {
#define N_TXTADDR(x) (N_MAGIC(x) == QMAGIC ? PAGE_SIZE : 0)
#endif
-/* Address of data segment in memory after it is loaded.
- Note that it is up to you to define SEGMENT_SIZE
- on machines not listed here. */
-#if defined(vax) || defined(hp300) || defined(pyr)
-#define SEGMENT_SIZE page_size
-#endif
-#ifdef sony
-#define SEGMENT_SIZE 0x2000
-#endif /* Sony. */
-#ifdef is68k
-#define SEGMENT_SIZE 0x20000
-#endif
-#if defined(m68k) && defined(PORTAR)
-#define PAGE_SIZE 0x400
-#define SEGMENT_SIZE PAGE_SIZE
-#endif
-
-#ifdef linux
+/* Address of data segment in memory after it is loaded. */
#ifndef __KERNEL__
#include <unistd.h>
#endif
@@ -142,7 +125,6 @@ enum machine_type {
#endif
#endif
#endif
-#endif
#define _N_SEGMENT_ROUND(x) ALIGN(x, SEGMENT_SIZE)
@@ -260,13 +242,7 @@ struct relocation_info
unsigned int r_extern:1;
/* Four bits that aren't used, but when writing an object file
it is desirable to clear them. */
-#ifdef NS32K
- unsigned r_bsr:1;
- unsigned r_disp:1;
- unsigned r_pad:2;
-#else
unsigned int r_pad:4;
-#endif
};
#endif /* no N_RELOCATION_INFO_DECLARED. */
next prev parent reply other threads:[~2017-06-02 7:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 21:00 [PATCH] uapi/linux/a.out.h: don't use deprecated system-specific predefines Zack Weinberg
2017-06-02 7:10 ` Christoph Hellwig [this message]
2017-06-02 12:06 ` Zack Weinberg
2017-06-02 19:12 ` Linus Torvalds
2017-06-14 12:43 ` Zack Weinberg
2017-06-14 15:14 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170602071014.GA16118@infradead.org \
--to=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=zackw@panix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox