debuggers.hg

changeset 20914:2bc69db28153

libelf: make elf_phdr_is_loadable load read-only segments.

From: Brad Plant <bplant@iinet.net.au>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jan 29 07:14:32 2010 +0000 (2010-01-29)
parents 8dcedf17b5b4
children 07f33d124053
files xen/common/libelf/libelf-tools.c
line diff
     1.1 --- a/xen/common/libelf/libelf-tools.c	Fri Jan 29 07:10:28 2010 +0000
     1.2 +++ b/xen/common/libelf/libelf-tools.c	Fri Jan 29 07:14:32 2010 +0000
     1.3 @@ -235,7 +235,7 @@ int elf_phdr_is_loadable(struct elf_bina
     1.4      uint64_t p_type = elf_uval(elf, phdr, p_type);
     1.5      uint64_t p_flags = elf_uval(elf, phdr, p_flags);
     1.6  
     1.7 -    return ((p_type == PT_LOAD) && (p_flags & (PF_W | PF_X)) != 0);
     1.8 +    return ((p_type == PT_LOAD) && (p_flags & (PF_R | PF_W | PF_X)) != 0);
     1.9  }
    1.10  
    1.11  /*