From 7559525e480a649adacade58f507cb99aeb27126 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 5 Mar 1987 15:44:17 +0000 Subject: [PATCH] ADB dumped core on the SUN, because of 0-indexes in the symbol table. They are replaced by pointers to null-strings --- mach/sun2/cv/cv.c | 14 +++++++++++++- mach/sun3/cv/cv.c | 14 +++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/mach/sun2/cv/cv.c b/mach/sun2/cv/cv.c index c896a3722..3087d9fa2 100644 --- a/mach/sun2/cv/cv.c +++ b/mach/sun2/cv/cv.c @@ -485,7 +485,18 @@ emit_symtab() M->value = A->on_valu; switch(A->on_type & S_TYP) { case S_UND: - M->type = N_UNDF; + switch(A->on_type & S_ETC) { + default: + M->type = N_UNDF; + break; + case S_MOD: + case S_FIL: + M->type = N_FN; + break; + case S_LIN: + M->type = N_ABS; + break; + } break; case S_ABS: M->type = N_ABS; @@ -528,6 +539,7 @@ emit_symtab() if (M->name = A->on_foff) { M->name -= offX; } + else M->name = outhead.oh_nchar + 3; /* pointer to nullbyte */ cvlong(&(M->name)); cvlong(&(M->value)); } diff --git a/mach/sun3/cv/cv.c b/mach/sun3/cv/cv.c index c896a3722..3087d9fa2 100644 --- a/mach/sun3/cv/cv.c +++ b/mach/sun3/cv/cv.c @@ -485,7 +485,18 @@ emit_symtab() M->value = A->on_valu; switch(A->on_type & S_TYP) { case S_UND: - M->type = N_UNDF; + switch(A->on_type & S_ETC) { + default: + M->type = N_UNDF; + break; + case S_MOD: + case S_FIL: + M->type = N_FN; + break; + case S_LIN: + M->type = N_ABS; + break; + } break; case S_ABS: M->type = N_ABS; @@ -528,6 +539,7 @@ emit_symtab() if (M->name = A->on_foff) { M->name -= offX; } + else M->name = outhead.oh_nchar + 3; /* pointer to nullbyte */ cvlong(&(M->name)); cvlong(&(M->value)); }