svn commit: r259414 - in projects/specific_leg/sys: arm/arm conf

Andrew Turner andrew at FreeBSD.org
Sun Dec 15 13:15:39 UTC 2013


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) }


More information about the svn-src-projects mailing list