mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-29 06:10:09 +08:00
arm64: Support PREL32 relocation
A PC-relative 32bit value is stored.
This commit is contained in:
parent
c232af7ddb
commit
7600b03f35
3
tccelf.c
3
tccelf.c
@ -791,6 +791,9 @@ ST_FUNC void relocate_section(TCCState *s1, Section *s)
|
||||
case R_AARCH64_ABS32:
|
||||
write32le(ptr, val);
|
||||
break;
|
||||
case R_AARCH64_PREL32:
|
||||
write32le(ptr, val - addr);
|
||||
break;
|
||||
case R_AARCH64_MOVW_UABS_G0_NC:
|
||||
write32le(ptr, ((read32le(ptr) & 0xffe0001f) |
|
||||
(val & 0xffff) << 5));
|
||||
|
Loading…
Reference in New Issue
Block a user