x86: Fix build with older binutils and consolidate linker script
authorJan Beulich <JBeulich@novell.com>
Tue, 25 Aug 2009 13:50:53 +0000 (14:50 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 25 Aug 2009 13:54:16 +0000 (15:54 +0200)
commitc62e43202e7cf50ca24bce58b255df7bf5de69d0
tree7db630d5e57496b417afdc67efeb8905b8f45d4d
parenta6a06f7b577f89d0b916c5ccaff67ca5ed444a78
x86: Fix build with older binutils and consolidate linker script

binutils prior to 2.17 can't deal with the currently possible
situation of a new segment following the per-CPU segment, but
that new segment being empty - objcopy misplaces the .bss (and
perhaps also the .brk) sections outside of any segment.

However, the current ordering of sections really just appears
to be the effect of cumulative unrelated changes; re-ordering
things allows to easily guarantee that the segment following
the per-CPU one is non-empty, and at once eliminates the need
for the bogus data.init2 segment.

Once touching this code, also use the various data section
helper macros from include/asm-generic/vmlinux.lds.h.

-v2: fix !SMP builds.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: <sam@ravnborg.org>
LKML-Reference: <4A94085D02000078000119A5@vpn.id2.novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/vmlinux.lds.S