On Thursday 01 of November 2007, Jeff Johnson wrote:
> There's a segfault reported last week by arekm when rpm is compiled
> to use PCRE because of a missing linkage from rpmmire in librpmio
> to -lpcre.
>
> No idea whether miscompiled or actually missing.
>
> Could someone take a look please?
-Wl,-as-needed is too smart here
[arekm@tarm ~]$ gcc test.c -lpcre
[arekm@tarm ~]$ objdump -p a.out | grep NEEDE
NEEDED libpcre.so.0
NEEDED libc.so.6
[arekm@tarm ~]$ gcc test.c -Wl,-as-needed -lpcre
[arekm@tarm ~]$ objdump -p a.out | grep NEEDE
NEEDED libc.so.6
[arekm@tarm ~]$
but the problem is more generic one.
If a program is linked to 2 or more libraries that provide exactly the same
symbol (function) - from which library symbol is going to be used? randomly?
Where it's said that pcre regcomp() will be used and not glibc one if progam
is linked to both glibc and pcre?
> 73 de Jeff
--
Arkadiusz Mi¶kiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/
Received on Thu Nov 1 14:16:01 2007