From a384961239845318a61886ecb10e35a0dcd8f8bb Mon Sep 17 00:00:00 2001 From: emaste Date: Wed, 20 Jan 2016 18:35:43 +0000 Subject: [PATCH] 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 --- sys/boot/mips/beri/boot2/flashboot.ldscript | 6 +++--- sys/boot/mips/beri/boot2/jtagboot.ldscript | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/boot/mips/beri/boot2/flashboot.ldscript b/sys/boot/mips/beri/boot2/flashboot.ldscript index 0c820fa7bbb5..4d61438bd9b8 100644 --- a/sys/boot/mips/beri/boot2/flashboot.ldscript +++ b/sys/boot/mips/beri/boot2/flashboot.ldscript @@ -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 = .; diff --git a/sys/boot/mips/beri/boot2/jtagboot.ldscript b/sys/boot/mips/beri/boot2/jtagboot.ldscript index 25fb61d0f536..064c6e15d038 100644 --- a/sys/boot/mips/beri/boot2/jtagboot.ldscript +++ b/sys/boot/mips/beri/boot2/jtagboot.ldscript @@ -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 = .;