mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-03-12 17:05:38 +00:00
Fix issue of thumb relocation R_ARM_THM_MOVT_ABS (#1723)
This commit is contained in:
parent
032b9aa74b
commit
4e5ba6f6ef
|
@ -409,6 +409,11 @@ apply_relocation(AOTModule *module, uint8 *target_section_addr,
|
||||||
|| reloc_type == R_ARM_THM_MOVT_PREL)
|
|| reloc_type == R_ARM_THM_MOVT_PREL)
|
||||||
offset >>= 16;
|
offset >>= 16;
|
||||||
|
|
||||||
|
upper = (uint16)((upper & 0xfbf0) | ((offset & 0xf000) >> 12)
|
||||||
|
| ((offset & 0x0800) >> 1));
|
||||||
|
lower = (uint16)((lower & 0x8f00) | ((offset & 0x0700) << 4)
|
||||||
|
| (offset & 0x00ff));
|
||||||
|
|
||||||
*(uint16 *)(target_section_addr + reloc_offset) = upper;
|
*(uint16 *)(target_section_addr + reloc_offset) = upper;
|
||||||
*(uint16 *)(target_section_addr + reloc_offset + 2) = lower;
|
*(uint16 *)(target_section_addr + reloc_offset + 2) = lower;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user