build: set CMAKE_VISIBILITY_INLINES_HIDDEN in REDUCE_EXPORTS
What changed, and why it matters
This is a build-system hardening change for Bitcoin Core. It tells the compiler to hide inline C++ functions from the list of symbols exported by shared libraries and executables. This reduces the attack surface by making fewer internal functions visible to outside code, but it is not a fix for a known exploitable bug.
No urgent action required. Treat as routine build hardening. Users building from source with REDUCE_EXPORTS (default where supported) will automatically gain reduced symbol exposure. Review downstream release notes for any mention of ABI or plugin compatibility concerns.
Security signals we found
Defense-in-depth symbol visibility reduction
Build hardening, not a runtime vulnerability fix
No functional code change
No CVE or advisory referenced in commit
Evidence from the diff
The commit adds set(CMAKE_VISIBILITY_INLINES_HIDDEN ON) inside the existing REDUCE_EXPORTS block in CMakeLists.txt. Combined with the already-set CMAKE_CXX_VISIBILITY_PRESET hidden and linker flags –exclude-libs,ALL / -no_exported_symbols, this causes GCC/Clang to treat inline methods as hidden-visibility symbols so they do not appear in the dynamic symbol table. This is a defense-in-depth build hardening measure; it does not change runtime semantics for valid programs and only matters when REDUCE_EXPORTS is enabled.
Changed components
CMakeLists.txt build configurationREDUCE_EXPORTS build optionSymbol export table of compiled binariesInspect captured patch +1 / −0
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ffd2da14..8d67320b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -601,6 +601,7 @@ endif()
if(REDUCE_EXPORTS)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
+ set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
try_append_linker_flag("-Wl,--exclude-libs,ALL" TARGET core_interface)
try_append_linker_flag("-Wl,-no_exported_symbols" VAR CMAKE_EXE_LINKER_FLAGS)
endif()
Why this scored 18/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.