x86, kaslr: Handle Gold linker for finding bss/brk
authorKees Cook <keescook@chromium.org>
Tue, 18 Nov 2014 00:16:04 +0000 (16:16 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 18 Nov 2014 17:32:24 +0000 (18:32 +0100)
commit70b61e362187b5fccac206506d402f3424e3e749
tree165174bcffbd0d6476d53a1334f33cd1056134a0
parent45e2a9d4701d8c624d4a4bcdd1084eae31e92f58
x86, kaslr: Handle Gold linker for finding bss/brk

When building with the Gold linker, the .bss and .brk areas of vmlinux
are shown as consecutive instead of having the same file offset. Allow
for either state, as long as things add up correctly.

Fixes: e6023367d779 ("x86, kaslr: Prevent .bss from overlaping initrd")
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Junjie Mao <eternal.n08@gmail.com>
Link: http://lkml.kernel.org/r/20141118001604.GA25045@www.outflux.net
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/tools/calc_run_size.pl