diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2007-02-27 03:14:58 -0500 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2007-05-02 14:58:08 -0400 |
commit | 5a4910fbbeef14cc91daa41086449a1a4acebc96 (patch) | |
tree | d81c13661f886b960712cdfd11f97a95a81d5922 /scripts/mod | |
parent | a61b2dfd1823506dbf1f9b046e0b09237ec1b985 (diff) |
kbuild: whitelist logo references from .text to .init.data
drivers/video/logo has references from .text to .init.data
but function is only used during early init.
So reference is OK and we do not want to warn about them =>
whitelist the reference.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/mod')
-rw-r--r-- | scripts/mod/modpost.c | 15 |
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 | **/ |
620 | static int secref_whitelist(const char *modname, const char *tosec, | 629 | static 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 | ||