Hello,

this patch fixes a crash when the kernel is built with
romfs support and the size of the .init segment
immediately preceding ends up being not an even multiple
of 8bytes.

The linker inserts extra padding between the text segment
and the data segment (e.g. from 0xec2cc to 0xecd0).

I've seen this happening with binutils-2.14.90.0.8, but
I'm not sure whether it's a new binutils 'feature' or a
change in kernel data that calls for stricter alignment.

When objdump extracts the .text segment, the padding is
not there so when the romfs image is cat'd after the
kernel it's at a 4-byte offset from where the startup
code expects it should be (_sbss).
 
My fix is overzealous in that it pads .init to 4KB instead
of just 8bytes.  I did this for two reasons:

 - first, I don't know for sure what the actual alignment
   requirement was;

 - second, the .init section is supposed to be freed and
   its pages returned to the page allocator.  If the
   size is not an even multiple of a page, rounding will
   waste some bytes.  In the end, the 4KB alignment is
   supposed to be an improvement.

Linker map file available on demand for the curious.


--- linux-2.6.6-uc0/arch/m68knommu/kernel/vmlinux.lds.S	2004-05-10 04:32:28.000000000 +0200
+++ linux-2.6.6-uc0-develer/arch/m68knommu/kernel/vmlinux.lds.S	2004-06-01 01:21:57.898770709 +0200
@@ -306,7 +315,7 @@ SECTIONS {
 		__initramfs_start = .;
 		*(.init.ramfs)
 		__initramfs_end = .;
-		. = ALIGN(4);
+		. = ALIGN(4096);
 		__init_end = .;
 	} > INIT

