projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a0beb4
)
libdyld: handle unaligned relocations.
author
whitequark
<whitequark@whitequark.org>
Sat, 1 Aug 2015 17:26:27 +0000
(20:26 +0300)
committer
whitequark
<whitequark@whitequark.org>
Sat, 1 Aug 2015 17:26:27 +0000
(20:26 +0300)
software/libdyld/dyld.c
patch
|
blob
|
history
diff --git
a/software/libdyld/dyld.c
b/software/libdyld/dyld.c
index 50a48f2fd0a0183ad18eaa889c34a12ce067f3a9..c6bdae486f873b3eef0112d2a641bec72f557908 100644
(file)
--- a/
software/libdyld/dyld.c
+++ b/
software/libdyld/dyld.c
@@
-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;
}