[Top][All Lists]

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

Re: [libtool 2.2.6] linking -static with uninstalled shared library gene

From: Bob Friesenhahn
Subject: Re: [libtool 2.2.6] linking -static with uninstalled shared library generates invalid rpath
Date: Wed, 4 Nov 2009 12:25:01 -0600 (CST)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Wed, 4 Nov 2009, Stanislav Brabec wrote:

When linking a binary which contains -static in its LDFLAGS and the
library is linked against an uninstalled library which does not contain
-static in its LDFLAGS and configure was called with --disable-static,
libtool generates invalid command line that embeds RPATH to the
uninstalled shared library location.

It could be considered even as a security issue, as such binary may load
malicious library from a possibly world writable area.

Is this true after the library/program has been installed with libtool using --mode=finish?


Attachment shows an example, where the final linking expands to:

/bin/sh ./libtool --tag=CC   --mode=link gcc  -g -O2 -static  -o hallolib 
hallolib-hallolib.o ./libhallo/libhallo.la
libtool: link: gcc -g -O2 -o hallolib hallolib-hallolib.o  
./libhallo/.libs/libhallo.so -Wl,-rpath 

Guessing thet the correct line should be:
libtool: link: gcc -g -O2 -o .libs/hallolib hallolib-hallolib.o  
and wrapper should be written

Best Regards / S pozdravem,

Stanislav Brabec
software developer
SUSE LINUX, s. r. o.                          e-mail: address@hidden
Lihovarsk√° 1060/12           tel: +420 284 028 966, +49 911 740538747
190 00 Praha 9                                  fax: +420 284 028 951
Czech Republic                                    http://www.suse.cz/

Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

reply via email to

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