diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-07-10 19:33:47 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-07-10 19:33:47 +0000 |
commit | 1b2d16f45f8a2b1d90200d3c81691731c6b5fb52 (patch) | |
tree | 6f4018162bbe47e07ff904aa1660a82aa169060a | |
parent | 8f6ad301913dc5ddfda7823510c17b8ce61df51c (diff) | |
download | uClibc-alpine-1b2d16f45f8a2b1d90200d3c81691731c6b5fb52.tar.bz2 uClibc-alpine-1b2d16f45f8a2b1d90200d3c81691731c6b5fb52.tar.xz |
Fix the code for finding the interpreter, which was I had
totally screwed up the first time...
-Erik
-rw-r--r-- | ldso/util/readelf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ldso/util/readelf.c b/ldso/util/readelf.c index c0a3e1eb7..0006f5f9e 100644 --- a/ldso/util/readelf.c +++ b/ldso/util/readelf.c @@ -49,7 +49,7 @@ Elf32_Shdr * elf_find_section_type( int key, Elf32_Ehdr *ehdr) return shdr; } } - return 0; + return NULL; } Elf32_Phdr * elf_find_phdr_type( int type, Elf32_Ehdr *ehdr) @@ -61,7 +61,7 @@ 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 */ @@ -78,7 +78,7 @@ void * elf_find_dynamic(int const key, Elf32_Dyn *dynp, return (void *)(dynp->d_un.d_val - tx_reloc + (char *)ehdr ); } } - return 0; + return NULL; } int check_elf_header(Elf32_Ehdr const *const ehdr) @@ -256,7 +256,7 @@ static void describe_elf_interpreter(Elf32_Ehdr* 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); } } |