From: Al Viro <viro@zeniv.linux.org.uk>
To: linux-api@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Subject: [RFC] unexport linux/elfcore.h
Date: Thu, 11 Jun 2020 02:01:15 +0100 [thread overview]
Message-ID: <20200611010115.GZ23230@ZenIV.linux.org.uk> (raw)
In include/uapi/linux/elfcore.h we have
...
#include <linux/elf.h>
...
struct elf_prstatus
{
...
elf_gregset_t pr_reg; /* GP registers */
and that ends up in glibc /usr/include/linux/elfcore.h. What
does *not* end up in exported headers is
1) include of asm/elf.h from linux/elf.h - asm/elf.h
is not exported at all and linux/elf.h is our uapi/linux/elf.h,
which doesn't include asm/elf.h at all
2) and definitions of elf_gregset_t whatsoever.
Now, glibc (as well as other libc variants) does contain
such definition - in /usr/include/sys/procfs.h. Along with
a definition of struct elf_prstatus.
IOW, #include <linux/elfcore.h> in any userland program is
going to blow - either due to redefinition of struct elf_prstatus
or due to incomplete type of member in that definition, depending
upon the headers we'd pulled in earlier.
Seeing that there's no userland code that would manage to pull that
file, is there any point exporting it at all?
next reply other threads:[~2020-06-11 1:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 1:01 Al Viro [this message]
2020-06-11 15:23 ` [RFC] unexport linux/elfcore.h Al Viro
2020-06-11 20:01 ` Linus Torvalds
2020-06-11 21:35 ` Al Viro
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=20200611010115.GZ23230@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-api@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).