I updated redhat-rpm-config to instruct ld to reject linking shared objects with undefined symbols. Such undefined symbols break symbol versioning because the are not necessarily bound to the correct symbol version at run time. (rhbz#1535422)

### Disable strict symbol checks in the link editor (ld)

By default, the link editor will refuse to link shared objects which
contain undefined symbols.  In some cases (such as when a DSO is
loaded as a plugin and is expected to bind to symbols in the main
executable), undefined symbols are expected.  In this case, you can
add

    %undefine _strict_symbol_defs_build

to the RPM spec file to disable these strict checks.  Alternatively,
you can pass `-z undefs` to ld (written as `-Wl,-z,undefs` on the gcc
command line).  The latter needs binutils 2.29.1-12.fc28 or later.


This is also part of the build flags documentation at:

<https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/buildflags.md>

Thanks,
Florian
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org

Reply via email to