summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2004-08-19 19:23:09 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2004-08-19 19:23:09 +0000
commit34875d66709ee13e962a16d1f6f16a1792733045 (patch)
tree936db3370e2baed008d6828b880e865bd5d78027
parent3c4231f37f38081bd16b9884e141863e4ee6eda9 (diff)
STT_FUNC can be an absolute too
-rw-r--r--usr.bin/nm/elf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/nm/elf.c b/usr.bin/nm/elf.c
index 8f5cf0edbce..a516ff18e7d 100644
--- a/usr.bin/nm/elf.c
+++ b/usr.bin/nm/elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elf.c,v 1.6 2004/05/04 23:07:53 mickey Exp $ */
+/* $OpenBSD: elf.c,v 1.7 2004/08/19 19:23:08 mickey Exp $ */
/*
* Copyright (c) 2003 Michael Shalayeff
@@ -204,7 +204,9 @@ elf2nlist(Elf_Sym *sym, Elf_Ehdr *eh, Elf_Shdr *shdr, char *shstr, struct nlist
if (ELF_ST_BIND(sym->st_info) == STB_WEAK) {
np->n_type = N_INDR;
np->n_other = 'W';
- } else if (sym->st_shndx == SHN_UNDEF)
+ } else if (sym->st_shndx == SHN_ABS)
+ np->n_type = N_ABS;
+ else if (sym->st_shndx == SHN_UNDEF)
np->n_type = N_UNDF | N_EXT;
else if (strcmp(sn, ELF_INIT) &&
strcmp(sn, ELF_TEXT) &&