1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

ElfLinkerArm64LE

This commit is contained in:
John Reiser 2016-01-31 19:59:00 -08:00
parent d8f9cd237f
commit 42e520e841
2 changed files with 24 additions and 0 deletions

View File

@ -730,6 +730,22 @@ void ElfLinkerArmLE::relocate1(const Relocation *rel, upx_byte *location,
super::relocate1(rel, location, value, type); super::relocate1(rel, location, value, type);
} }
void ElfLinkerArm64LE::relocate1(const Relocation *rel, upx_byte *location,
upx_uint64_t value, const char *type)
{
if (strcmp(type, "R_AARCH64_CALL26") == 0)
{
value -= rel->section->offset + rel->offset;
set_le24(location, get_le24(location) + value / 4); // FIXME set_le26
}
else if (strcmp(type, "R_AARCH64_ABS32") == 0)
{
set_le32(location, get_le32(location) + value);
}
else
super::relocate1(rel, location, value, type);
}
void ElfLinkerM68k::alignCode(unsigned len) void ElfLinkerM68k::alignCode(unsigned len)
{ {

View File

@ -190,6 +190,14 @@ protected:
upx_uint64_t value, const char *type); upx_uint64_t value, const char *type);
}; };
class ElfLinkerArm64LE : public ElfLinker
{
typedef ElfLinker super;
protected:
virtual void relocate1(const Relocation *, upx_byte *location,
upx_uint64_t value, const char *type);
};
class ElfLinkerM68k : public ElfLinker class ElfLinkerM68k : public ElfLinker
{ {