aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/modpost.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 281abb77e033..5f2ecd51bde3 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -616,6 +616,15 @@ static int strrcmp(const char *s, const char *sub)
616 * fromsec = .text 616 * fromsec = .text
617 * atsym = kernel_init 617 * atsym = kernel_init
618 * Some symbols belong to init section but still it is ok to reference 618 * Some symbols belong to init section but still it is ok to reference
619 *
620 * Pattern 7:
621 * Logos used in drivers/video/logo reside in __initdata but the
622 * funtion that references them are EXPORT_SYMBOL() so cannot be
623 * marker __init. So we whitelist them here.
624 * The pattern is:
625 * tosec = .init.data
626 * fromsec = .text*
627 * refsymname = logo_
619 **/ 628 **/
620static int secref_whitelist(const char *modname, const char *tosec, 629static int secref_whitelist(const char *modname, const char *tosec,
621 const char *fromsec, const char *atsym, 630 const char *fromsec, const char *atsym,
@@ -687,6 +696,12 @@ static int secref_whitelist(const char *modname, const char *tosec,
687 (strcmp(fromsec, ".text") == 0) && 696 (strcmp(fromsec, ".text") == 0) &&
688 (strcmp(refsymname, "kernel_init") == 0)) 697 (strcmp(refsymname, "kernel_init") == 0))
689 return 1; 698 return 1;
699
700 /* Check for pattern 7 */
701 if ((strcmp(tosec, ".init.data") == 0) &&
702 (strncmp(fromsec, ".text", strlen(".text")) == 0) &&
703 (strncmp(refsymname, "logo_", strlen("logo_")) == 0))
704 return 1;
690 return 0; 705 return 0;
691} 706}
692 707