Skip to content

Commit

Permalink
vmlinux.lds.h: Allow architectures to add sections to the front of .bss
Browse files Browse the repository at this point in the history
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 <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Cc: linux-arch@vger.kernel.org,
Cc: linux-kernel@vger.kernel.org
Acked-by: Arnd Bergmann <arnd@arndb.de>
Patchwork: https://patchwork.linux-mips.org/patch/4221/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
daviddaney authored and ralfbaechle committed Oct 11, 2012
1 parent b4f2a17 commit c87728c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/asm-generic/vmlinux.lds.h
Expand Up @@ -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) \
Expand Down

0 comments on commit c87728c

Please sign in to comment.