Fix bug in assembler: unaligned allocation of local common blocks.

This commit is contained in:
vak
2015-09-16 19:19:26 -07:00
parent dbd2d74487
commit 51e09b4885

View File

@@ -2400,6 +2400,8 @@ void middle ()
break;
case N_COMM:
/* Allocate a local common block */
/* Align BSS count. */
count[SBSS] = (count[SBSS] + WORDSZ-1) & ~(WORDSZ-1);
nbytes = stab[i].n_value;
stab[i].n_value = count[SBSS];
stab[i].n_type = N_BSS;