Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Dec 2013 13:15:39 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r259414 - in projects/specific_leg/sys: arm/arm conf
Message-ID:  <201312151315.rBFDFdoj014052@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Sun Dec 15 13:15:38 2013
New Revision: 259414
URL: http://svnweb.freebsd.org/changeset/base/259414

Log:
  Move _end back to the end of the kernel's bss and add an _ebss value to
  find the end of the bss to clear. Without this the kernel breaks when the
  size of the .text section is wrong by pushing the startup page table into
  the area allocated in initarm. It was only by luck this worked previously.

Modified:
  projects/specific_leg/sys/arm/arm/locore.S
  projects/specific_leg/sys/conf/ldscript.arm

Modified: projects/specific_leg/sys/arm/arm/locore.S
==============================================================================
--- projects/specific_leg/sys/arm/arm/locore.S	Sun Dec 15 08:52:16 2013	(r259413)
+++ projects/specific_leg/sys/arm/arm/locore.S	Sun Dec 15 13:15:38 2013	(r259414)
@@ -287,7 +287,7 @@ Lstartup_pagetable_secondary:
 
 .Lstart:
 	.word	_edata
-	.word	_end
+	.word	_ebss
 	.word	svcstk + INIT_ARM_STACK_SIZE
 
 .Lvirt_done:

Modified: projects/specific_leg/sys/conf/ldscript.arm
==============================================================================
--- projects/specific_leg/sys/conf/ldscript.arm	Sun Dec 15 08:52:16 2013	(r259413)
+++ projects/specific_leg/sys/conf/ldscript.arm	Sun Dec 15 13:15:38 2013	(r259414)
@@ -108,13 +108,14 @@ SECTIONS
    *(.bss)
    *(COMMON)
    . = ALIGN(32 / 8);
-   _end = . ;
-   PROVIDE (end = .);
+   _ebss = .;
    /* A section for the initial page table, it doesn't need to be in the
       kernel file, however unlike normal .bss entries should not be zeroed
       out as we use it before the .bss section is cleared. */
    *(.init_pagetable)
   }
+  _end = . ;
+  PROVIDE (end = .);
   /* Stabs debugging sections.  */
   .stab 0 : { *(.stab) }
   .stabstr 0 : { *(.stabstr) }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312151315.rBFDFdoj014052>