Rev 3210 | Rev 3403 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3210 | Rev 3400 | ||
---|---|---|---|
Line 95... | Line 95... | ||
95 | 95 | ||
96 | // printf("open and read '%s'...\n", file_name); |
96 | // printf("open and read '%s'...\n", file_name); |
97 | 97 | ||
98 | fd = open(file_name, O_RDONLY); |
98 | fd = open(file_name, O_RDONLY); |
99 | if (fd < 0) { |
99 | if (fd < 0) { |
100 | printf("failed opening file\n"); |
100 | printf("failed opening file (error %d)\n", fd); |
101 | return -1; |
101 | return -1; |
102 | } |
102 | } |
103 | 103 | ||
104 | elf.fd = fd; |
104 | elf.fd = fd; |
105 | elf.info = info; |
105 | elf.info = info; |
Line 284... | Line 284... | ||
284 | break; |
284 | break; |
285 | case PT_LOAD: |
285 | case PT_LOAD: |
286 | return load_segment(elf, entry); |
286 | return load_segment(elf, entry); |
287 | break; |
287 | break; |
288 | case PT_INTERP: |
288 | case PT_INTERP: |
289 | /* Assume silently interp == "/rtld.so" */ |
289 | /* Assume silently interp == "/lib/rtld.so" */ |
290 | elf->info->interp = "/rtld.so"; |
290 | elf->info->interp = "/lib/rtld.so"; |
291 | break; |
291 | break; |
292 | case PT_DYNAMIC: |
292 | case PT_DYNAMIC: |
293 | case PT_SHLIB: |
293 | case PT_SHLIB: |
294 | case PT_NOTE: |
294 | case PT_NOTE: |
295 | case PT_LOPROC: |
295 | case PT_LOPROC: |