From: Lars-Peter Clausen <lars@metafoo.de>
To: David Howells <dhowells@redhat.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: UAPI fdpic problems
Date: Mon, 15 Oct 2012 11:02:52 +0200 [thread overview]
Message-ID: <507BD13C.9020103@metafoo.de> (raw)
Hi,
I just tried to build 3.7-rc1 and hit some problems when trying to build the
fdpic elf loader:
fs/binfmt_elf_fdpic.c:60: warning: ‘struct elf_fdpic_params’ declared inside
parameter list
fs/binfmt_elf_fdpic.c:60: warning: its scope is only this definition or
declaration, which is probably not what you want
fs/binfmt_elf_fdpic.c:62: warning: ‘struct elf_fdpic_params’ declared inside
parameter list
fs/binfmt_elf_fdpic.c:66: warning: ‘struct elf_fdpic_params’ declared inside
parameter list
fs/binfmt_elf_fdpic.c:73: warning: ‘struct elf_fdpic_params’ declared inside
parameter list
fs/binfmt_elf_fdpic.c:77: warning: ‘struct elf_fdpic_params’ declared inside
parameter list
fs/binfmt_elf_fdpic.c:124: warning: ‘struct elf_fdpic_params’ declared
inside parameter list
fs/binfmt_elf_fdpic.c:123: error: conflicting types for ‘elf_fdpic_fetch_phdrs’
fs/binfmt_elf_fdpic.c:60: error: previous declaration of
‘elf_fdpic_fetch_phdrs’ was here
...
The problem is caused by commit 607ca46e97a ("UAPI: (Scripted) Disintegrate
include/linux").
This is the change made by the patch to elf-fdpic.h, where struct
elf_fdpic_params is declared.
--- a/include/linux/elf-fdpic.h
+++ b/include/uapi/linux/elf-fdpic.h
@@ -31,6 +31,7 @@ struct elf32_fdpic_loadmap {
#define ELF32_FDPIC_LOADMAP_VERSION 0x0000
+#ifndef __KERNEL__
/*
* binfmt binary parameters structure
*/
@@ -58,7 +59,6 @@ struct elf_fdpic_params {
#define ELF_FDPIC_FLAG_PRESENT 0x80000000
};
-#ifdef __KERNEL__
#ifdef CONFIG_MMU
extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params,
struct elf_fdpic_params
So the patch removed the #ifdef __KERNEL__ around
elf_fdpic_arch_lay_out_mm() and added a #ifndef __KERNEL__ around both
struct elf_fdpic_params and elf_fdpic_arch_lay_out_mm(), which does not seem
to make much sense, since both are used (only?) inside the kernel. David do
you know why your script made this change?
The fix I'm using for now is the following, but I'm not quite sure if it is
the correct solution.
--- a/include/uapi/linux/elf-fdpic.h
+++ b/include/uapi/linux/elf-fdpic.h
@@ -31,7 +31,7 @@ struct elf32_fdpic_loadmap {
#define ELF32_FDPIC_LOADMAP_VERSION 0x0000
-#ifndef __KERNEL__
+#ifdef __KERNEL__
/*
* binfmt binary parameters structure
*/
Thanks,
- Lars
reply other threads:[~2012-10-15 9:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=507BD13C.9020103@metafoo.de \
--to=lars@metafoo.de \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.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