mirror of https://github.com/Nonannet/copapy.git
Aarch64 patching fixed for R_AARCH64_LDST32_ABS_LO12_NC and R_AARCH64_LDST64_ABS_LO12_NC relocations
This commit is contained in:
parent
b86659fd51
commit
6251dbda5d
|
|
@ -258,7 +258,7 @@ class stencil_database():
|
||||||
elif pr.type.endswith('_LDST32_ABS_LO12_NC'):
|
elif pr.type.endswith('_LDST32_ABS_LO12_NC'):
|
||||||
# R_AARCH64_LDST32_ABS_LO12_NC
|
# R_AARCH64_LDST32_ABS_LO12_NC
|
||||||
# (S + A) & 0xFFF
|
# (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']
|
patch_value = symbol_address + pr.fields['r_addend']
|
||||||
symbol_type = symbol_type + 0x02 # Absolut value
|
symbol_type = symbol_type + 0x02 # Absolut value
|
||||||
scale = 4
|
scale = 4
|
||||||
|
|
@ -276,7 +276,7 @@ class stencil_database():
|
||||||
elif pr.type.endswith('_LDST64_ABS_LO12_NC'):
|
elif pr.type.endswith('_LDST64_ABS_LO12_NC'):
|
||||||
# R_AARCH64_LDST64_ABS_LO12_NC
|
# R_AARCH64_LDST64_ABS_LO12_NC
|
||||||
# (S + A) & 0xFFF
|
# (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']
|
patch_value = symbol_address + pr.fields['r_addend']
|
||||||
symbol_type = symbol_type + 0x02 # Absolut value
|
symbol_type = symbol_type + 0x02 # Absolut value
|
||||||
scale = 8
|
scale = 8
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue