Fix bss size alignment in the assembler.
Relax the requirement in the linker as well.
This commit is contained in:
@@ -2425,6 +2425,9 @@ void makeheader (rtsize, rdsize)
|
||||
{
|
||||
struct exec hdr;
|
||||
|
||||
/* Align BSS size. */
|
||||
count[SBSS] = (count[SBSS] + WORDSZ-1) & ~(WORDSZ-1);
|
||||
|
||||
hdr.a_midmag = RMAGIC;
|
||||
hdr.a_text = count [STEXT];
|
||||
hdr.a_data = count [SDATA] + count [SSTRNG];
|
||||
|
||||
@@ -866,8 +866,7 @@ void readhdr (loc)
|
||||
error (2, "bad length of text");
|
||||
if (filhdr.a_data % W)
|
||||
error (2, "bad length of data");
|
||||
if (filhdr.a_bss % W)
|
||||
error (2, "bad length of bss");
|
||||
/* BSS segment is allowed to be unaligned. */
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user