[linux-dvb] [PATCH] Moving ALPS BSRV2 tuner handling code to
separate file.
Oliver Endriss
o.endriss at gmx.de
Sat Apr 15 23:10:08 CEST 2006
Trent Piepho wrote:
> On Sat, 15 Apr 2006, Michael Krufky wrote:
> > I'd like to make another point:
> >
> > If we are putting these commonly used fuctions into nim-specific header
> > files, we STILL end up with duplicated binary code. Since all of the
> > code is now in these small header files, the c code is no longer
> > duplicated, however, these functions are still being compiled staticly
> > into each driver that uses them.
> >
> > I propose the following:
> >
> > We should apply Perceval's patch, but instead of creating "bsrv2.h" ,
> > that we instead call it, "nim_bsrv2.c", and then we should create a
> [...]
> >
> > This way, instead of the same code being statically compiled into each
> > driver, we could compile them once as a module, and have that code
> > reused by the other drivers.
>
> This would give you a lot of tiny little modules. A driver would of course
> need to load the modules for every single tuner it supported. That's going
> to be cumbersome, and all that module overhead might well add up to more
> than any savings.
Ack.
> What about doing things the old fashioned way, with a library? Stick all the
> nim (WTF is nim?) code into a directory, one nim per c file, and compile them
> all into a nim.a library. Then each driver can link against nim.a and will
> get the nim functions it needs, and not the ones it doesn't. The prototypes
> could be in a single nim.h, or in nim_{foo,bar,baz}.h for each nim.
Please correct me if I'm wrong:
A library does not wourk because all drivers share the same name space.
If you try to load two drivers which have the same 'NIM' linked-in, you
will get a 'duplicate symbol' error...
CU
Oliver
--
--------------------------------------------------------
VDR Remote Plugin available at
http://www.escape-edv.de/endriss/vdr/
--------------------------------------------------------
More information about the linux-dvb
mailing list