On 01/25/2018 04:37 PM, Petr Pisar wrote:
On 2018-01-25, Daniel P Berrangé <berrange@xxxxxxxxxx> wrote:
Not neccessarily - with perl, the APIs used by extensions are actually
in libperl.so, not /usr/bin/perl, and the extensions link to libperl.so
So perl binary modules ought to still build without undefined symbols,
as IIUC they're not relying on things in /usr/bin/perl
Perl fails too
<https://kojipkgs.fedoraproject.org/work/tasks/5805/24425805/build.log>.
While extensions link to libperl.so that itself links to libpthread.so
that defines pthread_getspecific symbol, the extensions linking fails
because they use dTHX macro, provided by included thread.h via perl.h,
that expands to pthread_getspecific.
In other words it looks like -z defs requires that all used symbols
are provided by directly linked libraries. I.e. we will have to patch
Perl so that extensions add -lptrhread to the linker flags.
Interesting. This leads to:
$ eu-readelf --symbols=.dynsym /usr/lib64/perl5/auto/POSIX/POSIX.so |
grep specific
52: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UNDEF
pthread_getspecific
So the symbol version is missing, and there is no guarantee for
compatibility with future glibc versions. 8-(
This is exactly the kind of problem -z defs intends to catch.
Thanks,
Florian
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx