ADB dumped core on the SUN, because of 0-indexes in the symbol table.

They are replaced by pointers to null-strings
This commit is contained in:
ceriel 1987-03-05 15:44:17 +00:00
parent a1c73c0335
commit 7559525e48
2 changed files with 26 additions and 2 deletions

View file

@ -485,8 +485,19 @@ emit_symtab()
M->value = A->on_valu;
switch(A->on_type & S_TYP) {
case S_UND:
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;
break;
@ -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));
}

View file

@ -485,8 +485,19 @@ emit_symtab()
M->value = A->on_valu;
switch(A->on_type & S_TYP) {
case S_UND:
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;
break;
@ -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));
}