commit | f15bcda4137446d4773bb54cb99cc18497e9822c | [log] [tgz] |
---|---|---|
author | Mark Wielaard <mjw@redhat.com> | Mon Mar 03 11:43:43 2014 +0100 |
committer | Mark Wielaard <mjw@redhat.com> | Mon Mar 10 21:28:48 2014 +0100 |
tree | b530a36ff08e5d704d51c06d363e8a662b4f9a94 | |
parent | b92075265572739b04ed1027a6764ff65750b108 [diff] |
libdwfl: elf_from_remote_memory should use pagesize, not p_align. elf_from_remote_memory would use the actual p_align of the PT_LOAD segments to calculate the loadbase, end and start of a segment. But the dynamic loader aligns the segments using the pagesize and only sanity checks the p_align values. So we should do the same to get accurate segment addresses. Also fixes a small memory leak in case the ELF image appears to be bad. Signed-off-by: Mark Wielaard <mjw@redhat.com>