Skip to content

Commit 7c82b56

Browse files
committed
[LLD][COFF] Define importThunkARM64EC as uint8_t array to fix big-endian hosts.
Fixes #107931, spotted by Nikita Popov.
1 parent b9674cb commit 7c82b56

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lld/COFF/Chunks.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -544,12 +544,12 @@ static const uint8_t importThunkARM64[] = {
544544
0x00, 0x02, 0x1f, 0xd6, // br x16
545545
};
546546

547-
static const uint32_t importThunkARM64EC[] = {
548-
0x9000000b, // adrp x11, 0x0
549-
0xf940016b, // ldr x11, [x11]
550-
0x9000000a, // adrp x10, 0x0
551-
0x9100014a, // add x10, x10, #0x0
552-
0x14000000 // b 0x0
547+
static const uint8_t importThunkARM64EC[] = {
548+
0x0b, 0x00, 0x00, 0x90, // adrp x11, 0x0
549+
0x6b, 0x01, 0x40, 0xf9, // ldr x11, [x11]
550+
0x0a, 0x00, 0x00, 0x90, // adrp x10, 0x0
551+
0x4a, 0x01, 0x00, 0x91, // add x10, x10, #0x0
552+
0x00, 0x00, 0x00, 0x14 // b 0x0
553553
};
554554

555555
// Windows-specific.

0 commit comments

Comments
 (0)