diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-11-06 22:38:49 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-11-06 22:38:49 +0000 |
commit | e556691e4f2411bddc228266e9fcb8dbbf122ac6 (patch) | |
tree | be332f3b5cab0519e4f813f7a0f739e9e4bc8f12 /ldso/util/readsoname.c | |
parent | 7e617ab5308b2dadf231dbe77739ccfceec8c205 (diff) |
Begin converting the client utils
Diffstat (limited to 'ldso/util/readsoname.c')
-rw-r--r-- | ldso/util/readsoname.c | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/ldso/util/readsoname.c b/ldso/util/readsoname.c deleted file mode 100644 index 12c2428f2..000000000 --- a/ldso/util/readsoname.c +++ /dev/null @@ -1,63 +0,0 @@ -/* adapted from Eric Youngdale's readelf program */ - -#include <stdio.h> -#include <string.h> -#include <sys/stat.h> -#include <sys/mman.h> -#include <link.h> -#include <unistd.h> -#include <sys/types.h> -#include <ld_elf.h> -#include "readsoname.h" - -void warn(char *fmt, ...); -char *xstrdup(char *); - -struct needed_tab -{ - char *soname; - int type; -}; - -struct needed_tab needed_tab[] = { - { "libc.so.0", LIB_ELF_LIBC0 }, - { "libm.so.0", LIB_ELF_LIBC0 }, - { "libdl.so.0", LIB_ELF_LIBC0 }, - { "libc.so.5", LIB_ELF_LIBC5 }, - { "libm.so.5", LIB_ELF_LIBC5 }, - { "libdl.so.1", LIB_ELF_LIBC5 }, - { "libc.so.6", LIB_ELF_LIBC6 }, - { "libm.so.6", LIB_ELF_LIBC6 }, - { "libdl.so.2", LIB_ELF_LIBC6 }, - { NULL, LIB_ELF } -}; - -char *readsoname(char *name, FILE *infile, int expected_type, - int *type, int elfclass) -{ - char *res; - - if (elfclass == ELFCLASS32) - res = readsoname32(name, infile, expected_type, type); - else - { - res = readsoname64(name, infile, expected_type, type); -#if 0 - *type |= LIB_ELF64; -#endif - } - - return res; -} - -#undef __ELF_NATIVE_CLASS -#undef readsonameXX -#define readsonameXX readsoname32 -#define __ELF_NATIVE_CLASS 32 -#include "readsoname2.c" - -#undef __ELF_NATIVE_CLASS -#undef readsonameXX -#define readsonameXX readsoname64 -#define __ELF_NATIVE_CLASS 64 -#include "readsoname2.c" |