[Top][All Lists]

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

Re: How use --whole-archive ld arg with libtool ?

From: Alain BARBET
Subject: Re: How use --whole-archive ld arg with libtool ?
Date: Sun, 19 May 2002 02:58:25 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc2) Gecko/20020510

Alain BARBET wrote:
Static libraries don't understand -export-dynamic, it doesn't
make any sense.  If you configure with --disable-shared
then you won't have any modules to dlopen, because
they will be static, and you would already have the resolved
symbols in your executable.

Ok. Take example in libtool doc:

"burger$ libtool gcc -module -o foo.lo \
                hello.lo -rpath /usr/local/lib -lm"
"If symbols from your executable are needed to satisfy unresolved references in a library you want to dlopen you will have to use the flag -export-dynamic. You should use -export-dynamic while linking the executable that calls dlopen:
burger$ libtool gcc -export-dynamic -o hell-dlopener main.o"

What I want do is:
burger$ libtool gcc -export-dynamic -o hell-dlopener main.o --whole-archive myneededlib.a --no-whole-archive

Because symbols needed for are in mynneededlib.a, not in main.o, and gcc will not export these symbols without --whole-archive ... and libtool give me: gcc -export-dynamic -o hell-dlopener main.o -Wl,--export-dynamic --whole-archive --no-whole-archive myneededlib.a

Not what I want ... You understand ?

reply via email to

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