-/* $OpenBSD: elf.c,v 1.26 2015/02/06 23:21:59 millert Exp $ */
+/* $OpenBSD: elf.c,v 1.27 2015/04/09 04:46:18 guenther Exp $ */
/*
* Copyright (c) 2003 Michael Shalayeff
type = elf_shn2type(eh, sym->st_shndx, NULL);
np->n_type = type < 0? N_TEXT : type;
if (ELF_ST_BIND(sym->st_info) == STB_WEAK) {
- np->n_type = N_INDR;
np->n_other = 'W';
} else if (sn != NULL && *sn != 0 &&
strcmp(sn, ELF_INIT) &&
-.\" $OpenBSD: nm.1,v 1.25 2014/04/09 21:56:26 jmc Exp $
+.\" $OpenBSD: nm.1,v 1.26 2015/04/09 04:46:18 guenther Exp $
.\" $NetBSD: nm.1,v 1.3 1995/08/31 23:41:58 jtc Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\"
.\" @(#)nm.1 8.1 (Berkeley) 6/6/93
.\"
-.Dd $Mdocdate: April 9 2014 $
+.Dd $Mdocdate: April 9 2015 $
.Dt NM 1
.Os
.Sh NAME
common symbol
.It Li D
data or tdata segment symbol
-.It Li I
-indirect reference (alias to other symbol)
.It Li F
file name
.It Li R
.It Li U
undefined
.It Li W
-weak symbol (only on ELF binaries)
+weak symbol
.El
.Pp
If the symbol is local (non-external), the type letter is in lower case.
-/* $OpenBSD: nm.c,v 1.43 2015/04/08 04:23:15 guenther Exp $ */
+/* $OpenBSD: nm.c,v 1.44 2015/04/09 04:46:18 guenther Exp $ */
/* $NetBSD: nm.c,v 1.7 1996/01/14 23:04:03 pk Exp $ */
/*
(void)printf("\n%s:\n", name);
/* print out symbols */
- for (i = 0; i < nnames; i++) {
- if (show_extensions && snames[i] != names &&
- SYMBOL_TYPE((snames[i] -1)->n_type) == N_INDR)
- continue;
+ for (i = 0; i < nnames; i++)
print_symbol(name, snames[i]);
- }
free(snames);
free(names);
*/
if (!print_only_undefined_symbols) {
/* print symbol's value */
- if (SYMBOL_TYPE(sym->n_type) == N_UNDF ||
- (show_extensions && SYMBOL_TYPE(sym->n_type) == N_INDR &&
- sym->n_value == 0))
+ if (SYMBOL_TYPE(sym->n_type) == N_UNDF)
(void)printf(" ");
else
(void)printf("%08lx", sym->n_value);
(void)printf(" %c ", typeletter(sym));
}
- if (SYMBOL_TYPE(sym->n_type) == N_INDR && show_extensions)
- printf("%s -> %s\n", symname(sym), symname(sym+1));
- else
- (void)puts(symname(sym));
+ (void)puts(symname(sym));
}
/*
return(ext? 'F' : 'W');
case N_TEXT:
return(ext? 'T' : 't');
- case N_INDR:
- return(ext? 'I' : 'i');
case N_SIZE:
return(ext? 'S' : 's');
case N_UNDF: