Commit 5b12c5c6 authored by Rusty Russell's avatar Rusty Russell Committed by Anton Blanchard

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: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 0906584a
...@@ -172,6 +172,7 @@ static unsigned long get_stubs_size(const Elf64_Ehdr *hdr, ...@@ -172,6 +172,7 @@ static unsigned long get_stubs_size(const Elf64_Ehdr *hdr,
return relocs * sizeof(struct ppc64_stub_entry); return relocs * sizeof(struct ppc64_stub_entry);
} }
/* Still needed for ELFv2, for .TOC. */
static void dedotify_versions(struct modversion_info *vers, static void dedotify_versions(struct modversion_info *vers,
unsigned long size) unsigned long size)
{ {
...@@ -182,7 +183,7 @@ static void dedotify_versions(struct modversion_info *vers, ...@@ -182,7 +183,7 @@ static void dedotify_versions(struct modversion_info *vers,
memmove(vers->name, vers->name+1, strlen(vers->name)); 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) static void dedotify(Elf64_Sym *syms, unsigned int numsyms, char *strtab)
{ {
unsigned int i; unsigned int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment