diff options
author | 2004-03-30 15:12:38 +0000 | |
---|---|---|
committer | 2004-03-30 15:12:38 +0000 | |
commit | 00f0c9335fd8c4adff956a7479026185231e920c (patch) | |
tree | 36c81e475068ad6b4c2a7c7852f2214c6c4eb547 | |
parent | grammar; (diff) | |
download | wireguard-openbsd-00f0c9335fd8c4adff956a7479026185231e920c.tar.xz wireguard-openbsd-00f0c9335fd8c4adff956a7479026185231e920c.zip |
translate names in .sbss section as static N_BSS; found by drahn@
-rw-r--r-- | usr.bin/nm/elf.c | 6 |
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 = '?'; |