Skip to contentSkip to conversation

hide kernel only code in asm-powerpc/elf.h

PATCH In review Olaf Hering 3 participants 3 messages Jan 26, 2008 – Jan 30, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hide kernel only code in asm-powerpc/elf.h

stuff inside CONFIG_* should not be exported via make headers-install

---
 include/asm-powerpc/elf.h |    2 ++
 1 file changed, 2 insertions(+)
include/asm-powerpc/elf.h +2 -0
@@ -420,6 +420,7 @@ do {									\
 /* Keep this the last entry.  */
 #define R_PPC64_NUM		107
 
+#ifdef __KERNEL__
 #ifdef CONFIG_SPU_BASE
 /* Notes used in ET_CORE. Note name is "SPU/<fd>/<filename>". */
 #define NT_SPU		1
@@ -427,5 +428,6 @@ do {									\
 #define ARCH_HAVE_EXTRA_ELF_NOTES
 
 #endif /* CONFIG_SPU_BASE */
+#endif /* __KERNEL__ */
 
 #endif /* _ASM_POWERPC_ELF_H */
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Olaf Hering

stuff inside CONFIG_* should not be exported via make headers-install

I think at some point I even had a script to automatically check for this kind of bug. Using any #ifdef CONFIG_* in an exported header is guaranteed to be a bug, because we don't export config.h.

	Arnd <><
#2 lore raw
In reply to Olaf Hering
Quoted 7 lines · Olaf Hering

stuff inside CONFIG_* should not be exported via make headers-install

---
 include/asm-powerpc/elf.h |    2 ++
 1 file changed, 2 insertions(+)

Thanks Olaf, I noticed that once but forgot to fix it.

cheers

Signature · 8 lines
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person