aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Damm <magnus@valinux.co.jp>2006-08-08 04:32:11 -0400
committerSam Ravnborg <sam@neptun.ravnborg.org>2006-09-25 03:01:49 -0400
commit9e157a5aa899f1ef73780e4755b57ddeb9225079 (patch)
tree5e5005a758093735fa02d13856153419b37470cb
parenta07f6033ca135a94a69c6874d028f01338e2535c (diff)
kbuild: ignore references from ".pci_fixup" to ".init.text"
The modpost code is extended to ignore references from ".pci_fixup" to ".init.text". Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
-rw-r--r--scripts/mod/modpost.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index dfde0e87a765..5028d46a8f35 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -581,8 +581,8 @@ static int strrcmp(const char *s, const char *sub)
581 * fromsec = .data 581 * fromsec = .data
582 * atsym = *driver, *_template, *_sht, *_ops, *_probe, *probe_one 582 * atsym = *driver, *_template, *_sht, *_ops, *_probe, *probe_one
583 **/ 583 **/
584static int secref_whitelist(const char *tosec, const char *fromsec, 584static int secref_whitelist(const char *modname, const char *tosec,
585 const char *atsym) 585 const char *fromsec, const char *atsym)
586{ 586{
587 int f1 = 1, f2 = 1; 587 int f1 = 1, f2 = 1;
588 const char **s; 588 const char **s;
@@ -618,8 +618,15 @@ static int secref_whitelist(const char *tosec, const char *fromsec,
618 for (s = pat2sym; *s; s++) 618 for (s = pat2sym; *s; s++)
619 if (strrcmp(atsym, *s) == 0) 619 if (strrcmp(atsym, *s) == 0)
620 f1 = 1; 620 f1 = 1;
621 if (f1 && f2)
622 return 1;
621 623
622 return f1 && f2; 624 /* Whitelist all references from .pci_fixup section if vmlinux */
625 if (is_vmlinux(modname)) {
626 if ((strcmp(fromsec, ".pci_fixup") == 0) &&
627 (strcmp(tosec, ".init.text") == 0))
628 return 1;
629 }
623} 630}
624 631
625/** 632/**
@@ -726,7 +733,8 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec,
726 733
727 /* check whitelist - we may ignore it */ 734 /* check whitelist - we may ignore it */
728 if (before && 735 if (before &&
729 secref_whitelist(secname, fromsec, elf->strtab + before->st_name)) 736 secref_whitelist(modname, secname, fromsec,
737 elf->strtab + before->st_name))
730 return; 738 return;
731 739
732 if (before && after) { 740 if (before && after) {