From: David Daney Date: Tue, 14 Aug 2012 18:08:00 +0000 (-0700) Subject: vmlinux.lds.h: Allow architectures to add sections to the front of .bss X-Git-Tag: v3.7-rc1~1^2~20 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=c87728ca82a1057eb8f84e139bf416ca5488b6fb;p=~emulex%2Finfiniband.git vmlinux.lds.h: Allow architectures to add sections to the front of .bss Follow-on MIPS patch will put an object here that needs 64K alignment to minimize padding. For those architectures that don't define BSS_FIRST_SECTIONS, there is no change. Signed-off-by: David Daney Cc: linux-mips@linux-mips.org Cc: linux-arch@vger.kernel.org, Cc: linux-kernel@vger.kernel.org Acked-by: Arnd Bergmann Patchwork: https://patchwork.linux-mips.org/patch/4221/ Signed-off-by: Ralf Baechle --- diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 4e2e1cc505a..d1ea7ce0b4c 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -530,9 +530,18 @@ *(.scommon) \ } +/* + * Allow archectures to redefine BSS_FIRST_SECTIONS to add extra + * sections to the front of bss. + */ +#ifndef BSS_FIRST_SECTIONS +#define BSS_FIRST_SECTIONS +#endif + #define BSS(bss_align) \ . = ALIGN(bss_align); \ .bss : AT(ADDR(.bss) - LOAD_OFFSET) { \ + BSS_FIRST_SECTIONS \ *(.bss..page_aligned) \ *(.dynbss) \ *(.bss) \