libdyld: handle unaligned relocations.

This commit is contained in:
whitequark 2015-08-01 20:26:27 +03:00
parent 8a0beb4cfb
commit 10773db08d
1 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,8 @@ static int fixup_rela(struct dyld_info *info, Elf32_Rela *rela,
return 0;
}
*(Elf32_Addr*)(info->base + rela->r_offset) = value;
memcpy((Elf32_Addr*)(info->base + rela->r_offset), &value,
sizeof(Elf32_Addr));
return 1;
}