Skip to content

Commit 83c3f82

Browse files
committed
DD_TRAMPOLINE_BIN was erroneously on the list of exported syms
But the import can't be declared hidden. In the end the symbol will be in the got but linker to emits a RELATIVE reloc (not GLOB_DAT) -- so should work with our self-relocation.
1 parent 6e96b9d commit 83c3f82

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

ddtrace.sym

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,3 @@ ddog_sidecar_connect
4444
ddog_sidecar_ping
4545
ddog_sidecar_transport_drop
4646
_dd_solib_start
47-
DD_TRAMPOLINE_BIN

ext/solib_bootstrap.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,8 @@
4343
#include <stdnoreturn.h>
4444

4545
// DD_TRAMPOLINE_BIN is defined in spawn_worker (Rust) as a &[u8] fat pointer,
46-
// i.e. { const u8 *ptr, usize len }. Both this C object and the Rust object
47-
// are linked into the same ddtrace.so, so the linker resolves the reference
48-
// internally. The hidden visibility attribute on the C declaration tells the
49-
// compiler/linker to emit a RELATIVE reloc (not GLOB_DAT) for this reference,
50-
// making it accessible before ld.so runs: the visibility does not affect how
51-
// Rust exports the symbol, only how this C translation unit references it.
46+
// i.e. { const u8 *ptr, usize len }.
5247
struct dd_slice { const unsigned char *ptr; uintptr_t len; };
53-
__attribute__((visibility("hidden")))
5448
extern const struct dd_slice DD_TRAMPOLINE_BIN;
5549

5650
// ---- Structs {{{

0 commit comments

Comments
 (0)