Changeset c98e6ee in mainline for kernel/generic/src/lib/elf.c
- Timestamp:
- 2008-07-08T16:05:45Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f93f168
- Parents:
- b7f9087
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/lib/elf.c
rb7f9087 rc98e6ee 58 58 59 59 static int segment_header(elf_segment_header_t *entry, elf_header_t *elf, 60 as_t *as );60 as_t *as, int flags); 61 61 static int section_header(elf_section_header_t *entry, elf_header_t *elf, 62 62 as_t *as); … … 68 68 * @param header Pointer to ELF header in memory 69 69 * @param as Created and properly mapped address space 70 * @param flags A combination of ELD_F_* 70 71 * @return EE_OK on success 71 72 */ 72 unsigned int elf_load(elf_header_t *header, as_t * as )73 unsigned int elf_load(elf_header_t *header, as_t * as, int flags) 73 74 { 74 75 int i, rc; … … 111 112 seghdr = &((elf_segment_header_t *)(((uint8_t *) header) + 112 113 header->e_phoff))[i]; 113 rc = segment_header(seghdr, header, as );114 rc = segment_header(seghdr, header, as, flags); 114 115 if (rc != EE_OK) 115 116 return rc; … … 152 153 */ 153 154 static int segment_header(elf_segment_header_t *entry, elf_header_t *elf, 154 as_t *as) 155 { 155 as_t *as, int flags) 156 { 157 char *interp; 158 156 159 switch (entry->p_type) { 157 160 case PT_NULL: … … 163 166 case PT_DYNAMIC: 164 167 case PT_INTERP: 168 interp = (char *)elf + entry->p_offset; 169 /* FIXME */ 170 /*if (memcmp((uintptr_t)interp, (uintptr_t)ELF_INTERP_ZSTR, 171 ELF_INTERP_ZLEN) != 0) { 172 return EE_UNSUPPORTED; 173 }*/ 174 if ((flags & ELD_F_LOADER) == 0) { 175 return EE_LOADER; 176 } 177 break; 165 178 case PT_SHLIB: 166 179 case PT_NOTE:
Note:
See TracChangeset
for help on using the changeset viewer.