From 157e2a52a9cfaa9ea0e0a9f1bd3e6ad4198cd118 Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Tue, 30 Mar 2004 15:12:39 +0000 Subject: translate names in .sbss section as static N_BSS; found by drahn@ --- usr.bin/nm/elf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 = '?'; -- cgit v1.2.3