[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: making a static binary out a dynamic
- To: "'guy keren'" <choo(at-nospam)actcom.co.il>
- Subject: RE: making a static binary out a dynamic
- From: "Mevorach, Assaf" <assaf.mevorach(at-nospam)intel.com>
- Date: Wed, 3 Jan 2001 22:36:05 -0800
- Cc: ILUG <linux-il(at-nospam)cs.huji.ac.il>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
> -----Original Message-----
> From: guy keren [mailto:choo@actcom.co.il]
> Sent: Thu, January 04, 2001 1:23 AM
> To: Mevorach, Assaf
> Cc: 'erez@savan.com'; ILUG
> Subject: RE: making a static binary out a dynamic
>
>
> On Wed, 3 Jan 2001, Mevorach, Assaf wrote:
>
> > > this is exactly what the linker does - only it does so
> effotrlessly.
> > here you are not right, the linker add the trasitive
> closure of the calls
> > from libc you did, and since it can not
> > add evryfunction on its own it adds the entire object file
> it came from (as
> > you know static librarys are just
> > archive of objects with search key)
> > so by adding only the needed functions you can 'earn' alot of size
>
> yes. you're right here. i forgot abbout this annoying problem.
>
> > now there is no need to complicate it so much, you can get
> the sources of
> > libc very easy, and look there for
> > your functions, or you can disassemble the libc.aand take
> it from there as
> > assembly.
>
> yes, he has access to libc's sources, but not to his application's
> sources... so he'll need to somehow find all symbols it is
> missing, and
> this can only be done as a dynamic method (checking for the U symbols
> using 'nm' will show symbols directly used by the
> application, but then
> you'll need to calculate the closure of all these symbols - doing that
> manualy is a lot of work. also, sometimes an application (or
> a library)
> loads other libraries dynamiclly, and this has to be taken
> into account as
> well...
hey even for the sake of the argument you cant pretend you dont know that
libc DOESNT use dynamic load library (dlopen).
BTW, where/Why did you gather all this knowledge about Linux/Unix
executable and linkable format ?
>
> --
> guy
>
> "For world domination - press 1,
> or dial 0, and please hold, for the creator." -- nob o. dy
>
>
> =================================================================
> To unsubscribe, send mail to linux-il-request@linux.org.il with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail linux-il-request@linux.org.il
>
>
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il