aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lld/MachO/InputSection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/lld/MachO/InputSection.cpp')
-rw-r--r--contrib/llvm-project/lld/MachO/InputSection.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/llvm-project/lld/MachO/InputSection.cpp b/contrib/llvm-project/lld/MachO/InputSection.cpp
index 25eb878736d9..df312525df61 100644
--- a/contrib/llvm-project/lld/MachO/InputSection.cpp
+++ b/contrib/llvm-project/lld/MachO/InputSection.cpp
@@ -201,6 +201,12 @@ void ConcatInputSection::writeTo(uint8_t *buf) {
if (target->hasAttr(r.type, RelocAttrBits::LOAD) &&
!referentSym->isInGot())
target->relaxGotLoad(loc, r.type);
+ // For dtrace symbols, do not handle them as normal undefined symbols
+ if (referentSym->getName().startswith("___dtrace_")) {
+ // Change dtrace call site to pre-defined instructions
+ target->handleDtraceReloc(referentSym, r, loc);
+ continue;
+ }
referentVA = resolveSymbolVA(referentSym, r.type) + r.addend;
if (isThreadLocalVariables(getFlags())) {