svn commit: r294451 - head/sys/boot/mips/beri/boot2

Ed Maste emaste at FreeBSD.org
Wed Jan 20 18:35:45 UTC 2016


Author: emaste
Date: Wed Jan 20 18:35:43 2016
New Revision: 294451
URL: https://svnweb.freebsd.org/changeset/base/294451

Log:
  Increase BERI boot components section alignment to 16
  
  The .text, .bss, and .data sections claimed 16-byte alignment, but were
  only aligned to 8 by the linker script.
  
  Discovered with elfcopy(1) from elftoolchain, which performs validation
  absent from the binutils strip(1). ELF tool chain ticket #512.
  
  Reported by:	brooks
  Reviewed by:	brooks
  Sponsored by:	DARPA, AFRL

Modified:
  head/sys/boot/mips/beri/boot2/flashboot.ldscript
  head/sys/boot/mips/beri/boot2/jtagboot.ldscript

Modified: head/sys/boot/mips/beri/boot2/flashboot.ldscript
==============================================================================
--- head/sys/boot/mips/beri/boot2/flashboot.ldscript	Wed Jan 20 17:40:11 2016	(r294450)
+++ head/sys/boot/mips/beri/boot2/flashboot.ldscript	Wed Jan 20 18:35:43 2016	(r294451)
@@ -49,13 +49,13 @@ SECTIONS
 {
 	. = __boot2_base_vaddr__;
 	. += SIZEOF_HEADERS;
-	.text ALIGN(0x8): {
+	.text ALIGN(0x10): {
 		relocate.o(.text)
 		start.o(.text)
 		*(EXCLUDE_FILE (relocate.o start.o) .text)
 	}
-	.data ALIGN(0x8): { *(.data)}
-	.bss ALIGN(0x8): { *(.bss) }
+	.data ALIGN(0x10): { *(.data)}
+	.bss ALIGN(0x10): { *(.bss) }
 
 	__heap = ALIGN(0x8);	/* 64-bit aligned heap pointer */
 	__data_end = .;

Modified: head/sys/boot/mips/beri/boot2/jtagboot.ldscript
==============================================================================
--- head/sys/boot/mips/beri/boot2/jtagboot.ldscript	Wed Jan 20 17:40:11 2016	(r294450)
+++ head/sys/boot/mips/beri/boot2/jtagboot.ldscript	Wed Jan 20 18:35:43 2016	(r294451)
@@ -49,12 +49,12 @@ SECTIONS
 {
 	. = __boot2_base_vaddr__;
 	. += SIZEOF_HEADERS;
-	.text ALIGN(0x8): {
+	.text ALIGN(0x10): {
 		start.o(.text)
 		*(EXCLUDE_FILE (start.o) .text)
 	}
-	.data ALIGN(0x8): { *(.data)}
-	.bss ALIGN(0x8): { *(.bss) }
+	.data ALIGN(0x10): { *(.data)}
+	.bss ALIGN(0x10): { *(.bss) }
 
 	__heap = ALIGN(0x8);	/* 64-bit aligned heap pointer */
 	__data_end = .;


More information about the svn-src-head mailing list