Changeset c23502d in mainline for generic/src/lib/elf.c
- Timestamp:
- 2006-03-15T23:54:19Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2d5a54f3
- Parents:
- 649799a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/lib/elf.c
r649799a rc23502d 156 156 { 157 157 as_area_t *a; 158 int i, type= 0;158 int i, flags = 0; 159 159 size_t segment_size; 160 160 __u8 *segment; … … 172 172 return EE_MEMORY; 173 173 174 if (entry->p_flags & PF_X) { 175 type = AS_AREA_TEXT; 176 } else if (entry->p_flags & PF_W) { 177 type = AS_AREA_DATA; 178 } else { 179 return EE_UNSUPPORTED; 180 } 174 if (entry->p_flags & PF_X) 175 flags |= AS_AREA_EXEC; 176 if (entry->p_flags & PF_W) 177 flags |= AS_AREA_WRITE; 178 if (entry->p_flags & PF_R) 179 flags |= AS_AREA_READ; 181 180 182 181 /* … … 195 194 segment = ((void *) elf) + entry->p_offset; 196 195 197 a = as_area_create(as, type, SIZE2FRAMES(entry->p_memsz), entry->p_vaddr);196 a = as_area_create(as, flags, SIZE2FRAMES(entry->p_memsz), entry->p_vaddr); 198 197 if (!a) 199 198 return EE_IRRECOVERABLE;
Note:
See TracChangeset
for help on using the changeset viewer.