This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Symbols manipulation
- From: Nick Clifton <nickc at redhat dot com>
- To: "Fernando Ronci" <ferr at render dot com dot ar>
- Cc: <binutils at sources dot redhat dot com>
- Date: 25 Mar 2003 08:37:51 +0000
- Subject: Re: Symbols manipulation
- References: <001f01c2f24a$7bcbf120$0401a8c0@render.com.ar>
Hi Fernando,
> I have a program in binary format (no sources available) that
> crashes with a couple of "dynamic linker: symbol not found" errors
> when executed. With 'ldd -r' I found that the program was
> dynamically linked to libsocket.so.1 and libc.so.1 and that the two
> "symbol not found" errors arise because neither "inet_pton" nor
> "inet_ntop" exist in those two libraries. Then, by means of 'nm' I
> was able to locate the two objects in libresolv.so.1 , library that
> is never called by the binary program.
>
> Now, I have a question: Using one of the binutils, is it possible to
> "patch" the binary file so that it includes libresolv.so.1 or, put
> the other way around, extract "inet_pton" and "inet_ntop" from
> libresolv.so.1 and embed them in libsocket.so.1 for example ?
If you have the sources for your libc (or you downlaod the sources for
glibc) you could build yur own copy of that library with the inet_*
functions added.
Cheers
Nick