totally screwed up the first time...
-Erik
return shdr;
}
}
- return 0;
+ return NULL;
}
Elf32_Phdr * elf_find_phdr_type( int type, Elf32_Ehdr *ehdr)
return phdr;
}
}
- return 0;
+ return NULL;
}
/* Returns value if return_val==1, ptr otherwise */
return (void *)(dynp->d_un.d_val - tx_reloc + (char *)ehdr );
}
}
- return 0;
+ return NULL;
}
int check_elf_header(Elf32_Ehdr const *const ehdr)
Elf32_Phdr *phdr;
phdr = elf_find_phdr_type(PT_INTERP, ehdr);
if (phdr) {
- printf("Interpreter:\t%s\n", (char*)phdr->p_paddr);
+ printf("Interpreter:\t%s\n", (char*)ehdr + phdr->p_offset);
}
}