Skip to content

Commit 7f1fd4e

Browse files
authored
Skip reloc handling for IMAGE_REL_BASED_DIR64 if already handled (#105522)
1 parent 7560f46 commit 7f1fd4e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/coreclr/tools/superpmi/superpmi-shared/compileresult.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -894,8 +894,8 @@ void CompileResult::applyRelocs(RelocContext* rc, unsigned char* block1, ULONG b
894894
}
895895
break;
896896

897-
case IMAGE_REL_ARM64_SECREL_HIGH12A:
898-
case IMAGE_REL_ARM64_SECREL_LOW12A:
897+
case IMAGE_REL_ARM64_SECREL_HIGH12A: // TLSDESC ADD for High-12 Add
898+
case IMAGE_REL_ARM64_SECREL_LOW12A: // TLSDESC ADD for Low-12 Add
899899
case IMAGE_REL_AARCH64_TLSDESC_LD64_LO12:
900900
case IMAGE_REL_AARCH64_TLSDESC_ADD_LO12: // TLSDESC ADD for corresponding ADRP
901901
case IMAGE_REL_AARCH64_TLSDESC_CALL:
@@ -918,7 +918,7 @@ void CompileResult::applyRelocs(RelocContext* rc, unsigned char* block1, ULONG b
918918

919919
if (IsSpmiTarget64Bit())
920920
{
921-
if (relocType == IMAGE_REL_BASED_DIR64)
921+
if (!wasRelocHandled && (relocType == IMAGE_REL_BASED_DIR64))
922922
{
923923
DWORDLONG fixupLocation = tmp.location;
924924

0 commit comments

Comments
 (0)