]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
scripts/recordmcount.pl: support data in text section on powerpc
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 12 Jan 2016 12:14:22 +0000 (23:14 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 Jan 2016 19:29:03 +0000 (11:29 -0800)
commit3e96fc5b40e20872e4abdea213b80e5f5e21e71c
treef5ef310d27be352bffac6a6bb5c792724e74cb6a
parentbadc688439f09f440e8d3dcd5d23457e54dfa8eb
scripts/recordmcount.pl: support data in text section on powerpc

commit 2e50c4bef77511b42cc226865d6bc568fa7f8769 upstream.

If a text section starts out with a data blob before the first
function start label, disassembly parsing doing in recordmcount.pl
gets confused on powerpc, leading to creation of corrupted module
objects.

This was not a problem so far since the compiler would never create
such text sections.  However, this has changed with a recent change
in GCC 6 to support distances of > 2GB between a function and its
assoicated TOC in the ELFv2 ABI, exposing this problem.

There is already code in recordmcount.pl to handle such data blobs
on the sparc64 platform.  This patch uses the same method to handle
those on powerpc as well.

Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scripts/recordmcount.pl