Skip to content

Commit ee46093

Browse files
committed
Messing with DD_TRAMPOLINE_BIN for the nth time
1 parent 12c9823 commit ee46093

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ext/solib_bootstrap.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@
5353
// DD_TRAMPOLINE_BIN is defined in spawn_worker (Rust) as a &[u8] fat pointer,
5454
// i.e. { const u8 *ptr, usize len }.
5555
struct dd_slice { const unsigned char *ptr; uintptr_t len; };
56-
extern const struct dd_slice DD_TRAMPOLINE_BIN;
56+
// Mark the symbol as hidden. This file is actually linked as part of a shared
57+
// library and we don't want to linker to think the symbol could be preempted,
58+
// especially because this could result in GLOB_DAT relocs that we currently
59+
// don't handle during our self-relocation.
60+
extern const struct dd_slice DD_TRAMPOLINE_BIN __attribute__((visibility("hidden")));
5761

5862
// ---- Structs {{{
5963

libdatadog

0 commit comments

Comments
 (0)