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

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...

--
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