HomePhabricator

Remove symbols exported by jemalloc from the symbols check

Description

Remove symbols exported by jemalloc from the symbols check

Summary:
This diff replaces the --exclude-libs ALL linker flag with a the more
narrow scoped exclusion of the symbols from the libstdc++.

The only remaining exported symbols are the global symbols from
jemalloc, that will be linked in place of the libc equivalents
(malloc, free, etc.). Allowing these symbols to remain exported make
it possible for the loader to use them for dynamic libraries also. This
fixes the segfault issue with bitcoin-qt on linux when
-DENABLE_REDUCE_EXPORTS=ON is set.

Test Plan:
Reproduce the Gitian build conditions + jemalloc:

cmake -GNinja .. \
  -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Linux64.cmake \
  -DENABLE_REDUCE_EXPORTS=ON \
  -DENABLE_STATIC_LIBSTDCXX=ON \
  -DENABLE_GLIBC_BACK_COMPAT=ON \
  -DUSE_LD_GOLD=OFF \
  -DUSE_JEMALLOC_EXPERIMENTAL=ON
ninja symbol-check

Run the Gitian builds.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D6361

Details

Provenance
FabienAuthored on Jun 3 2020, 14:13
FabienPushed on Jun 4 2020, 11:28
Reviewer
Restricted Project
Differential Revision
D6361: Remove symbols exported by jemalloc from the symbols check
Parents
rABC0e737f05298f: Fix the build with Qt 5.15
Branches
Unknown
Tags
Unknown