mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
Synonyms R_ARM_THM_PC22 and R_ARM_THM_XPC22 for R_ARM_THM_CALL.
This commit is contained in:
parent
4e1c342e55
commit
eeab1aef64
|
@ -679,7 +679,10 @@ void ElfLinkerArmBE::relocate1(const Relocation *rel, upx_byte *location,
|
|||
{
|
||||
set_be32(location, get_be32(location) + value);
|
||||
}
|
||||
else if (strcmp(type, "R_ARM_THM_CALL") == 0)
|
||||
else if (strcmp(type, "R_ARM_THM_CALL") == 0
|
||||
|| strcmp(type, "R_ARM_THM_XPC22") == 0
|
||||
|| strcmp(type, "R_ARM_THM_PC22") == 0
|
||||
)
|
||||
{
|
||||
value -= rel->section->offset + rel->offset;
|
||||
value += ((get_be16(location) & 0x7ff) << 12);
|
||||
|
@ -711,7 +714,10 @@ void ElfLinkerArmLE::relocate1(const Relocation *rel, upx_byte *location,
|
|||
{
|
||||
set_le32(location, get_le32(location) + value);
|
||||
}
|
||||
else if (strcmp(type, "R_ARM_THM_CALL") == 0)
|
||||
else if (strcmp(type, "R_ARM_THM_CALL") == 0
|
||||
|| strcmp(type, "R_ARM_THM_XPC22") == 0
|
||||
|| strcmp(type, "R_ARM_THM_PC22") == 0
|
||||
)
|
||||
{
|
||||
value -= rel->section->offset + rel->offset;
|
||||
value += ((get_le16(location) & 0x7ff) << 12);
|
||||
|
|
Loading…
Reference in New Issue
Block a user