From 34875d66709ee13e962a16d1f6f16a1792733045 Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Thu, 19 Aug 2004 19:23:09 +0000 Subject: STT_FUNC can be an absolute too --- usr.bin/nm/elf.c | 6 ++++-- 1 file 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) && -- cgit v1.2.3