Commit 045e72ac authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Linus Torvalds

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: default avatarSam 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2ebc3cc9
...@@ -190,7 +190,6 @@ extern void copy_user_page(void *to, void *from, unsigned long vaddr, ...@@ -190,7 +190,6 @@ extern void copy_user_page(void *to, void *from, unsigned long vaddr,
extern int page_is_ram(unsigned long pfn); extern int page_is_ram(unsigned long pfn);
struct vm_area_struct; struct vm_area_struct;
extern const char *arch_vma_name(struct vm_area_struct *vma);
#include <asm-generic/memory_model.h> #include <asm-generic/memory_model.h>
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
......
...@@ -1246,7 +1246,7 @@ void drop_slab(void); ...@@ -1246,7 +1246,7 @@ void drop_slab(void);
extern int randomize_va_space; extern int randomize_va_space;
#endif #endif
__attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma); const char * arch_vma_name(struct vm_area_struct *vma);
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _LINUX_MM_H */ #endif /* _LINUX_MM_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment