arm64-linux compiles
modified: conf.h modified: linker.cpp modified: linker.h modified: p_elf_enum.h modified: p_lx_elf.cpp modified: p_lx_elf.h modified: packmast.cpp modified: stub/Makefile new file: stub/arm64-linux.shlib-init.h new file: stub/src/arm64-linux.shlib-init.S new file: stub/tmp/arm64-linux.elf-entry.bin.dump new file: stub/tmp/arm64-linux.elf-fold.map new file: stub/tmp/arm64-linux.shlib-init.bin.dump
This commit is contained in:
@@ -591,6 +591,27 @@ void ElfLinkerAMD64::relocate1(const Relocation *rel, upx_byte *location, upx_ui
|
||||
super::relocate1(rel, location, value, type);
|
||||
}
|
||||
|
||||
void ElfLinkerARM64::relocate1(const Relocation *rel, upx_byte *location, upx_uint64_t value,
|
||||
const char *type) {
|
||||
if (strncmp(type, "R_AARCH64_", 10))
|
||||
return super::relocate1(rel, location, value, type);
|
||||
type += 10;
|
||||
|
||||
if (!strncmp(type, "PREL", 4)) {
|
||||
value -= rel->section->offset + rel->offset;
|
||||
type += 4;
|
||||
}
|
||||
|
||||
if (!strcmp(type, "16"))
|
||||
set_le16(location, get_le16(location) + value);
|
||||
else if (!strncmp(type, "32", 2)) // for "32" and "32S"
|
||||
set_le32(location, get_le32(location) + value);
|
||||
else if (!strcmp(type, "64"))
|
||||
set_le64(location, get_le64(location) + value);
|
||||
else
|
||||
super::relocate1(rel, location, value, type);
|
||||
}
|
||||
|
||||
void ElfLinkerArmBE::relocate1(const Relocation *rel, upx_byte *location, upx_uint64_t value,
|
||||
const char *type) {
|
||||
if (strcmp(type, "R_ARM_PC24") == 0) {
|
||||
|
||||
Reference in New Issue
Block a user