Skip to content

Commit

Permalink
Fix missing relocations in NativeAOT x86 output (#98740)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipnavara authored Feb 29, 2024
1 parent 0a5418d commit 12c8769
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/coreclr/jit/emitxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15330,13 +15330,10 @@ BYTE* emitter::emitOutputRI(BYTE* dst, instrDesc* id)

if (id->idIsCnsReloc())
{
if (emitComp->IsTargetAbi(CORINFO_NATIVEAOT_ABI))
if (emitComp->IsTargetAbi(CORINFO_NATIVEAOT_ABI) && id->idAddr()->iiaSecRel)
{
if (id->idAddr()->iiaSecRel)
{
// For section relative, the immediate offset is relocatable and hence need IMAGE_REL_SECREL
emitRecordRelocation((void*)(dst - (unsigned)EA_SIZE(size)), (void*)(size_t)val, IMAGE_REL_SECREL);
}
// For section relative, the immediate offset is relocatable and hence need IMAGE_REL_SECREL
emitRecordRelocation((void*)(dst - (unsigned)EA_SIZE(size)), (void*)(size_t)val, IMAGE_REL_SECREL);
}
else
{
Expand Down

0 comments on commit 12c8769

Please sign in to comment.