|
| 1 | +# Symbols to hide (make local / private_extern) in DatadogSDKTesting.framework. |
| 2 | +# |
| 3 | +# WHY: every dependency we statically link into the framework exports its |
| 4 | +# symbols by default. When a project-under-test links its OWN copy of the same |
| 5 | +# dependency (e.g. opentelemetry-swift), dyld coalesces the duplicate weak |
| 6 | +# type-metadata symbols to a single definition process-wide. If the two copies |
| 7 | +# differ in version/layout, one image ends up reading objects through the |
| 8 | +# other's metadata -> `swift_getObjectType` walks a bad pointer -> SEGV_ACCERR. |
| 9 | +# Marking these symbols non-exported stops dyld from coalescing them: each image |
| 10 | +# binds to its own copy. Only the public DatadogSDKTesting API stays exported. |
| 11 | +# |
| 12 | +# Passed to ld64 via `-unexported_symbols_list` (see UNEXPORTED_SYMBOLS_FILE / |
| 13 | +# OTHER_LDFLAGS on the framework target). Patterns use fnmatch globs and are |
| 14 | +# matched against the full mangled symbol name (leading underscore included). |
| 15 | +# |
| 16 | +# CAVEAT: this only prevents dyld symbol coalescing. It does NOT change the |
| 17 | +# mangled names, so name-keyed Swift runtime lookups (dynamic casts, Codable, |
| 18 | +# NSClassFromString) can still cross images in rare cases. For a hard guarantee |
| 19 | +# use module renaming instead. See the OpenTelemetry-isolation discussion. |
| 20 | +# |
| 21 | +# NOTE: Swift mangles the module name as a length-prefixed component |
| 22 | +# (e.g. `16OpenTelemetryApi`, 16 == strlen). It appears not only at the start of |
| 23 | +# symbols the module DEFINES but also mid-string in every symbol that REFERENCES |
| 24 | +# one of its types, so the globs are intentionally unanchored (`*...*`). |
| 25 | +# Keying on the length prefix keeps us from clobbering our own identifiers such |
| 26 | +# as `OpenTelemetryContextProvider` (mangled `28OpenTelemetry...`). |
| 27 | + |
| 28 | +# --- opentelemetry-swift-core --- |
| 29 | +*16OpenTelemetryApi* |
| 30 | +*16OpenTelemetrySdk* |
| 31 | + |
| 32 | +# --- swift-code-coverage --- |
| 33 | +*12CodeCoverage* |
| 34 | +*21CodeCoverageCollector* |
| 35 | +*18CodeCoverageParser* |
| 36 | + |
| 37 | +# --- Kronos --- |
| 38 | +*6Kronos* |
| 39 | + |
| 40 | +# --- SigmaSwiftStatistics --- |
| 41 | +*20SigmaSwiftStatistics* |
| 42 | + |
| 43 | +# --- EventsExporter (internal SDK module, not part of the public product) --- |
| 44 | +*14EventsExporter* |
| 45 | + |
| 46 | +# --- KSCrash (C/ObjC + Swift) --- |
| 47 | +# Modules: KSCrashRecording / RecordingCore / RecordingCoreSwift / ReportingCore |
| 48 | +# / Core / Filters / Sinks / Installations / DemangleFilter / etc. |
| 49 | +# NOTE: hiding C/ObjC symbols stops the linker-level duplicate, but the ObjC |
| 50 | +# runtime still registers classes by name and KSCrash installs process-wide |
| 51 | +# signal/exception handlers; if a project-under-test also links KSCrash that |
| 52 | +# handler-install conflict is a separate concern this list does NOT solve. |
| 53 | +# All KSCrash C functions are namespaced under `ks` (`_ksobjc_`, `_kscm_`, |
| 54 | +# `_ksjson_`, `_kscrash_`, ...); inline log wrappers are under `_i_ks`. |
| 55 | +*KSCrash* |
| 56 | +_ks* |
| 57 | +_i_ks* |
| 58 | +_OBJC_CLASS_$_KS* |
| 59 | +_OBJC_METACLASS_$_KS* |
0 commit comments