[lld] 7c82b56 - [LLD][COFF] Define importThunkARM64EC as uint8_t array to fix big-endian hosts.
Jacek Caban via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 12 06:40:40 PDT 2024
Author: Jacek Caban
Date: 2024-09-12T15:39:57+02:00
New Revision: 7c82b56116d402aa6b86d734ea481a1e90a2f1c3
URL: https://github.com/llvm/llvm-project/commit/7c82b56116d402aa6b86d734ea481a1e90a2f1c3
DIFF: https://github.com/llvm/llvm-project/commit/7c82b56116d402aa6b86d734ea481a1e90a2f1c3.diff
LOG: [LLD][COFF] Define importThunkARM64EC as uint8_t array to fix big-endian hosts.
Fixes #107931, spotted by Nikita Popov.
Added:
Modified:
lld/COFF/Chunks.h
Removed:
################################################################################
diff --git a/lld/COFF/Chunks.h b/lld/COFF/Chunks.h
index 28e0fd68ac5159..040a249aabf59e 100644
--- a/lld/COFF/Chunks.h
+++ b/lld/COFF/Chunks.h
@@ -544,12 +544,12 @@ static const uint8_t importThunkARM64[] = {
0x00, 0x02, 0x1f, 0xd6, // br x16
};
-static const uint32_t importThunkARM64EC[] = {
- 0x9000000b, // adrp x11, 0x0
- 0xf940016b, // ldr x11, [x11]
- 0x9000000a, // adrp x10, 0x0
- 0x9100014a, // add x10, x10, #0x0
- 0x14000000 // b 0x0
+static const uint8_t importThunkARM64EC[] = {
+ 0x0b, 0x00, 0x00, 0x90, // adrp x11, 0x0
+ 0x6b, 0x01, 0x40, 0xf9, // ldr x11, [x11]
+ 0x0a, 0x00, 0x00, 0x90, // adrp x10, 0x0
+ 0x4a, 0x01, 0x00, 0x91, // add x10, x10, #0x0
+ 0x00, 0x00, 0x00, 0x14 // b 0x0
};
// Windows-specific.
More information about the llvm-commits
mailing list