OLD | NEW |
(Empty) | |
| 1 --- qemu-2.3.0/linux-user/elfload.c.orig 2014-12-09 14:45:42.000000000 +0
000 |
| 2 +++ qemu-2.3.0/linux-user/elfload.c 2015-01-28 02:51:23.719000000 +0000 |
| 3 @@ -28,6 +28,8 @@ |
| 4 |
| 5 #define ELF_OSABI ELFOSABI_SYSV |
| 6 |
| 7 +extern abi_ulong afl_entry_point, afl_start_code, afl_end_code; |
| 8 + |
| 9 /* from personality.h */ |
| 10 |
| 11 /* |
| 12 @@ -1889,6 +1891,8 @@ |
| 13 info->brk = 0; |
| 14 info->elf_flags = ehdr->e_flags; |
| 15 |
| 16 + if (!afl_entry_point) afl_entry_point = info->entry; |
| 17 + |
| 18 for (i = 0; i < ehdr->e_phnum; i++) { |
| 19 struct elf_phdr *eppnt = phdr + i; |
| 20 if (eppnt->p_type == PT_LOAD) { |
| 21 @@ -1922,9 +1926,11 @@ |
| 22 if (elf_prot & PROT_EXEC) { |
| 23 if (vaddr < info->start_code) { |
| 24 info->start_code = vaddr; |
| 25 + if (!afl_start_code) afl_start_code = vaddr; |
| 26 } |
| 27 if (vaddr_ef > info->end_code) { |
| 28 info->end_code = vaddr_ef; |
| 29 + if (!afl_end_code) afl_end_code = vaddr_ef; |
| 30 } |
| 31 } |
| 32 if (elf_prot & PROT_WRITE) { |
OLD | NEW |