.so dynamic library mangling tool

Sergey Kuznetsov tlug-9a/WvBvX2Qpg9hUCZPvPmw at public.gmane.org
Sun Dec 5 03:12:46 UTC 2004


May be my thoughts was presented in a wrong way.
I perfectly know that libz.so is a part of any distribution ( I am using 
Gentoo )
The issue was not the library itself ( the library at the right place, 
at /lib directory )
but with the .so file itself.
that file is a optional part of the Asterisk PBX program, and it's G.729 
codec library,
and specifically for GLIB 2.3 X86_64 platform under Gentoo.
The error Asterisk gives me is:

[codec_g729a.so]Dec  4 19:34:04 WARNING[16384]: loader.c:248 
ast_load_resource: /usr/lib/asterisk/modules/codec_g729a.so: undefined 
symbol: gzread
Dec  4 19:34:04 WARNING[16384]: loader.c:429 load_modules: Loading 
module codec_g729a.so failed!

The ldd saying about codec_g729a.so is:
# ldd codec_g729a.so
        libc.so.6 => /lib/libc.so.6 (0x0000002a9567d000)
        /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 
(0x000000552aaaa000)

The nm -D codec_g729a.so saying is:
                 U gzclose
                 U gzdopen
                 U gzread

The nm -D /lib/libz.so saying is:
00000000000035f0 T gzclose
00000000000026a0 T gzdopen
0000000000002ab0 T gzread

The objdump -x codec_g729a.so saying is:
Dynamic Section:
  NEEDED      libc.so.6
  INIT        0x35c0

As you can see here is the NEEDED libz.so is absent. And this is I am 
trying to fix. Thats why I need such tool who can mangle the any 
library's header I want.


All the Best!
Sergey.

SlackRat wrote:

>Sergey Kuznetsov <tlug-9a/WvBvX2Qpg9hUCZPvPmw at public.gmane.org> writes:
>
>  
>
>>Hi there!
>>
>>Does any one knows .so dynamic library mangling tool?
>>
>>I have to modify precompiled library ( there is no sources at all till
>>Monday, but I have to finish my stuff before that time )
>>and issue is: this library cannot find gzread, gzopen, etc. because in
>>library's header is no such thing as NEEDED libz.so.
>>
>>I have to modify that library to add there that field: NEEDED libz.so
>>but I cannot remember any tool who can mangle
>>the libraries in such way.
>>
>>If someone knows any tool, which allows to do such stuff, can you send
>>me the name, or answer here if somebody
>>will be interested as well.
>>
>>    
>>
>
>I don't know what distribution you are using, but libz is as far as I know
>part of most and perhaps all basic gnu/linux systems.
>
>Take a long hard look at your installation files as you may in fact already
>have libz somewhere.
>
>In slackware it is part of the 'a' series in aaa_elflibs-9.2.0-i486-1.tgz
>
>Hoping this might throw some light on your problem
>
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20041204/45e467aa/attachment.html>


More information about the Legacy mailing list