aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2007-04-29 14:53:01 -0400
committerSam Ravnborg <sam@ravnborg.org>2007-05-02 14:58:10 -0400
commitb4d5171ac7d9806b1ea61903ff954cd9620135bf (patch)
tree0fa86c139e8525644d5cbe645ff5fb74963b230f /scripts/mod
parent66bd32e443203735b00f22bede637ec98f3070ca (diff)
kbuild: ignore section mismatch warning for references from .paravirtprobe to .init.text
Added on request from: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'scripts/mod')
-rw-r--r--scripts/mod/modpost.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index b81157cf4527..628f393ecaa6 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -635,6 +635,13 @@ static int strrcmp(const char *s, const char *sub)
635 * tosec = .init.data 635 * tosec = .init.data
636 * fromsec = .text* 636 * fromsec = .text*
637 * refsymname = logo_ 637 * refsymname = logo_
638 *
639 * Pattern 8:
640 * Symbols contained in .paravirtprobe may safely reference .init.text.
641 * The pattern is:
642 * tosec = .init.text
643 * fromsec = .paravirtprobe
644 *
638 **/ 645 **/
639static int secref_whitelist(const char *modname, const char *tosec, 646static int secref_whitelist(const char *modname, const char *tosec,
640 const char *fromsec, const char *atsym, 647 const char *fromsec, const char *atsym,
@@ -712,6 +719,12 @@ static int secref_whitelist(const char *modname, const char *tosec,
712 (strncmp(fromsec, ".text", strlen(".text")) == 0) && 719 (strncmp(fromsec, ".text", strlen(".text")) == 0) &&
713 (strncmp(refsymname, "logo_", strlen("logo_")) == 0)) 720 (strncmp(refsymname, "logo_", strlen("logo_")) == 0))
714 return 1; 721 return 1;
722
723 /* Check for pattern 8 */
724 if ((strcmp(tosec, ".init.text") == 0) &&
725 (strcmp(fromsec, ".paravirtprobe") == 0))
726 return 1;
727
715 return 0; 728 return 0;
716} 729}
717 730