Re: Link breakage on all architectures which implement their own show_mem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2011-03-25 at 21:55 +1100, Benjamin Herrenschmidt wrote:
> On Wed, 2011-03-23 at 11:41 -0500, James Bottomley wrote:
> >     oom: suppress nodes that are not allowed from meminfo on oom kill
> > 
> > Is the cause.  What it does is introduce a new __show_mem() which is
> > required by files in mm/, so the object containing it: show_mem.o gets
> > pulled in all the time in the link and that gives every architecture
> > that implements their own show_mem() a link failure because of the
> > double definition.  Library linking works at the file level, not at
> > the
> > function level.  To work, you have to put these functions in separate 
> 
> Can't this be fixed by making show_mem() weak ? Or am I missing
> something ?

Yes, I think so; there are multiple ways of solving this ... part of the
point I was making was that there's little point having something in
lib.a if it always gets linked (which this will because of the multiple
callsites for __show_mem())

James


--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux