summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2004-03-30 15:12:39 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2004-03-30 15:12:39 +0000
commit157e2a52a9cfaa9ea0e0a9f1bd3e6ad4198cd118 (patch)
tree624285b5190090ee4dc4b76aa51828daf20c502f /usr.bin
parentbfed24c3ad8b86c58cc0b687293027309721a175 (diff)
translate names in .sbss section as static N_BSS; found by drahn@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/nm/elf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/nm/elf.c b/usr.bin/nm/elf.c
index 9d62a5ff158..75bd4870d08 100644
--- a/usr.bin/nm/elf.c
+++ b/usr.bin/nm/elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elf.c,v 1.2 2004/01/13 17:32:32 mickey Exp $ */
+/* $OpenBSD: elf.c,v 1.3 2004/03/30 15:12:38 mickey Exp $ */
/*
* Copyright (c) 2003 Michael Shalayeff
@@ -53,6 +53,8 @@
#error "Unsupported ELF class"
#endif
+#define ELF_SBSS ".sbss"
+
int
elf_fix_header(Elf_Ehdr *eh)
{
@@ -179,6 +181,8 @@ elf2nlist(Elf_Sym *sym, Elf_Ehdr *eh, Elf_Shdr *shdr, char *shstr, struct nlist
} else if (!strcmp(sn, ELF_DATA))
np->n_type = N_DATA;
else if (!strcmp(sn, ELF_BSS))
+ np->n_type = N_BSS | N_EXT;
+ else if (!strcmp(sn, ELF_SBSS))
np->n_type = N_BSS;
else
np->n_other = '?';