]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/module: Fix TOC symbol CRC
authorLaurent Dufour <ldufour@linux.vnet.ibm.com>
Tue, 24 Jun 2014 08:53:59 +0000 (10:53 +0200)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 25 Jun 2014 03:10:48 +0000 (13:10 +1000)
commit589b936a0af53cb4296231dbb7bce8a09e82e7c5
treeac6b3f35ebb65d59d07fdd8ee1bf93a33566c777
parent1664df35647579eddbb65d3061def55da7083e3c
powerpc/module: Fix TOC symbol CRC

The commit 0543429ce49c introduced the magic symbol ".TOC." for ELFv2 ABI.
This symbol is built manually and has no CRC value computed. A zero value
is put in the CRC section to avoid modpost complaining about a missing CRC.
Unfortunately, this breaks the kernel module loading when the kernel is
relocated (kdump case for instance) because of the relocation applied to
the kcrctab values.

This patch compute a CRC value for the TOC symbol which will match the one
compute by the kernel when it is relocated - aka '0 - relocate_start' done in
maybe_relocated called by check_version (module.c).

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/module_64.c