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

Re: [woody] libraries for a modular installer



On Mon, Jun 19, 2000 at 12:18:39PM -0700, Joey Hess wrote:
> bug1 wrote:
[snip]
> > I dont understand how mklibs.sh works, so this might be a silly idea,
> > but.... would it be possible to make a library for the modules that only
> > contains parts of the library that the modules binaries require and that
> > arent in the base module ?  
> 
> I'd say it's doable somehow, but hardly easy. It'd be effectively like
> splitting libc into a bunch of little libraries with a few symbols each and
> link each binary to various different little libraries.

If you can convince mklibs.sh to split things up like that, then it would
probably be possible to link everything against just the main libc.so and
LD_PRELOAD the other libraries into use, which would solve at least the
linking part of the problem (assuming it works).

Something like
  for m in $MODULES; do
    unpack_module(m)
    (
      for l in /tmp/module_$m/libs/*; do
        export LD_PRELOAD="$LD_PRELOAD $l"
      done
      /tmp/module_$m/run
    )
  done

Letting libraries get out of sync could be fairly painful, though...

-- Nathaniel

-- 
When the flush of a new-born sun fell first on Eden's green and gold,
Our father Adam sat under the Tree and scratched with a stick in the mould;
And the first rude sketch that the world had seen was joy to his mighty heart,
Till the Devil whispered behind the leaves, "It's pretty, but is it Art?"
  - The Conundrum of the Workshops, Rudyard Kipling



Reply to: