autoconf
[Top][All Lists]
Advanced

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

Re: Excluding Dynamically Linked Libraries


From: Jan Kratochvil
Subject: Re: Excluding Dynamically Linked Libraries
Date: Fri, 17 Feb 2006 12:12:03 +0100
User-agent: Mutt/1.4.2.1i

Hi,

On Thu, 16 Feb 2006 19:33:22 +0100, Chuck Wolber wrote:
...
> http://www.chuckwolber.com/rpm-patches.tar.gz

there were some "lethal" issues like cat(1) instead of echo(1).

# The objective is to be able to run the following and get no output:
# /usr/bin/ldd ~/rpmbuild/BUILD/rpm-4.3.3/.libs/rpm | grep libbz2

I really get no noutput. No libbz2 dependency there. Fedora Core 4.

According to your description - are you really aware that dynamic libraries can
be ldd(1)ed like executables and they have their own dependencies?
if you link any dynamic (.so) library the resulting executable will NOT
explicitely depend on any dynamic libraries the linked libraries but still
ldd(1) displays all the transitively linked libraries as if the executable
would be depending on them itself.

+ echo 'int main(void) { return 0; }' >link.c
+ gcc -s -o link link.c
+ ldd link
        libc.so.6 => /lib/libc.so.6 (0x00461000)
        /lib/ld-linux.so.2 (0x00443000)
+ ldd /usr/lib/libncurses.so
        libc.so.6 => /lib/libc.so.6 (0x00461000)
        libdl.so.2 => /lib/libdl.so.2 (0x005b3000)
        /lib/ld-linux.so.2 (0x00443000)
+ gcc -s -o link link.c -lncurses
+ ldd link
        libncurses.so.5 => /usr/lib/libncurses.so.5 (0x07063000)
        libc.so.6 => /lib/libc.so.6 (0x00461000)
        libdl.so.2 => /lib/libdl.so.2 (0x005b3000)
        /lib/ld-linux.so.2 (0x00443000)
+ grep --binary-files=binary libncurses link
Binary file link matches
+ grep --binary-files=binary libdl link
+ echo done
done

And somehow I would suggest putting there more RAM / better CPU than stripping
down everything around...


Regards,
Lace




reply via email to

[Prev in Thread] Current Thread [Next in Thread]