@@ -185,6 +185,8 @@ patch(unsigned char *base, const Stencil *stencil, uint64_t *patches)
185185 // - https://github.com/llvm/llvm-project/blob/main/lld/MachO/Arch/ARM64.cpp
186186 // - https://github.com/llvm/llvm-project/blob/main/lld/MachO/Arch/ARM64Common.cpp
187187 // - https://github.com/llvm/llvm-project/blob/main/lld/MachO/Arch/ARM64Common.h
188+ // - aarch64-pc-windows-msvc:
189+ // - https://github.com/llvm/llvm-project/blob/main/lld/COFF/Chunks.cpp
188190 // - aarch64-unknown-linux-gnu:
189191 // - https://github.com/llvm/llvm-project/blob/main/lld/ELF/Arch/AArch64.cpp
190192 // - i686-pc-windows-msvc:
@@ -252,6 +254,7 @@ patch(unsigned char *base, const Stencil *stencil, uint64_t *patches)
252254 assert ((int64_t )value < (1LL << 31 ));
253255 * loc32 = (uint32_t )value ;
254256 continue ;
257+ case HoleKind_IMAGE_REL_ARM64_BRANCH26 :
255258 case HoleKind_R_AARCH64_CALL26 :
256259 case HoleKind_R_AARCH64_JUMP26 :
257260 // 28-bit relative branch.
@@ -293,6 +296,7 @@ patch(unsigned char *base, const Stencil *stencil, uint64_t *patches)
293296 set_bits (loc32 , 5 , value , 48 , 16 );
294297 continue ;
295298 case HoleKind_ARM64_RELOC_GOT_LOAD_PAGE21 :
299+ case HoleKind_IMAGE_REL_ARM64_PAGEBASE_REL21 :
296300 case HoleKind_R_AARCH64_ADR_GOT_PAGE :
297301 // 21-bit count of pages between this page and an absolute address's
298302 // page... I know, I know, it's weird. Pairs nicely with
@@ -302,6 +306,7 @@ patch(unsigned char *base, const Stencil *stencil, uint64_t *patches)
302306 const Hole * next_hole = & stencil -> holes [i + 1 ];
303307 if (i + 1 < stencil -> holes_size &&
304308 (next_hole -> kind == HoleKind_ARM64_RELOC_GOT_LOAD_PAGEOFF12 ||
309+ next_hole -> kind == HoleKind_IMAGE_REL_ARM64_PAGEOFFSET_12L ||
305310 next_hole -> kind == HoleKind_R_AARCH64_LD64_GOT_LO12_NC ) &&
306311 next_hole -> offset == hole -> offset + 4 &&
307312 next_hole -> symbol == hole -> symbol &&
@@ -354,6 +359,8 @@ patch(unsigned char *base, const Stencil *stencil, uint64_t *patches)
354359 continue ;
355360 case HoleKind_ARM64_RELOC_GOT_LOAD_PAGEOFF12 :
356361 case HoleKind_ARM64_RELOC_PAGEOFF12 :
362+ case HoleKind_IMAGE_REL_ARM64_PAGEOFFSET_12A :
363+ case HoleKind_IMAGE_REL_ARM64_PAGEOFFSET_12L :
357364 case HoleKind_R_AARCH64_LD64_GOT_LO12_NC :
358365 // 12-bit low part of an absolute address. Pairs nicely with
359366 // ARM64_RELOC_GOT_LOAD_PAGE21 (above).
0 commit comments