version 1.28, 2015/05/17 20:19:08 |
version 1.29, 2015/06/23 13:43:08 |
|
|
|
|
elf_fix_header(head); |
elf_fix_header(head); |
|
|
|
if (head->e_shnum == 0) { |
|
warnx("%s: no section header table", name); |
|
return (NULL); |
|
} |
|
|
|
if (head->e_shstrndx >= head->e_shnum) { |
|
warnx("%s: inconsistent section header table", name); |
|
return (NULL); |
|
} |
|
|
if ((shdr = calloc(head->e_shentsize, head->e_shnum)) == NULL) { |
if ((shdr = calloc(head->e_shentsize, head->e_shnum)) == NULL) { |
warn("%s: malloc shdr", name); |
warn("%s: malloc shdr", name); |
return (NULL); |
return (NULL); |