Skip to content

Commit

Permalink
JitBuilder method symbols should use TR_System linkage convention
Browse files Browse the repository at this point in the history
Discovered on Aarch64 but it's something we should do consistently
for all platforms.

Signed-off-by: Mark Stoodley <[email protected]>
  • Loading branch information
mstoodle committed Aug 23, 2023
1 parent 52e4b6a commit 0ab1886
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/ilgen/OMRIlBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2022,6 +2022,7 @@ OMR::IlBuilder::ComputedCall(const char *functionName, int32_t numArgs, ...)
TR_ASSERT_FATAL(resolvedMethod, "Could not identify function %s\n", functionName);

TR::SymbolReference *methodSymRef = symRefTab()->findOrCreateComputedStaticMethodSymbol(JITTED_METHOD_INDEX, -1, resolvedMethod);
methodSymRef->getSymbol()->getMethodSymbol()->setLinkage(TR_System);
return genCall(methodSymRef, numArgs, argValues, false /*isDirectCall*/);
}

Expand All @@ -2041,6 +2042,7 @@ OMR::IlBuilder::ComputedCall(const char *functionName, int32_t numArgs, TR::IlVa
TR_ASSERT_FATAL(resolvedMethod, "Could not identify function %s\n", functionName);

TR::SymbolReference *methodSymRef = symRefTab()->findOrCreateComputedStaticMethodSymbol(JITTED_METHOD_INDEX, -1, resolvedMethod);
methodSymRef->getSymbol()->getMethodSymbol()->setLinkage(TR_System);
return genCall(methodSymRef, numArgs, argValues, false /*isDirectCall*/);
}

Expand Down Expand Up @@ -2143,6 +2145,7 @@ OMR::IlBuilder::Call(const char *functionName, int32_t numArgs, ...)
TR_ASSERT_FATAL(resolvedMethod, "Could not identify function %s\n", functionName);

TR::SymbolReference *methodSymRef = symRefTab()->findOrCreateStaticMethodSymbol(JITTED_METHOD_INDEX, -1, resolvedMethod);
methodSymRef->getSymbol()->getMethodSymbol()->setLinkage(TR_System);
return genCall(methodSymRef, numArgs, argValues);
}

Expand All @@ -2156,6 +2159,7 @@ OMR::IlBuilder::Call(const char *functionName, int32_t numArgs, TR::IlValue ** a
TR_ASSERT_FATAL(resolvedMethod, "Could not identify function %s\n", functionName);

TR::SymbolReference *methodSymRef = symRefTab()->findOrCreateStaticMethodSymbol(JITTED_METHOD_INDEX, -1, resolvedMethod);
methodSymRef->getSymbol()->getMethodSymbol()->setLinkage(TR_System);
return genCall(methodSymRef, numArgs, argValues);
}

Expand Down

0 comments on commit 0ab1886

Please sign in to comment.