Skip to content

Add opt-in QUIC_OPENSSL_SYMBOL_PREFIX to namespace bundled OpenSSL symbols (Linux)#6029

Closed
leikong wants to merge 2 commits into
microsoft:mainfrom
leikong:kong/openssl-symbol-prefix
Closed

Add opt-in QUIC_OPENSSL_SYMBOL_PREFIX to namespace bundled OpenSSL symbols (Linux)#6029
leikong wants to merge 2 commits into
microsoft:mainfrom
leikong:kong/openssl-symbol-prefix

Conversation

@leikong
Copy link
Copy Markdown
Contributor

@leikong leikong commented May 24, 2026

Description

This PR adds an opt-in CMake cache variable, QUIC_OPENSSL_SYMBOL_PREFIX, that namespace-prefixes every globally-visible symbol in the bundled OpenSSL static archives (and rewrites MsQuic's own undefined references to match). When QUIC_OPENSSL_SYMBOL_PREFIX is left empty (the default), no new code runs and the build is byte-for-byte identical to today.

Motivation

When MsQuic is statically linked into a process that also pulls in another copy of OpenSSL — for example, a system libcrypto.so.3 brought in transitively by an unrelated dependency (a logging library, a database client, any C++ library that itself uses OpenSSL) — the two OpenSSL copies share the same global C symbols (SSL_CTX_new, EVP_*, BN_*, ERR_*, the per-module init constructors, …). The dynamic linker resolves every reference to the first definition loaded, so all callers — including MsQuic — silently end up sharing one OpenSSL's state machine while their headers and ABI assumptions came from the other. Typical symptoms:

  • Crashes in OPENSSL_init_crypto / RAND_load_file when one OpenSSL's per-module init runs against the other's global registries.
  • Spurious SSL handshake failures when callbacks installed against one SSL_CTX see the other's vtable layout.
  • ABI mismatches when one OpenSSL is 3.0.x (system libcrypto.so.3 on Ubuntu 22.04 / RHEL 9) and MsQuic's bundled OpenSSL is 3.5.x (required for SSL_set_quic_tls_cbs).

Note that MsQuic's bundled-OpenSSL path always links libssl.a / libcrypto.a statically into MsQuic, regardless of QUIC_BUILD_SHAREDSHARED just controls whether the result is libmsquic.so or libmsquic.a. Building SHARED with --exclude-libs=ALL therefore strips the (statically linked) OpenSSL symbols from libmsquic.so's dynamic export table, which is sufficient when the consumer dlopens/links against libmsquic.so itself. It does not help:

  • Static consumers that link libmsquic.a into a final binary — symbols flow straight into the executable's global table.
  • Consumers that bundle libmsquic.a into their own .so — same exposure unless they also --exclude-libs it.
  • Either case at runtime — even with exports hidden, both libcryptos coexist in one address space and OpenSSL's process-global init/registries (OPENSSL_init_crypto, error/atexit tables, RAND state) can still collide.

How it works

When QUIC_OPENSSL_SYMBOL_PREFIX=<prefix> is passed at CMake configure time, the build:

  1. Builds the bundled OpenSSL submodule normally to produce libssl.a and libcrypto.a.
  2. Extracts every globally-defined external symbol from those archives via nm --defined-only --extern-only and writes a redefine-syms file mapping each <sym> to <prefix><sym>.
  3. Produces prefixed copies via objcopy --redefine-syms=<file> (touches both definitions and undefined references inside each member object).
  4. Applies the same --redefine-syms step as a POST_BUILD action on libmsquic_platform.a so MsQuic's own undefined references to OpenSSL (from tls_openssl.c, tls_quictls.c, crypt_openssl.c, selfsign_openssl.c) get rewritten to match.
  5. Routes the existing OpenSSL interface target at the prefixed archives, so the rest of the build is unchanged.

The result is a libmsquic.{a,so} whose only externally-visible OpenSSL symbols are the prefixed ones. The dynamic linker has no reason to resolve them against any other OpenSSL copy present in the same process.

Constraints

Constraint Why
Linux only (CX_PLATFORM=linux) Uses GNU binutils objcopy --redefine-syms. macOS would need llvm-objcopy >= 13 (untested); PE/COFF lacks a flat-namespace symbol table. Rejected with FATAL_ERROR on other platforms.
Bundled OpenSSL only External/system OpenSSL is owned by the caller and cannot be renamed. Rejected with FATAL_ERROR if combined with QUIC_USE_EXTERNAL_OPENSSL, QUIC_OPENSSL_INCLUDE_DIR, QUIC_OPENSSL_LIB_DIR, QUIC_OPENSSL_ROOT_DIR, or QUIC_USE_SYSTEM_LIBCRYPTO.
Cross-compile aware ${CMAKE_NM} / ${CMAKE_OBJCOPY} are forwarded to the helper script, so aarch64-linux-gnu-objcopy etc. are used when configured.

Files

  • cmake/openssl-prefix-rename.sh — helper script (gen-syms / apply modes; honors NM / OBJCOPY env vars).
  • cmake/PrefixOpenSSLArchives.cmake — helper function prefix_openssl_archives(PREFIX … INPUT_TARGET … OUTPUT_TARGET …).
  • CMakeLists.txt — new option + validation + plumbing in the bundled-OpenSSL branch.
  • src/platform/CMakeLists.txtPOST_BUILD rename on libmsquic_platform.a.
  • docs/OpenSSLSymbolPrefix.md — motivation, usage, caveats, verification recipe.

Future direction

The cleanest long-term solution is for OpenSSL itself to expose a configure-time --symbol-prefix= option that compiles every public symbol with the prefix baked in (an analog of BoringSSL's BSSL_NAMESPACE or LibreSSL's recurring discussion). I plan to file that issue upstream with this PR linked as concrete prior art demonstrating consumer demand. Until that lands, this CMake helper provides an equivalent at link time without requiring an OpenSSL fork.

Testing

Manual verification (local, this PR's branch)

Built on Linux x86_64 with -G Ninja -DQUIC_TLS_LIB=quictls -DQUIC_BUILD_SHARED=OFF:

With -DQUIC_OPENSSL_SYMBOL_PREFIX=msqtest_:

# 0 unprefixed defined globals in the renamed archives:
nm --defined-only --extern-only build/openssl-prefixed/msqtest_/libssl.a \
  | awk '$2 ~ /^[TDRBWVC]$/ {print $3}' | grep -vc '^msqtest_'    # → 0
nm --defined-only --extern-only build/openssl-prefixed/msqtest_/libcrypto.a \
  | awk '$2 ~ /^[TDRBWVC]$/ {print $3}' | grep -vc '^msqtest_'    # → 0

# 0 unprefixed OpenSSL undefs in msquic_platform.a, 161 prefixed undefs:
nm -u build/obj/Release/libmsquic_platform.a | awk '$1=="U"{print $2}' \
  | grep -E '^(SSL_|EVP_|BN_|ERR_|X509_|OPENSSL_|RAND_|RSA_|EC_|BIO_|ASN1_|PEM_|CRYPTO_)' \
  | wc -l                                                         # → 0
nm -u build/obj/Release/libmsquic_platform.a | awk '$1=="U"{print $2}' \
  | grep -c '^msqtest_'                                           # → 161

Without the option (default build):

  • 138 normal unprefixed OpenSSL undefs in libmsquic_platform.a.
  • build/openssl-prefixed/ directory not created.
  • Build time identical to baseline (no new compilation; the rename rules simply don't fire).

Production validation

The same prefix-rename technique has been deployed in Microsoft's meru codebase (a consumer of MsQuic). It is currently validated across this matrix:

  • Release x86_64
  • Release_ASAN, Debug_ASAN, Debug_UBSAN, Debug_TSAN x86_64
  • arm_debug_crosscompile (aarch64)
  • clang_tidy

See microsoft/meru-common#4011 for the consumer-side integration that ports the same helper script + CMake module pattern that this PR upstreams.

MsQuic CI coverage

The default (option-empty) path is unchanged, so existing CI should be unaffected. The option-set path is Linux-only and opt-in, so it does not need to enter the default matrix. Happy to add a single Linux CI leg that exercises -DQUIC_OPENSSL_SYMBOL_PREFIX=msquic_ if maintainers think that's worthwhile.

Documentation

New file: docs/OpenSSLSymbolPrefix.md documents motivation, usage, constraints, and a verification recipe.

…mbols

When MsQuic is statically linked into a process that also pulls in another
copy of OpenSSL (e.g. a system libcrypto.so.3 brought in transitively by an
unrelated dependency), the two OpenSSL copies share global C symbols and
the dynamic linker resolves every reference to whichever was loaded first.
The result is silent state-sharing between two OpenSSLs whose headers and
ABIs may not match - typically a crash in OPENSSL_init_crypto, spurious SSL
handshake failures, or worse.

This change introduces an opt-in cache variable, QUIC_OPENSSL_SYMBOL_PREFIX,
that when non-empty:

  1. Generates a redefine-syms file from the bundled libssl.a and
     libcrypto.a using 'nm --defined-only --extern-only', mapping each
     <sym> to <prefix><sym>.
  2. Produces prefixed copies of both archives via
     'objcopy --redefine-syms=<file>'.
  3. Applies the same redefine-syms to libmsquic_platform.a as a POST_BUILD
     step so MsQuic's own undefined references to OpenSSL get rewritten too.
  4. Routes the existing OpenSSL interface target at the prefixed archives.

The resulting libmsquic.{a,so} has no externally-visible OpenSSL symbols
that match a normal OpenSSL build, so a second OpenSSL in the same process
cannot resolve against it (or vice versa).

Constraints
-----------
- Linux only. macOS would need llvm-objcopy >= 13 (untested); PE/COFF lacks
  a flat-namespace symbol table and would need an entirely different
  approach. Rejected with FATAL_ERROR on other platforms.
- Bundled OpenSSL only. External/system OpenSSL is owned by the caller and
  cannot be renamed; rejected with FATAL_ERROR if combined with
  QUIC_USE_EXTERNAL_OPENSSL, QUIC_OPENSSL_INCLUDE_DIR, QUIC_OPENSSL_LIB_DIR,
  QUIC_OPENSSL_ROOT_DIR, or QUIC_USE_SYSTEM_LIBCRYPTO.
- Cross-compile aware: ${CMAKE_NM} and ${CMAKE_OBJCOPY} are honored.

Backward compatibility
----------------------
QUIC_OPENSSL_SYMBOL_PREFIX defaults to empty. When empty, no new code runs
and the build is byte-for-byte identical to the prior behavior.

Files
-----
- cmake/openssl-prefix-rename.sh   helper script (gen-syms / apply)
- cmake/PrefixOpenSSLArchives.cmake helper function
- CMakeLists.txt                   option + plumbing
- src/platform/CMakeLists.txt      POST_BUILD rename on libmsquic_platform.a
- docs/OpenSSLSymbolPrefix.md      motivation, usage, caveats

Verification
------------
Local build with -DQUIC_OPENSSL_SYMBOL_PREFIX=msqtest_ -DQUIC_TLS_LIB=quictls
-DQUIC_BUILD_SHARED=OFF on Linux x86_64:
  - libssl.a:    0 unprefixed defined globals (all prefixed with msqtest_).
  - libcrypto.a: 0 unprefixed defined globals.
  - libmsquic_platform.a: 0 unprefixed OpenSSL undefs, 161 prefixed undefs.
Local build with no option set: behavior unchanged, openssl-prefixed/ dir
not created.

The same prefix-rename technique has been deployed in production in
Microsoft's meru codebase (consumer of msquic) across x86_64 Release,
ASAN, UBSAN, TSAN, clang-tidy, and aarch64 cross-compile configurations.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.55%. Comparing base (23711d2) to head (1af0e6e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6029      +/-   ##
==========================================
+ Coverage   85.03%   85.55%   +0.51%     
==========================================
  Files          60       60              
  Lines       18792    18792              
==========================================
+ Hits        15980    16077      +97     
+ Misses       2812     2715      -97     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an opt-in CMake cache variable (QUIC_OPENSSL_SYMBOL_PREFIX) to namespace-prefix all globally visible symbols in MsQuic’s bundled OpenSSL static archives on Linux, and rewrites MsQuic’s OpenSSL undefined references to match. This mitigates symbol collisions when a process contains another OpenSSL copy.

Changes:

  • Introduces QUIC_OPENSSL_SYMBOL_PREFIX option with Linux-only / bundled-OpenSSL-only validation and wiring.
  • Adds CMake + shell helpers to generate an nm-derived symbol map and apply objcopy --redefine-syms to produce prefixed archives.
  • Applies a POST_BUILD rename step to libmsquic_platform.a so MsQuic’s OpenSSL references resolve against the prefixed archives; adds new documentation.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
CMakeLists.txt Adds the cache option, validation, module include, and routes OpenSSL interface target to prefixed archives when enabled.
src/platform/CMakeLists.txt Adds a POST_BUILD step to rewrite OpenSSL references inside libmsquic_platform.a when the option is enabled.
cmake/PrefixOpenSSLArchives.cmake New CMake helper that generates a redefine-syms map and creates prefixed copies of libssl.a/libcrypto.a.
cmake/openssl-prefix-rename.sh New helper script implementing gen-syms and apply modes via nm and objcopy.
docs/OpenSSLSymbolPrefix.md New documentation describing motivation, usage, constraints, and verification steps.

Comment thread cmake/PrefixOpenSSLArchives.cmake Outdated
Comment thread cmake/PrefixOpenSSLArchives.cmake
Comment thread src/platform/CMakeLists.txt Outdated
Comment thread docs/OpenSSLSymbolPrefix.md
Copy link
Copy Markdown
Contributor Author

@leikong leikong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep-mode code review (Claude Opus 4.7 extra-high + GPT-5.5 blind parallel Pass 1s, merged by Claude Opus 4.7 high reasoning). 2 major + 7 minor + 1 grouped nit. Highest-impact summary:

  • major Configure-time zero-byte placeholders for the renamed .a files can shadow real outputs when source archives are restored from a CI cache with older mtimes — link silently consumes empty archives. cmake/PrefixOpenSSLArchives.cmake lines 156-167.
  • major BUILD_SHARED_LIBS=ON + QUIC_OPENSSL_SYMBOL_PREFIX=<set> breaks install(EXPORT msquic) because OpenSSL's link interface gains an unexported OpenSSLQuicPrefixed (declared INTERFACE IMPORTED GLOBAL). Either reject the combination, drop IMPORTED and add OpenSSLQuicPrefixed to the export set, or skip the OpenSSL-targets export when prefix is set.
  • minor (both passes) The nm filter [TDRBWVC] omits IFUNC types i/I; not exercised by the current bundled OpenSSL config but trivially-safe defensive coverage for future submodule bumps.
  • minor (both passes) QUIC_OPENSSL_SYMBOL_PREFIX is unvalidated and is interpolated both as a symbol prefix and as a build-tree path component — needs a ^[A-Za-z_][A-Za-z0-9_]*$ guard.
  • minor Several other items: nm stderr swallowed, dlsym-based OpenSSL plug-ins escape rename (docs), POST_BUILD lacks OBJECT_DEPENDS on the syms file, INTERFACE_LINK_LIBRARIES regex is fragile, add_dependencies on an INTERFACE IMPORTED target is a no-op, docs verification commands have grep -vc exit-code traps.
  • nit (grouped) Thin-archive guard, LTO incompatibility callout, readlink -f portability, warn when prefix is set with QUIC_TLS_LIB=schannel, CMAKE_MODULE_PATH pollution in add_subdirectory, two documentation accuracy nits.

No blockers. Default-disabled path is byte-identical, agreed.

Comment thread cmake/PrefixOpenSSLArchives.cmake Outdated
Comment thread cmake/PrefixOpenSSLArchives.cmake
Comment thread cmake/openssl-prefix-rename.sh
Comment thread CMakeLists.txt
Comment thread cmake/openssl-prefix-rename.sh
Comment thread src/platform/CMakeLists.txt Outdated
Comment thread cmake/PrefixOpenSSLArchives.cmake Outdated
Comment thread docs/OpenSSLSymbolPrefix.md
Comment thread docs/OpenSSLSymbolPrefix.md
Comment thread cmake/openssl-prefix-rename.sh
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Comment thread CMakeLists.txt
Comment thread src/platform/CMakeLists.txt Outdated
Comment thread docs/OpenSSLSymbolPrefix.md Outdated
Copy link
Copy Markdown
Contributor Author

@leikong leikong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review — deep mode (Opus-extra-high + GPT-5.5 blind parallel Pass 1s; Opus high-reasoning merge & audit)

Five major findings, mostly around the POST_BUILD step's fragility in CMake's dependency graph and missing validation. The opt-in design and Linux-only gate are sound; concerns are about edge cases that silently produce broken/un-prefixed binaries — exactly the failure modes this PR is meant to prevent.

Highlights (by severity)

  • major — POST_BUILD rename is outside the dependency graph. The rename on libmsquic_platform.a won't re-fire when only QUIC_OPENSSL_SYMBOL_PREFIX, redefine.syms, or openssl-prefix-rename.sh changes — and won't re-fire after an interruption between ar and objcopy. Reconfiguring with a new prefix on an existing build tree produces a corrupted incremental build that silently leaks unprefixed OpenSSL symbols (the exact failure mode this PR exists to prevent). Restructure as a tracked add_custom_command(OUTPUT ...) that produces a separate libmsquic_platform.prefixed.a and route consumers at that artifact.
  • major — Prefix charset/length validation missing. The value is interpolated straight into objcopy --redefine-syms lines and into the openssl-prefixed/<PREFIX>/ path. Whitespace, #, leading digit, /, .., shell metachars all silently corrupt the rename map or build tree. Reject prefixes not matching ^[A-Za-z_][A-Za-z0-9_]*$ with FATAL_ERROR.
  • major — Validation block silently ignored with QUIC_TLS_LIB=schannel. The whole prefix block lives inside if(QUIC_TLS_LIB STREQUAL quictls OR ...openssl). Setting QUIC_OPENSSL_SYMBOL_PREFIX with schannel (or unset on Windows) is silently no-op'd — no FATAL_ERROR, no warning. Lift the prefix-set guard out so it errors loudly with an incompatible TLS lib.
  • major — install(EXPORT msquic) broken when prefixing is enabled. With BUILD_SHARED_LIBS=ON, OpenSSL's INTERFACE_LINK_LIBRARIES now references OpenSSLQuicPrefixed (INTERFACE IMPORTED GLOBAL), which can't be exported. The generated share/msquic/msquic-targets.cmake will fail at install or reference build-tree-only paths.
  • major — awk regex ^[TDRBWVC]$ misses I (IFUNC) and u (unique-global). OpenSSL 3.x on x86_64 Linux does ship IFUNCs (e.g. AES-NI/SHA-NI dispatch resolvers). Those defined externs won't be in the rename map → MsQuic's undefs to those names don't get renamed at POST_BUILD → unprefixed OpenSSL symbols leak through, again defeating the PR's purpose.

Minor findings

  • gen-syms swallows nm stderr with 2>/dev/null and treats a 0-line syms file as success. Real errors (bad cross-compile nm, malformed archive) are hidden, and a silently-empty syms file produces a no-op rename — build looks green, symbols are not prefixed.
  • apply mode does cpobjcopy in place on the destination with no trap. Ctrl-C between the two leaves a fresh, valid copy of the un-renamed input with a newer mtime than the source → next build skips the rename.
  • file(WRITE "") placeholder pattern in PrefixOpenSSLArchives.cmake is unnecessary and masks a failure mode: if the custom_command silently fails to run, consumers see a 0-byte archive, which ar/ld accept as valid-but-empty — final link succeeds with NO OpenSSL implementation, deferring failure to runtime.
  • cmake/PrefixOpenSSLArchives.cmake _out_dir parses OpenSSLQuic's INTERFACE_LINK_LIBRARIES via a hardcoded libssl\.a$ / libcrypto\.a$ regex. Fragile against any future genexpr wrapping of the Linux paths — the FATAL_ERROR doesn't include the genexpr content, making diagnosis hard.
  • Inconsistent env-var forwarding: PrefixOpenSSLArchives.cmake conditionally forwards NM=/OBJCOPY= only when set; src/platform/CMakeLists.txt always forwards them, so CMAKE_NM="" (empty) silently re-defaults to host nm even on cross-builds.
  • Documentation under-states the reconfigure caveat: changing QUIC_OPENSSL_SYMBOL_PREFIX in an existing build tree requires a clean / --fresh configure.

Nits

  • src/platform/CMakeLists.txt comment references submodules/CMakeLists.txt for the rename wiring; the rename actually lives in cmake/PrefixOpenSSLArchives.cmake invoked from the top-level CMakeLists.txt.
  • docs/OpenSSLSymbolPrefix.md verification recipe uses nm -gC (demangling) but the rename script doesn't — false-positive risk if downstream consumers contain any C++ TUs.
  • Doc example uses mymsquic_ literally while the same doc tells users to pick a globally-unique prefix; copy-paste produces collisions across projects.
  • awk 'NF==3' strict-equality filter is fragile vs. nm-wrappers that emit <member>: <addr> <type> <name> (4 fields).
  • No command -v existence check on $NM/$OBJCOPY before invocation.
  • The directory openssl-prefixed/<OLD_PREFIX>/ is orphaned in the build tree when the prefix changes — disk leak.

(Multi-model deep review; merge by Claude Opus 4.7 high-reasoning. Inline comments below mark the exact lines.)

Comment thread src/platform/CMakeLists.txt
Comment thread CMakeLists.txt
Comment thread CMakeLists.txt
Comment thread cmake/openssl-prefix-rename.sh
Comment thread cmake/openssl-prefix-rename.sh Outdated
Comment thread src/platform/CMakeLists.txt
Comment thread src/platform/CMakeLists.txt
Comment thread docs/OpenSSLSymbolPrefix.md
Comment thread docs/OpenSSLSymbolPrefix.md
Comment thread docs/OpenSSLSymbolPrefix.md Outdated
* CMakeLists.txt: add outer-most QUIC_OPENSSL_SYMBOL_PREFIX validation that
  errors on non-quictls/openssl TLS_LIB (instead of silently ignoring the
  value), enforces a ^[A-Za-z_][A-Za-z0-9_]*$ charset/length on the prefix,
  and blocks the QUIC_BUILD_SHARED=ON path with FATAL_ERROR until the
  prefixed IMPORTED target is wired into install(EXPORT msquic).
* cmake/openssl-prefix-rename.sh:
    - command -v check on NM/OBJCOPY for clearer config errors;
    - awk symbol-type set broadened to include I (STT_GNU_IFUNC, used by
      OpenSSL 3.x AES-NI/SHA-NI dispatch resolvers) and switched to NF>=3
      so non-IFUNC nm output with extra columns still matches;
    - stop swallowing nm stderr;
    - empty-syms-file guard so a misconfigured nm fails loudly instead of
      letting objcopy --redefine-syms run as a no-op;
    - apply mode now does atomic tmp+rename with a trap when in_ar != out_ar.
* cmake/PrefixOpenSSLArchives.cmake:
    - drop the file(WRITE "") placeholder libssl.a/libcrypto.a, which masked
      real failures from gen-syms/apply;
    - broaden the libssl/libcrypto INTERFACE_LINK_LIBRARIES fatal-error to
      surface the actual property value and explain the genex limitation;
    - document the single-config build-tree path assumption.
* src/platform/CMakeLists.txt:
    - fix misleading comment (rename source location);
    - mirror the helper's conditional NM=/OBJCOPY= env forwarding so unset
      CMAKE_NM/CMAKE_OBJCOPY does not forward empty strings.
* docs/OpenSSLSymbolPrefix.md:
    - replace mymsquic_ examples with <your_prefix> placeholder and call out
      the charset requirement;
    - add a Changing the prefix value section documenting the platform.a
      POST_BUILD staleness and the clean-rebuild workaround;
    - add BUILD_SHARED_LIBS=OFF and prefix-change-requires-rebuild rows to
      the constraints table;
    - update Verification recipe: use 'nm -g' (the script does not demangle),
      mirror the script's awk symbol-type set including I, use grep -v|wc -l
      to avoid grep -vc's non-zero exit on count=0, and use the actual
      build/linux/<arch>_<tls>/bin path.

Build + symbol-rename verified with -DQUIC_TLS_LIB=quictls
-DQUIC_OPENSSL_SYMBOL_PREFIX=msqtest_ -DQUIC_BUILD_SHARED=OFF on Linux x86_64:
0 unprefixed defined-extern globals in libssl.a, 0 unprefixed OpenSSL undefs
in libmsquic_platform.a.
@leikong
Copy link
Copy Markdown
Contributor Author

leikong commented May 25, 2026

Superseded by #6031 — same head SHA 1af0e6e4f, identical content. Migrating off personal fork (leikong/meru-staging-msquic) so the head branch lives on microsoft/msquic directly. Re-direct review activity to #6031.

@leikong leikong closed this May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants