Skip to content

Commit

Permalink
libdyld: handle unaligned relocations.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Aug 1, 2015
1 parent 8a0beb4 commit 10773db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion software/libdyld/dyld.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 10773db

Please sign in to comment.