projects
/
centaur.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c6fc85f
)
Only establish PHDR->Scn relationship for PT_LOAD
author
norly
<ny-git@enpas.org>
Mon, 27 May 2013 15:40:31 +0000
(16:40 +0100)
committer
norly
<ny-git@enpas.org>
Mon, 27 May 2013 15:40:31 +0000
(16:40 +0100)
src/model/fromFile.c
patch
|
blob
|
history
diff --git
a/src/model/fromFile.c
b/src/model/fromFile.c
index bd085f6c61558b75d564f5341c0ddbd02d71804c..af54555917f77107c49c518f7665ba65ceb6a0e7 100644
(file)
--- a/
src/model/fromFile.c
+++ b/
src/model/fromFile.c
@@
-38,6
+38,10
@@
static ElfuPhdr* parentPhdr(ElfuElf *me, ElfuScn *ms)
assert(ms);
CIRCLEQ_FOREACH(mp, &me->phdrList, elem) {
+ if (mp->phdr.p_type != PT_LOAD) {
+ continue;
+ }
+
if (ms->shdr.sh_addr >= mp->phdr.p_vaddr
&& OFFS_END(ms->shdr.sh_addr, ms->shdr.sh_size) <= OFFS_END(mp->phdr.p_vaddr, mp->phdr.p_memsz)) {
return mp;