diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2007-07-26 13:41:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-26 14:35:18 -0400 |
commit | 045e72acf16054c4ed2760e9a8edb19a08053af1 (patch) | |
tree | 225e037554493e61e26b8c208740ffcb86fac89e | |
parent | 2ebc3cc920e7a076539aa8badbaf0919540a3438 (diff) |
fix 'dynreloc miscount' link error on Powerpc
Nathan Lynch <ntl@pobox.com> reported:
2.6.23-rc1 breaks the build for 64-bit powerpc for me (using
maple_defconfig):
LD vmlinux.o
powerpc64-unknown-linux-gnu-ld: dynreloc miscount for
kernel/built-in.o, section .opd
powerpc64-unknown-linux-gnu-ld: can not edit opd Bad value
make: *** [vmlinux.o] Error 1
However, I see a possibly related binutils patch:
http://article.gmane.org/gmane.comp.gnu.binutils/33650
It was tracked down to be caused by the weak prototype
declaration in mm.h:
__attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma);
But there is no need to make the declaration weak - only the definition
needs to be marked weak. So drop the weak declaration. And in the process
drop the duplicate definition in page.h for powerpc.
Note: the arch_vma_name fix for x86_64 needs to be applied first to avoid
breaking x86_64
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Nathan Lynch <ntl@pobox.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/asm-powerpc/page.h | 1 | ||||
-rw-r--r-- | include/linux/mm.h | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/include/asm-powerpc/page.h b/include/asm-powerpc/page.h index 10c51f457d48..236a9210e5fc 100644 --- a/include/asm-powerpc/page.h +++ b/include/asm-powerpc/page.h | |||
@@ -190,7 +190,6 @@ extern void copy_user_page(void *to, void *from, unsigned long vaddr, | |||
190 | extern int page_is_ram(unsigned long pfn); | 190 | extern int page_is_ram(unsigned long pfn); |
191 | 191 | ||
192 | struct vm_area_struct; | 192 | struct vm_area_struct; |
193 | extern const char *arch_vma_name(struct vm_area_struct *vma); | ||
194 | 193 | ||
195 | #include <asm-generic/memory_model.h> | 194 | #include <asm-generic/memory_model.h> |
196 | #endif /* __ASSEMBLY__ */ | 195 | #endif /* __ASSEMBLY__ */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index c456c3a1c28e..3e9e8fec5a41 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1246,7 +1246,7 @@ void drop_slab(void); | |||
1246 | extern int randomize_va_space; | 1246 | extern int randomize_va_space; |
1247 | #endif | 1247 | #endif |
1248 | 1248 | ||
1249 | __attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma); | 1249 | const char * arch_vma_name(struct vm_area_struct *vma); |
1250 | 1250 | ||
1251 | #endif /* __KERNEL__ */ | 1251 | #endif /* __KERNEL__ */ |
1252 | #endif /* _LINUX_MM_H */ | 1252 | #endif /* _LINUX_MM_H */ |