kbuild: suppress modpost warnings for references from the .toc section as used by...
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 24 May 2007 04:16:13 +0000 (14:16 +1000)
committerSam Ravnborg <sam@ravnborg.org>
Mon, 16 Jul 2007 20:40:22 +0000 (22:40 +0200)
We should do better here by effetively "dereferencing" references to
the .toc (or the .got2) section, but that is much harder.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
scripts/mod/modpost.c

index 256b3d272e2ea75ff33168b6b5c9658c42a363b1..fa33a6b92a9dc9efb2876afd738a3212a6db043b 100644 (file)
@@ -870,9 +870,12 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec,
                return;
 
        /* fromsec whitelist - without a valid 'before'
-        * powerpc has a GOT table in .got2 section */
+        * powerpc has a GOT table in .got2 section
+        * and also a .toc section */
        if (strcmp(fromsec, ".got2") == 0)
                return;
+       if (strcmp(fromsec, ".toc") == 0)
+               return;
 
        if (before && after) {
                warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s "