summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMagnus Damm <magnus@valinux.co.jp>2006-08-08 17:32:11 +0900
committerSam Ravnborg <sam@neptun.ravnborg.org>2006-09-25 09:01:49 +0200
commit9e157a5aa899f1ef73780e4755b57ddeb9225079 (patch)
tree5e5005a758093735fa02d13856153419b37470cb /scripts
parenta07f6033ca135a94a69c6874d028f01338e2535c (diff)
downloadlinux-9e157a5aa899f1ef73780e4755b57ddeb9225079.tar.gz
linux-9e157a5aa899f1ef73780e4755b57ddeb9225079.tar.bz2
linux-9e157a5aa899f1ef73780e4755b57ddeb9225079.zip
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>
Diffstat (limited to 'scripts')
-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)
* fromsec = .data
* atsym = *driver, *_template, *_sht, *_ops, *_probe, *probe_one
**/
-static int secref_whitelist(const char *tosec, const char *fromsec,
- const char *atsym)
+static int secref_whitelist(const char *modname, const char *tosec,
+ const char *fromsec, const char *atsym)
{
int f1 = 1, f2 = 1;
const char **s;
@@ -618,8 +618,15 @@ static int secref_whitelist(const char *tosec, const char *fromsec,
for (s = pat2sym; *s; s++)
if (strrcmp(atsym, *s) == 0)
f1 = 1;
+ if (f1 && f2)
+ return 1;
- return f1 && f2;
+ /* Whitelist all references from .pci_fixup section if vmlinux */
+ if (is_vmlinux(modname)) {
+ if ((strcmp(fromsec, ".pci_fixup") == 0) &&
+ (strcmp(tosec, ".init.text") == 0))
+ return 1;
+ }
}
/**
@@ -726,7 +733,8 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec,
/* check whitelist - we may ignore it */
if (before &&
- secref_whitelist(secname, fromsec, elf->strtab + before->st_name))
+ secref_whitelist(modname, secname, fromsec,
+ elf->strtab + before->st_name))
return;
if (before && after) {