powerpc: Don't change the section in _GLOBAL()
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 15 Sep 2016 00:40:20 +0000 (10:40 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 19 Sep 2016 00:53:55 +0000 (10:53 +1000)
commitbea2dccccfd47ef3f8612f1265f653f8e018d793
tree7dadc083e3d5768ad8738320b4fa0205f2f729aa
parent6f698df10cb24d466b9a790b9daedb9e7bcd5d2a
powerpc: Don't change the section in _GLOBAL()

Currently the _GLOBAL() macro unilaterally sets the assembler section to
".text" at the start of the macro. This is rude as the caller may be
using a different section.

So let the caller decide which section to emit the code into. On big
endian we do need to switch to the ".opd" section to emit the OPD, but
do that with pushsection/popsection, thereby leaving the original
section intact.

I verified that the order of all entries in System.map is unchanged
after this patch. The actual addresses shift around slightly so you
can't just diff the System.map.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/ppc_asm.h