From 265072ba75d7a931ed0a751d5192220bcc5cc230 Mon Sep 17 00:00:00 2001 From: Daniel Schwierzeck Date: Wed, 29 Oct 2014 17:30:36 +0100 Subject: MIPS: add .padding section to linker script Commit 79fd7e649e287228a1445820a72f7dd33baedb96 MIPS: always keep all sections in u-boot ELF binary. Always keep all sections in u-boot ELF binary. Move all unneeded sections after _end to avoid allocating space in the final binary. Also remove .deadcode section which is now obsolete. removed section .deadcode because the original symptoms were not visible anymore. Unfortuneatly the binutils bug still exists. The size of .rel.dyn section is often bigger than needed for all entries. But objcopy only allocates space as much as required for all reloc entries. Thus there is a gap between the last entry and __rel_dyn_end in u-boot.bin. If u-boot is booted from RAM (e.g. in SPL scenarios) that area could contain garbage data which could lead to CPU exceptions during relocation. Signed-off-by: Gabor Juhos Signed-off-by: Daniel Schwierzeck --- arch/mips/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/mips/config.mk') diff --git a/arch/mips/config.mk b/arch/mips/config.mk index b758116..4dc88f4 100644 --- a/arch/mips/config.mk +++ b/arch/mips/config.mk @@ -71,4 +71,4 @@ PLATFORM_LDFLAGS += -G 0 -static -n -nostdlib PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections LDFLAGS_FINAL += --gc-sections -pie OBJCOPYFLAGS += -j .text -j .rodata -j .data -j .got -OBJCOPYFLAGS += -j .u_boot_list -j .rel.dyn +OBJCOPYFLAGS += -j .u_boot_list -j .rel.dyn -j .padding -- cgit v1.1