Merge branch 'params' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux...
[sfrench/cifs-2.6.git] / scripts / mod / modpost.c
index b16044002d913655c8449e558e6c98131dd2e3d8..1ec7158b6c1f67e7264260c5995842d93854ee42 100644 (file)
@@ -14,6 +14,7 @@
 #define _GNU_SOURCE
 #include <stdio.h>
 #include <ctype.h>
+#include <string.h>
 #include "modpost.h"
 #include "../../include/generated/autoconf.h"
 #include "../../include/linux/license.h"
@@ -789,6 +790,7 @@ static const char *section_white_list[] =
 {
        ".comment*",
        ".debug*",
+       ".GCC-command-line",    /* mn10300 */
        ".mdebug*",        /* alpha, score, mips etc. */
        ".pdr",            /* alpha, score, mips etc. */
        ".stab*",
@@ -1230,7 +1232,7 @@ static char *sec2annotation(const char *s)
                        strcat(p, " ");
                return r; /* we leak her but we do not care */
        } else {
-               return "";
+               return strdup("");
        }
 }
 
@@ -1365,7 +1367,7 @@ static void report_sec_mismatch(const char *modname,
                "%s%s so it may be used outside an exit section.\n",
                from, prl_from, fromsym, from_p,
                to, prl_to, tosym, to_p,
-               sec2annotation(tosec), tosym, to_p);
+               prl_to, tosym, to_p);
                free(prl_from);
                free(prl_to);
                break;