diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py index 4ad5136f79e..7ea6b5c97c3 100755 --- a/contrib/devtools/symbol-check.py +++ b/contrib/devtools/symbol-check.py @@ -62,6 +62,7 @@ ALLOWED_LIBRARIES = { 'librt.so.1', # real-time (clock) 'ld-linux-x86-64.so.2', # 64-bit dynamic linker 'ld-linux.so.2', # 32-bit dynamic linker +'ld-linux-armhf.so.3', # 32-bit armhf dynamic linker # bitcoin-qt only 'libX11-xcb.so.1', # part of X11 'libX11.so.6', # part of X11 diff --git a/contrib/gitian-descriptors/gitian-linux-armhf.yml b/contrib/gitian-descriptors/gitian-linux-armhf.yml index c47b9f5571f..020e2c2dff6 100644 --- a/contrib/gitian-descriptors/gitian-linux-armhf.yml +++ b/contrib/gitian-descriptors/gitian-linux-armhf.yml @@ -23,9 +23,20 @@ remotes: "dir": "bitcoin" files: [] script: | + # Avoid exporting *any* symbols from the executable + # This avoids conflicts between the libraries statically linked into bitcoin and any + # libraries we may link dynamically (such as Qt and OpenSSL, see issue #4094). + # It also avoids start-up overhead to not export any unnecessary symbols. + # To do this, build a linker script that marks all symbols as local. + LINKER_SCRIPT=$HOME/build/linker_version_script + echo ' + { + local: *; + };' > $LINKER_SCRIPT WRAP_DIR=$HOME/wrapped HOSTS="arm-linux-gnueabihf" - CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++" + CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports" + CONFIGLDFLAGS="-static-libstdc++ -Wl,--version-script=$LINKER_SCRIPT" FAKETIME_HOST_PROGS="" FAKETIME_PROGS="date ar ranlib nm strip" @@ -95,9 +106,10 @@ script: | mkdir -p ${INSTALLPATH} tar --strip-components=1 -xf ../$SOURCEDIST - ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} + ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} LDFLAGS="${CONFIGLDFLAGS}" make ${MAKEOPTS} make ${MAKEOPTS} -C src check-security + make ${MAKEOPTS} -C src check-symbols make install-strip cd installed find . -name "lib*.la" -delete