File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,6 +59,16 @@ struct dd_slice { const unsigned char *ptr; uintptr_t len; };
5959// don't handle during our self-relocation.
6060extern const struct dd_slice DD_TRAMPOLINE_BIN __attribute__((visibility ("hidden" )));
6161
62+ // Actually, the "split" build configuration requires that, when building
63+ // ddtrace.la (yes, .la is apparently stil a thing), we provide a definition for
64+ // the symbol, otherwise we get a linker error: "undefined reference to
65+ // `DD_TRAMPOLINE_BIN'" / "relocation R_X86_64_PC32 against undefined hidden
66+ // symbol `DD_TRAMPOLINE_BIN' can not be used when making a shared object". So
67+ // provide here a weak hidden definition in the hopes that the final linking
68+ // step will ignore it in favor of the non-weak version in the rust library
69+ // libddtrace_php.a.
70+ const struct dd_slice DD_TRAMPOLINE_BIN __attribute__((visibility ("hidden" ), weak )) = {0 };
71+
6272// ---- Structs {{{
6373
6474struct loaded_lib {
You can’t perform that action at this time.
0 commit comments