public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* UAPI fdpic problems
@ 2012-10-15  9:02 Lars-Peter Clausen
  0 siblings, 0 replies; only message in thread
From: Lars-Peter Clausen @ 2012-10-15  9:02 UTC (permalink / raw)
  To: David Howells; +Cc: linux-kernel@vger.kernel.org

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-10-15  9:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-15  9:02 UAPI fdpic problems Lars-Peter Clausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox