Skip to contentSkip to conversation

multiple definition of show_mem for pxa

DISCUSSION Jonathan Cameron 2 participants 2 messages Mar 23, 2011

lore
Share & tools
lore
#0 lore raw

Hi all

Can't immediately track down what changed to cause this issue, but building with current mainline is giving me:

lib/lib.a(show_mem.o): In function `show_mem':
show_mem.c:(.text+0x13c): multiple definition of `show_mem' arch/arm/mm/built-in.o:copypage-xscale.c:(.text+0xfcc): first defined here
make: *** [vmlinux.o] Error 1

Anyone know what caused this?

There are indeed two versions of mem_info, the generic one and one in arch/arm/mm/init.c but I think they have both been around for some time without issue.

Thanks,

Jonathan

#1 lore raw
Quoted 11 lines · Jonathan Cameron

Hi all

Can't immediately track down what changed to cause this issue, but building with current mainline is giving me:

lib/lib.a(show_mem.o): In function `show_mem':
show_mem.c:(.text+0x13c): multiple definition of `show_mem' arch/arm/mm/built-in.o:copypage-xscale.c:(.text+0xfcc): first defined here
make: *** [vmlinux.o] Error 1

Quoted 5 lines

Anyone know what caused this?

There are indeed two versions of mem_info, the generic one and one in arch/arm/mm/init.c but I think they have both been around for some time without issue.

The generic one doesn't work on ARM, and it's supposed to override the generic one. It seems that ddd588b5dd55f14320379961e47683db4e4c1d90 causes the generic one to be pulled in due to a reference to __show_mem() which then causes show_mem() to be defined twice.

The change in lib/show_mem.c needs to also be ported to ARMs own version.