Aarch64 patching fixed for R_AARCH64_LDST32_ABS_LO12_NC and R_AARCH64_LDST64_ABS_LO12_NC relocations

This commit is contained in:
Nicolas 2025-12-08 14:03:00 +01:00
parent b86659fd51
commit 6251dbda5d
1 changed files with 2 additions and 2 deletions

View File

@ -258,7 +258,7 @@ class stencil_database():
elif pr.type.endswith('_LDST32_ABS_LO12_NC'):
# R_AARCH64_LDST32_ABS_LO12_NC
# (S + A) & 0xFFF
mask = 0b11_1111_1111_1100_0000_0000
mask = 0b00_1111_1111_1100_0000_0000
patch_value = symbol_address + pr.fields['r_addend']
symbol_type = symbol_type + 0x02 # Absolut value
scale = 4
@ -276,7 +276,7 @@ class stencil_database():
elif pr.type.endswith('_LDST64_ABS_LO12_NC'):
# R_AARCH64_LDST64_ABS_LO12_NC
# (S + A) & 0xFFF
mask = 0b11_1111_1111_1100_0000_0000
mask = 0b00_0111_1111_1100_0000_0000
patch_value = symbol_address + pr.fields['r_addend']
symbol_type = symbol_type + 0x02 # Absolut value
scale = 8