Skip to content

Commit 2a5e5d0

Browse files
committed
MIPS: fw: arc: add __weak to prom_meminit and prom_free_prom_memory
As far as I understood, prom_meminit() in arch/mips/fw/arc/memory.c is overridden by the one in arch/mips/sgi-ip32/ip32-memory.c if CONFIG_SGI_IP32 is enabled. The use of EXPORT_SYMBOL in static libraries potentially causes a problem for the llvm linker [1]. So, I want to forcibly link lib-y objects to vmlinux when CONFIG_MODULES=y. As a groundwork, we must fix multiple definitions that have previously been hidden by lib-y. The prom_cleanup() in this file is already marked as __weak (because it is overridden by the one in arch/mips/sgi-ip22/ip22-mc.c). I think it should be OK to do the same for these two. [1]: ClangBuiltLinux/linux#515 Reported-by: kbuild test robot <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]> Acked-By: Thomas Bogendoerfer <[email protected]>
1 parent c8bddf4 commit 2a5e5d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/mips/fw/arc/memory.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static int __init prom_memtype_classify(union linux_memtypes type)
117117
return memtype_classify_arc(type);
118118
}
119119

120-
void __init prom_meminit(void)
120+
void __weak __init prom_meminit(void)
121121
{
122122
struct linux_mdesc *p;
123123

@@ -162,7 +162,7 @@ void __weak __init prom_cleanup(void)
162162
{
163163
}
164164

165-
void __init prom_free_prom_memory(void)
165+
void __weak __init prom_free_prom_memory(void)
166166
{
167167
int i;
168168

0 commit comments

Comments
 (0)