summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2004-03-30 15:29:45 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2004-03-30 15:29:45 +0000
commiteac715d6b63cb0ecd8849bb740d290afca38518c (patch)
treec112d7f0d58345a84f787bb259673b3e87cc665a /usr.bin
parent157e2a52a9cfaa9ea0e0a9f1bd3e6ad4198cd118 (diff)
there is more than one way to define symbol type in elf...; kill a debugging printf too
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/nm/elf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/nm/elf.c b/usr.bin/nm/elf.c
index 75bd4870d08..0b3131f909a 100644
--- a/usr.bin/nm/elf.c
+++ b/usr.bin/nm/elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elf.c,v 1.3 2004/03/30 15:12:38 mickey Exp $ */
+/* $OpenBSD: elf.c,v 1.4 2004/03/30 15:29:44 mickey Exp $ */
/*
* Copyright (c) 2003 Michael Shalayeff
@@ -157,7 +157,6 @@ elf2nlist(Elf_Sym *sym, Elf_Ehdr *eh, Elf_Shdr *shdr, char *shstr, struct nlist
else
sn = "";
-/* printf("%s 0x%x %s(0x%x)\n", stab + sym->st_name, sym->st_info, sn, sym->st_shndx); */
switch(ELF_ST_TYPE(sym->st_info)) {
case STT_NOTYPE:
switch (sym->st_shndx) {
@@ -209,8 +208,10 @@ elf2nlist(Elf_Sym *sym, Elf_Ehdr *eh, Elf_Shdr *shdr, char *shstr, struct nlist
np->n_type = N_COMM;
else if (sym->st_shndx >= eh->e_shnum)
break;
- else if (!strcmp(sn, ELF_BSS))
+ else if (!strcmp(sn, ELF_SBSS))
np->n_type = N_BSS;
+ else if (!strcmp(sn, ELF_BSS))
+ np->n_type = N_BSS | N_EXT;
else if (!strcmp(sn, ELF_RODATA))
np->n_other = 'r';
break;