Skip to content

Commit 10773db

Browse files
author
whitequark
committedAug 1, 2015
libdyld: handle unaligned relocations.
1 parent 8a0beb4 commit 10773db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

Diff for: ‎software/libdyld/dyld.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ static int fixup_rela(struct dyld_info *info, Elf32_Rela *rela,
4343
return 0;
4444
}
4545

46-
*(Elf32_Addr*)(info->base + rela->r_offset) = value;
46+
memcpy((Elf32_Addr*)(info->base + rela->r_offset), &value,
47+
sizeof(Elf32_Addr));
4748

4849
return 1;
4950
}

0 commit comments

Comments
 (0)
Please sign in to comment.