The "just-link-everything-together" approach has been taken several times.
Look at busybox, for example.  There is one for FreeBSD (the name escapes
me) that purports to automate it.  The first problem is symbol collision.
What if both programs have a "counter-39" variable?  The linker will crap
out.  So, you really have to have something process all the object files
and rename or preface any duplicate symbols, or do it manually...  Also,
the gain I have always looked for is the reduction in overhead of the C
runtime.  The library issues aren't really an advantage.  You still have a
huge waste of space if you statically link to libc6, you still have to fix
your include files, there isn't a big win there.  I personally recommend
you get the libc5-kit from my add-ons directory and figure out the issues
for doing libc5-linking and just make it work with libc5.  If you are
adding a significant number of things, and are unwilling to learn the
tricks to make it work with libc5, then just make your own libc6 setup,
and use libc6 versions of everything, and go all the way libc6.  For what
you are trying to do, linking a bunch of programs into one big kludge and
fixing all the symbol conflicts is going to be mroe trouble than it is
worth.  Um, the BSD one is called "crunch", research it if you want.  Or
just use the busybox approaches (and fix symbol collisions manually...).
I suspect you can get everything compiled to libc5 without enough trouble
to make it worth the other approaches... and if you do, why not just
_start_ with a libc6 bootdisk?

-Tom

On Sun, 5 Dec 1999, Joonas Timo Taavetti Kekoni wrote:

> Date: Sun, 5 Dec 1999 00:14:31 +0200 (EET)
> From: Joonas Timo Taavetti Kekoni <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [tomsrtbt] Wild idea
> 
> I am just wondering If i could create mechanism that wold rename
> main methods to main1,main2 ..etc
> 
> and the have main like:
> 
> int main(int argc,char *argv[])
> {
>       if(0==strcmp(argv[0],"mp3blaster")
>       {       retunn main1(argc,arv);
>       } 
>       if(0==strcmp(argv[0],"sndconfig");
>       {       return main2(argc,argv);
>       }
>       ...
> }
> 
> Then I would compile everything into a single static libc6
> executable and have symbolic links for all the names!.
> 
> This process would be easier automate that backporting libraries
> and hunting down missing includes.
> 
> -- 
>       _-  Joonas Kekoni       OH2MTF      I                           -_
>       _-internet:     [EMAIL PROTECTED]   I       DO NOT EAT.         -_
>       _-slowmail:     j{mer{ntaival 7a176 I                           -_
>       _-              02150Espoo          I      It is a monitor      -_
>       _-              Finland/Europe      I                           -_
> 

Reply via email to