Re: i386 memory corrupted by free_initmem()

Linus Torvalds (torvalds@transmeta.com)
Fri, 16 May 1997 17:07:22 -0700 (PDT)


On Sat, 17 May 1997 Andries.Brouwer@cwi.nl wrote:
>
> I got c0217610 and c021fc6c for init_begin and init_end, respectively.
> Thus, the original code will allow all data in c0217000 - c0217610
> to be overwritten. This had various amusing consequences.

I can imagine. It also clearly indicates that your linker is bad, because
the "vmlinux.lds" file does explicitly tell the linker to make sure that
init_begin and init_end be page-aligned.

> I know that vmlinux.lds contains the line . = ALIGN(4096) , but on this
> machine here (binutils 2.6.0.2) that does not cause init_begin to be
> page-aligned.

Note that I'll probably use the "ALIGN(4096)" thing for other things too
in the near future (getting rid of some of the data stuff in "head.S", so
a linker that doesn't honour the alignment restrictions will break badly
because that non-alignment simply cannot be fixed up at run-time.

Linus