linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] unexport linux/elfcore.h
@ 2020-06-11  1:01 Al Viro
  2020-06-11 15:23 ` Al Viro
  0 siblings, 1 reply; 4+ messages in thread
From: Al Viro @ 2020-06-11  1:01 UTC (permalink / raw)
  To: linux-api; +Cc: Linus Torvalds

	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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-11 21:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-11  1:01 [RFC] unexport linux/elfcore.h Al Viro
2020-06-11 15:23 ` Al Viro
2020-06-11 20:01   ` Linus Torvalds
2020-06-11 21:35     ` Al Viro

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).