version 1.38, 2013/11/12 14:07:53 |
version 1.39, 2013/11/12 19:37:39 |
|
|
char *otherstring(struct nlist *); |
char *otherstring(struct nlist *); |
int (*sfunc)(const void *, const void *) = fname; |
int (*sfunc)(const void *, const void *) = fname; |
char typeletter(struct nlist *); |
char typeletter(struct nlist *); |
|
int mmbr_name(struct ar_hdr *, char **, int, int *, FILE *); |
|
int show_symtab(off_t, u_long, const char *, FILE *); |
|
int show_symdef(off_t, u_long, const char *, FILE *); |
|
|
/* some macros for symbol type (nlist.n_type) handling */ |
/* some macros for symbol type (nlist.n_type) handling */ |
#define IS_EXTERNAL(x) ((x) & N_EXT) |
#define IS_EXTERNAL(x) ((x) & N_EXT) |
|
|
{ |
{ |
struct ranlib *prn, *eprn; |
struct ranlib *prn, *eprn; |
struct ar_hdr ar_head; |
struct ar_hdr ar_head; |
void *symdef; |
char *symdef; |
char *strtab, *p; |
char *strtab, *p; |
u_long size; |
u_long size; |
int namelen, rval = 0; |
int namelen, rval = 0; |
|
|
} |
} |
|
|
size = *(u_long *)symdef; |
size = *(u_long *)symdef; |
prn = symdef + sizeof(u_long); |
prn = (struct ranlib *)(symdef + sizeof(u_long)); |
eprn = prn + size / sizeof(*prn); |
eprn = prn + size / sizeof(*prn); |
strtab = symdef + sizeof(u_long) + size + sizeof(u_long); |
strtab = symdef + sizeof(u_long) + size + sizeof(u_long); |
|
|
|
|
struct nlist *np, *names, **snames; |
struct nlist *np, *names, **snames; |
int i, nrawnames, nnames; |
int i, nrawnames, nnames; |
size_t stabsize; |
size_t stabsize; |
off_t staboff; |
|
|
|
if (IS_ELF(head->elf32) && |
if (IS_ELF(head->elf32) && |
head->elf32.e_ident[EI_CLASS] == ELFCLASS32 && |
head->elf32.e_ident[EI_CLASS] == ELFCLASS32 && |