]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: passing the "-z defs" linker flag to prevent undefined symbols
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 25 Jan 2018 09:35:58 +0000 (09:35 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 9 Feb 2018 11:05:10 +0000 (11:05 +0000)
commita1f6030def1353fa6cdbe4d96600e3eca3f45122
tree250278b78df7f5cd8e09adb11926fb40f140dffc
parent9e3c9af98abf5069e378874a3a08ba60d10d702f
build: passing the "-z defs" linker flag to prevent undefined symbols

Undefined symbols are a bad thing in general because they can get
resolved in unexpected ways at runtime if multiple sources provide the
same symbol name. For example both glibc and libtirpc may provide XDR
symbols and we want to ensure that we resolve to libtirpc if that's what
we originally built against.

The toolchain maintainers thus strongly recommend that all applications
use the '-z defs' linker flag to prevent undefined symbols. This is
shortly becoming part of the default linker flags for RPMs. As an added
benefit this aligns Linux builds with Windows builds, where the linker
has never permitted undefined symbols.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
configure.ac
daemon/Makefile.am
m4/virt-linker-no-undefined.m4 [new file with mode: 0644]
src/Makefile.am
tools/Makefile.am