summaryrefslogtreecommitdiff
path: root/lib/libc/gen
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-08-27 17:16:01 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-08-27 17:16:01 +0000
commit0343a32f0193e94db5bc1c26c93874ad74e8918d (patch)
treecd3899acd90a05c8873c948264144530534b739a /lib/libc/gen
parent94541b8379325b625efd9ea532daed507127a6fd (diff)
sync STT_NOTYPE parsign w/ kvm_mkdb; pb@ testing
Diffstat (limited to 'lib/libc/gen')
-rw-r--r--lib/libc/gen/nlist.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c
index f143916d883..16030a9c431 100644
--- a/lib/libc/gen/nlist.c
+++ b/lib/libc/gen/nlist.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: nlist.c,v 1.45 2003/06/25 21:16:47 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: nlist.c,v 1.46 2003/08/27 17:16:00 mickey Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -456,7 +456,20 @@ __elf_fdnlist(fd, list)
/* is pretty rude. */
switch(ELF_ST_TYPE(s->st_info)) {
case STT_NOTYPE:
- p->n_type = N_UNDF;
+ switch (s->st_shndx) {
+ case SHN_UNDEF:
+ p->n_type = N_UNDF;
+ break;
+ case SHN_ABS:
+ p->n_type = N_ABS;
+ break;
+ case SHN_COMMON:
+ p->n_type = N_COMM;
+ break;
+ default:
+ p->n_type = N_COMM | N_EXT;
+ break;
+ }
break;
case STT_OBJECT:
p->n_type = N_DATA;