Honor p_vaddr if set

(cherry picked from commit 88ff15c2c279d2bbe3569101b36cd2aa0931a0a9)

Change-Id: I4aabbe911d30aea8ace69e29bb6e980a4e89de90
This commit is contained in:
Brian Carlstrom
2013-01-10 16:39:58 -08:00
parent b7b4f5b838
commit e7dffe150b
2 changed files with 32 additions and 21 deletions

View File

@@ -80,7 +80,11 @@ class ElfReader {
const Elf32_Phdr* loaded_phdr_;
};
Elf32_Addr phdr_table_get_load_size(const Elf32_Phdr* phdr, size_t phnum);
size_t
phdr_table_get_load_size(const Elf32_Phdr* phdr_table,
size_t phdr_count,
Elf32_Addr* min_vaddr = NULL,
Elf32_Addr* max_vaddr = NULL);
int
phdr_table_protect_segments(const Elf32_Phdr* phdr_table,