NetBSD/share/ldscripts/kmodule
ad 0b78a6ea64 Use an ldscript to merge kernel modules' .bss sections into .data. Passing
-fno-common -fno-zero-initialized-in-bss to gcc does not work, and objcopy
refuses to expand the bss section.
2008-05-20 12:17:48 +00:00

20 lines
324 B
Plaintext

/* $NetBSD: kmodule,v 1.1 2008/05/20 12:17:49 ad Exp $ */
SECTIONS
{
/* Pre-loaded modules must have merged BSS and data. */
.data 0 :
{
*(.data)
*(.data.*)
*(.bss)
*(.bss.*)
*(COMMON)
}
/* Pre-loaded modules do not need the following. */
/DISCARD/ :
{
*(.comment)
}
}