mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
R_PPC64_ADDR32
modified: linker.cpp
This commit is contained in:
parent
a0df325659
commit
b167374f13
|
@ -798,6 +798,10 @@ void ElfLinkerPpc32::relocate1(const Relocation *rel, upx_byte *location, upx_ui
|
|||
|
||||
void ElfLinkerPpc64le::relocate1(const Relocation *rel, upx_byte *location, upx_uint64_t value,
|
||||
const char *type) {
|
||||
if (!strcmp(type, "R_PPC64_ADDR32")) {
|
||||
set_le32(location, get_le32(location) + value);
|
||||
return;
|
||||
}
|
||||
if (strncmp(type, "R_PPC64_REL", 11))
|
||||
return super::relocate1(rel, location, value, type);
|
||||
type += 11;
|
||||
|
@ -817,11 +821,11 @@ void ElfLinkerPpc64le::relocate1(const Relocation *rel, upx_byte *location, upx_
|
|||
internal_error("target out of range (%d) in reloc %s:%x\n", displ, rel->section->name,
|
||||
rel->offset);
|
||||
*location += value;
|
||||
} else if (strncmp(type, "14", 2) == 0) // for "32" and "32S"
|
||||
} else if (strncmp(type, "14", 2) == 0) // for "14" and "14S"
|
||||
set_le16(location, get_le16(location) + value);
|
||||
else if (strcmp(type, "16") == 0)
|
||||
set_le16(location, get_le16(location) + value);
|
||||
else if (strncmp(type, "24", 2) == 0) // for "32" and "32S"
|
||||
else if (strncmp(type, "24", 2) == 0) // for "24" and "24S"
|
||||
set_le24(location, get_le24(location) + value);
|
||||
else if (strncmp(type, "32", 2) == 0) // for "32" and "32S"
|
||||
set_le32(location, get_le32(location) + value);
|
||||
|
|
Loading…
Reference in New Issue
Block a user