projects
/
centaur.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba9a261
)
Expand PHDR space only if there are pages available
author
norly
<ny-git@enpas.org>
Wed, 26 Jun 2013 18:49:58 +0000
(19:49 +0100)
committer
norly
<ny-git@enpas.org>
Wed, 26 Jun 2013 18:49:58 +0000
(19:49 +0100)
src/libelfu/modelops/layout.c
patch
|
blob
|
history
diff --git
a/src/libelfu/modelops/layout.c
b/src/libelfu/modelops/layout.c
index f8a30ed4e2d66b4a40eebbfd45fb70e77abeeb84..2fd610ce3b0808f6858854c0aca0666b3d5ac4d4 100644
(file)
--- a/
src/libelfu/modelops/layout.c
+++ b/
src/libelfu/modelops/layout.c
@@
-101,7
+101,8
@@
static ElfuPhdr* appendPhdr(ElfuElf *me)
&lowestOffs, &highestOffsEnd);
if (phdr_maxsz < (me->ehdr.e_phnum + 1) * me->ehdr.e_phentsize
&& phdrmp == lowestAddr
- && phdrmp == lowestOffs) {
+ && phdrmp == lowestOffs
+ && (lowestAddr->phdr.p_vaddr >= 2 * lowestAddr->phdr.p_align)) {
ElfuPhdr *mp;
ElfuScn *ms;
GElf_Word size = ROUNDUP(me->ehdr.e_phentsize, phdrmp->phdr.p_align);