Rev 1757 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1757 | Rev 1780 | ||
|---|---|---|---|
| Line 94... | Line 94... | ||
| 94 | if (header->e_type != ET_EXEC) |
94 | if (header->e_type != ET_EXEC) |
| 95 | return EE_UNSUPPORTED; |
95 | return EE_UNSUPPORTED; |
| 96 | 96 | ||
| 97 | /* Walk through all segment headers and process them. */ |
97 | /* Walk through all segment headers and process them. */ |
| 98 | for (i = 0; i < header->e_phnum; i++) { |
98 | for (i = 0; i < header->e_phnum; i++) { |
| 99 | rc = segment_header(&((elf_segment_header_t *)(((__u8 *) header) + header->e_phoff))[i], header, as); |
99 | rc = segment_header(&((elf_segment_header_t *)(((uint8_t *) header) + header->e_phoff))[i], header, as); |
| 100 | if (rc != EE_OK) |
100 | if (rc != EE_OK) |
| 101 | return rc; |
101 | return rc; |
| 102 | } |
102 | } |
| 103 | 103 | ||
| 104 | /* Inspect all section headers and proccess them. */ |
104 | /* Inspect all section headers and proccess them. */ |
| 105 | for (i = 0; i < header->e_shnum; i++) { |
105 | for (i = 0; i < header->e_shnum; i++) { |
| 106 | rc = section_header(&((elf_section_header_t *)(((__u8 *) header) + header->e_shoff))[i], header, as); |
106 | rc = section_header(&((elf_section_header_t *)(((uint8_t *) header) + header->e_shoff))[i], header, as); |
| 107 | if (rc != EE_OK) |
107 | if (rc != EE_OK) |
| 108 | return rc; |
108 | return rc; |
| 109 | } |
109 | } |
| 110 | 110 | ||
| 111 | return EE_OK; |
111 | return EE_OK; |