]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
depmod: Ignore PowerPC64 ABIv2 .TOC. symbol
authorAnton Blanchard <anton@samba.org>
Fri, 10 Jun 2016 05:24:30 +0000 (15:24 +1000)
committerLucas De Marchi <lucas.demarchi@intel.com>
Sat, 11 Jun 2016 03:27:39 +0000 (00:27 -0300)
The .TOC. symbol on the PowerPC64 ABIv2 identifies the GOT
pointer, similar to how other architectures use _GLOBAL_OFFSET_TABLE_.

This is not a symbol that needs relocation, and should be ignored
by depmod.

tools/depmod.c

index 6e9bb4dbc2ad65a65c45050f36af2ad985ec4dc0..a2e07c15ba605fa4129984089bd94a211d235003 100644 (file)
@@ -2153,6 +2153,8 @@ static void depmod_add_fake_syms(struct depmod *depmod)
        depmod_symbol_add(depmod, "__this_module", true, 0, NULL);
        /* On S390, this is faked up too */
        depmod_symbol_add(depmod, "_GLOBAL_OFFSET_TABLE_", true, 0, NULL);
+       /* On PowerPC64 ABIv2, .TOC. is more or less _GLOBAL_OFFSET_TABLE_ */
+       depmod_symbol_add(depmod, "TOC.", true, 0, NULL);
 }
 
 static int depmod_load_symvers(struct depmod *depmod, const char *filename)