Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5a4910fbbeef14cc91daa41086449a1a4acebc96
Commit:     5a4910fbbeef14cc91daa41086449a1a4acebc96
Parent:     a61b2dfd1823506dbf1f9b046e0b09237ec1b985
Author:     Sam Ravnborg <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 27 09:14:58 2007 +0100
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Wed May 2 20:58:08 2007 +0200

    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 <[EMAIL PROTECTED]>
---
 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 281abb7..5f2ecd5 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -616,6 +616,15 @@ static int strrcmp(const char *s, const char *sub)
  *   fromsec = .text
  *   atsym = kernel_init
  *   Some symbols belong to init section but still it is ok to reference
+ *
+ * Pattern 7:
+ *  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,
@@ -687,6 +696,12 @@ static int secref_whitelist(const char *modname, const 
char *tosec,
            (strcmp(fromsec, ".text") == 0) &&
            (strcmp(refsymname, "kernel_init") == 0))
                return 1;
+
+       /* Check for pattern 7 */
+       if ((strcmp(tosec, ".init.data") == 0) &&
+           (strncmp(fromsec, ".text", strlen(".text")) == 0) &&
+           (strncmp(refsymname, "logo_", strlen("logo_")) == 0))
+               return 1;
        return 0;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to