From 13ced3364c3bfea6e4d996766a087daa6cd30fef Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Mon, 6 Jun 2005 19:33:40 +0000 Subject: [PATCH] GCC 3 requires BSS be cleared: it places variables initialized to 0 from DATA to BSS --- second/head.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/second/head.S b/second/head.S index ff4d083..b3bb02d 100644 --- a/second/head.S +++ b/second/head.S @@ -10,8 +10,8 @@ .short 0xA9C9 .endm -.macro NewPtr - .short 0xA11E +.macro NewPtrClear + .short 0xA31E .endm .equ cmdline_length, 256 /* see CL_SIZE in bootinfo.c */ @@ -85,7 +85,8 @@ relocate: /* Allocate BSS section */ move.l #__bss_size, %d0 /* size */ - NewPtr /* result in %a0 */ + /* Alloc and clear memory (needed by GCC 3) */ + NewPtrClear /* result in %a0 */ move.l %a0, %d0 bne malloc_ok SysError