Skip to contentSkip to conversation

linux/elfcore.h: hide kernel functions

PATCH In review Roland McGrath 2 participants 2 messages May 22, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux/elfcore.h: hide kernel functions

The declarations for elf_core_extra_phdrs() et al got added on the wrong side of #ifdef __KERNEL__ in linux/elfcore.h so they leak into the user header copy and we get a warning at build time about it.

---
 include/linux/elfcore.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
include/linux/elfcore.h +2 -2
index e687bc3..394a3e0 100644
@@ -150,8 +150,6 @@ static inline int elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregse
 }
 #endif
 
-#endif /* __KERNEL__ */
-
 /*
  * These functions parameterize elf_core_dump in fs/binfmt_elf.c to write out
  * extra segments containing the gate DSO contents.  Dumping its
@@ -168,4 +166,6 @@ extern int
 elf_core_write_extra_data(struct file *file, size_t *size, unsigned long limit);
 extern size_t elf_core_extra_data_size(void);
 
+#endif /* __KERNEL__ */
+
 #endif /* _LINUX_ELFCORE_H */
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines

The declarations for elf_core_extra_phdrs() et al got added on the wrong side of #ifdef __KERNEL__ in linux/elfcore.h so they leak into the user header copy and we get a warning at build time about it.

Ah, good. this one kill annoying warnings.
Thanks.

Quoted 29 lines
---
 include/linux/elfcore.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
include/linux/elfcore.h +2 -3
index e687bc3..394a3e0 100644
@@ -150,8 +150,6 @@ static inline int elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregse
 }
 #endif
 
-#endif /* __KERNEL__ */
-
 /*
  * These functions parameterize elf_core_dump in fs/binfmt_elf.c to write out
  * extra segments containing the gate DSO contents.  Dumping its
@@ -168,4 +166,6 @@ extern int
 elf_core_write_extra_data(struct file *file, size_t *size, unsigned long limit);
 extern size_t elf_core_extra_data_size(void);
 
+#endif /* __KERNEL__ */
+
 #endif /* _LINUX_ELFCORE_H */
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/