summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/module_64.c
diff options
context:
space:
mode:
authorRusty Russell2014-03-18 10:41:28 +0100
committerAnton Blanchard2014-04-23 02:05:30 +0200
commit5b12c5c69415b184aadb930660a47a8af4c6deb5 (patch)
treef9fa9857598b8c679bca68b391d04a86f291720b /arch/powerpc/kernel/module_64.c
parentpowerpc: Handle new ELFv2 module relocations (diff)
downloadkernel-qcow2-linux-5b12c5c69415b184aadb930660a47a8af4c6deb5.tar.gz
kernel-qcow2-linux-5b12c5c69415b184aadb930660a47a8af4c6deb5.tar.xz
kernel-qcow2-linux-5b12c5c69415b184aadb930660a47a8af4c6deb5.zip
powerpc: modules: comment about de-dotifying symbols when using the ELFv2 ABI.
ELFv2 doesn't use function descriptors, so we don't expect symbols to start with ".". But because depmod and modpost strip ".", and we have the special symbol ".TOC.", we still need to do it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'arch/powerpc/kernel/module_64.c')
-rw-r--r--arch/powerpc/kernel/module_64.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
index 34ba326ccc30..05b27a5efc7e 100644
--- a/arch/powerpc/kernel/module_64.c
+++ b/arch/powerpc/kernel/module_64.c
@@ -172,6 +172,7 @@ static unsigned long get_stubs_size(const Elf64_Ehdr *hdr,
return relocs * sizeof(struct ppc64_stub_entry);
}
+/* Still needed for ELFv2, for .TOC. */
static void dedotify_versions(struct modversion_info *vers,
unsigned long size)
{
@@ -182,7 +183,7 @@ static void dedotify_versions(struct modversion_info *vers,
memmove(vers->name, vers->name+1, strlen(vers->name));
}
-/* Undefined symbols which refer to .funcname, hack to funcname */
+/* Undefined symbols which refer to .funcname, hack to funcname (or .TOC.) */
static void dedotify(Elf64_Sym *syms, unsigned int numsyms, char *strtab)
{
unsigned int i;