Changeset 8f6c6264 in mainline
- Timestamp:
- 2011-04-17T20:39:43Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 164c653, a7dbd49
- Parents:
- 3ac69647
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/backend_elf.c
r3ac69647 r8f6c6264 73 73 { 74 74 elf_segment_header_t *entry = area->backend_data.segment; 75 size_t nonanon_pages = ALIGN_DOWN(entry->p_filesz, PAGE_SIZE); 75 uintptr_t first = ALIGN_UP(entry->p_vaddr, PAGE_SIZE); 76 uintptr_t last = ALIGN_DOWN(entry->p_vaddr + entry->p_filesz, 77 PAGE_SIZE); 76 78 77 79 if (entry->p_flags & PF_W) 78 80 return 0; 79 81 80 return nonanon_pages; 82 if (last < first) 83 return 0; 84 85 return last - first; 81 86 } 82 87
Note:
See TracChangeset
for help on using the changeset viewer.