Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add missing relocations
  • Loading branch information
brandtbucher committed May 1, 2024
commit fbb97fca7f0de5851f339937b39f31e7736b611d
3 changes: 2 additions & 1 deletion Python/jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,8 @@ patch_aarch64_33rx(unsigned char *location, uint64_t value)
loc32[1] = 0xD503201F;
return;
}
patch_aarch64_21r(location, value);
patch_aarch64_21rx(location, value);
patch_aarch64_12(location + 4, value);
}

// 32-bit relative address.
Expand Down
3 changes: 3 additions & 0 deletions Tools/jit/_stencils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class HoleValue(enum.Enum):

_PATCH_FUNCS = {
# aarch64-apple-darwin:
"ARM64_RELOC_BRANCH26": "patch_aarch64_26r",
"ARM64_RELOC_GOT_LOAD_PAGE21": "patch_aarch64_21rx",
"ARM64_RELOC_GOT_LOAD_PAGEOFF12": "patch_aarch64_12",
"ARM64_RELOC_PAGE21": "patch_aarch64_21r",
Expand All @@ -67,7 +68,9 @@ class HoleValue(enum.Enum):
"IMAGE_REL_I386_REL32": "patch_x86_64_32rx",
# aarch64-unknown-linux-gnu:
"R_AARCH64_ABS64": "patch_64",
"R_AARCH64_ADD_ABS_LO12_NC": "patch_aarch64_12",
"R_AARCH64_ADR_GOT_PAGE": "patch_aarch64_21rx",
"R_AARCH64_ADR_PREL_PG_HI21": "patch_aarch64_21rx",
"R_AARCH64_CALL26": "patch_aarch64_26r",
"R_AARCH64_JUMP26": "patch_aarch64_26r",
"R_AARCH64_LD64_GOT_LO12_NC": "patch_aarch64_12",
Expand Down