]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - scripts/mod/modpost.c
kbuild: do section mismatch check on full vmlinux
[mirror_ubuntu-artful-kernel.git] / scripts / mod / modpost.c
index 1921c43f3a3efb1c64f910199b97076c6ba8f82c..ec036c261fb19546aa309c6e589f34c9a864e7d9 100644 (file)
@@ -75,7 +75,8 @@ static int is_vmlinux(const char *modname)
        else
                myname = modname;
 
-       return strcmp(myname, "vmlinux") == 0;
+       return (strcmp(myname, "vmlinux") == 0) ||
+              (strcmp(myname, "vmlinux.o") == 0);
 }
 
 void *do_nofail(void *ptr, const char *expr)
@@ -609,7 +610,7 @@ static int strrcmp(const char *s, const char *sub)
  *   the pattern is identified by:
  *   tosec   = .init.text | .exit.text | .init.data
  *   fromsec = .data
- *   atsym = *driver, *_template, *_sht, *_ops, *_probe, *probe_one, *_console
+ *   atsym = *driver, *_template, *_sht, *_ops, *_probe, *probe_one, *_console, *_timer
  *
  * Pattern 3:
  *   Whitelist all refereces from .text.head to .init.data
@@ -624,14 +625,6 @@ static int strrcmp(const char *s, const char *sub)
  *   This pattern is identified by
  *   refsymname = __init_begin, _sinittext, _einittext
  *
- * Pattern 5:
- *  Logos used in drivers/video/logo reside in __initdata but the
- *  funtion that references them are EXPORT_SYMBOL() so cannot be
- *  marker __init. So we whitelist them here.
- *  The pattern is:
- *  tosec      = .init.data
- *  fromsec    = .text*
- *  refsymname = logo_
  **/
 static int secref_whitelist(const char *modname, const char *tosec,
                            const char *fromsec, const char *atsym,
@@ -642,6 +635,7 @@ static int secref_whitelist(const char *modname, const char *tosec,
        const char *pat2sym[] = {
                "driver",
                "_template", /* scsi uses *_template a lot */
+               "_timer",    /* arm uses ops structures named _timer a lot */
                "_sht",      /* scsi also used *_sht to some extent */
                "_ops",
                "_probe",
@@ -698,12 +692,6 @@ static int secref_whitelist(const char *modname, const char *tosec,
                if (strcmp(refsymname, *s) == 0)
                        return 1;
 
-       /* Check for pattern 5 */
-       if ((strcmp(tosec, ".init.data") == 0) &&
-           (strncmp(fromsec, ".text", strlen(".text")) == 0) &&
-           (strncmp(refsymname, "logo_", strlen("logo_")) == 0))
-               return 1;
-
        return 0;
 }