lkml.org 
[lkml]   [2003]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.5 kbuild: use of '-z muldefs' for LD?
On Mon, 9 Jun 2003, Christoph Hellwig wrote:

> On Mon, Jun 09, 2003 at 01:56:59PM +0200, Jaroslav Kysela wrote:
> > one object file for more targets. Example:
> >
> > ------
> > snd-ice1712-objs := ice1712.o delta.o hoontech.o ews.o ak4xxx.o
> > snd-ice1724-objs := ice1724.o amp.o revo.o aureon.o ak4xxx.o
> >
> > # Toplevel Module Dependency
> > obj-$(CONFIG_SND_ICE1712) += snd-ice1712.o
> > obj-$(CONFIG_SND_ICE1724) += snd-ice1724.o
> > ------
> >
> > The ak4xxx.o module is shared and has defined a few public functions.
> > Unfortunately, the default build-in.o rule fails when targets are
> > requested to be included into the solid kernel because the public
> > functions are duplicated in snd-ice1712.o and snd-ice17124.o.
> >
> > I can instruct the ld compiler to ignore the multiple definitions using
> > '-z muldefs':
> >
> > EXTRA_LDFLAGS = -z muldefs
> >
> > But it seems like a hack for me.
> > Does anybody have another idea to solve my problem?
>
> Move ak4xxx.o out of the multi-obj rules. Just declare a new helper-
> config option CONFIG_SND_AK4XXX that gets defined by all drivers
> using it and add
>
> obj-$(CONFIG_SND_AK4XXX) += ak4xxx.o
>
> You'll just have to make sure to export all symbols in 2.5

But this solution will create a new kernel module. The shared code is
really small and having small codes in separated modules is waste of
memory in my eyes.

Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.143 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site