From be74f368e44605c4bf0cf3c4c2696f380ae22a29 Mon Sep 17 00:00:00 2001 From: Kai Germaschewski Date: Mon, 30 Dec 2002 10:14:32 -0600 Subject: kbuild: Fix kallsyms on 64 bit archs The generated .tmp_kallsyms.S needs to use .long / .quad for 32/64 bit archs. To know which arch we're compiling for, we use the preprocessor and BITS_PER_LONG from . Unfortunately, asm/types.h was not safe to include from assembler files, so lots of #ifndef __ASSEMBLY__ needed to be added - should be fine now, untested for != i386, though. --- include/asm-ppc/types.h | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'include/asm-ppc') diff --git a/include/asm-ppc/types.h b/include/asm-ppc/types.h index 26dd36dec197..3c74a27697d5 100644 --- a/include/asm-ppc/types.h +++ b/include/asm-ppc/types.h @@ -21,10 +21,22 @@ typedef struct { __u32 u[4]; } __attribute((aligned(16))) __vector128; +/* + * XXX allowed outside of __KERNEL__ for now, until glibc gets + * a proper set of asm headers of its own. -- paulus + */ +typedef unsigned short umode_t; + +#endif /* __ASSEMBLY__ */ + #ifdef __KERNEL__ /* * These aren't exported outside the kernel to avoid name space clashes */ +#define BITS_PER_LONG 32 + +#ifndef __ASSEMBLY__ + typedef signed char s8; typedef unsigned char u8; @@ -39,8 +51,6 @@ typedef unsigned long long u64; typedef __vector128 vector128; -#define BITS_PER_LONG 32 - /* DMA addresses are 32-bits wide */ typedef u32 dma_addr_t; typedef u64 dma64_addr_t; @@ -50,14 +60,8 @@ typedef u64 sector_t; #define HAVE_SECTOR_T #endif -#endif /* __KERNEL__ */ - -/* - * XXX allowed outside of __KERNEL__ for now, until glibc gets - * a proper set of asm headers of its own. -- paulus - */ -typedef unsigned short umode_t; - #endif /* __ASSEMBLY__ */ +#endif /* __KERNEL__ */ + #endif -- cgit v1.2.3