diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2007-02-26 15:45:41 (GMT) |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2007-05-02 18:58:07 (GMT) |
commit | aae5f662a32c35b1a962627535acb588d48ff5f9 (patch) | |
tree | 6e300ed8557e850e350c95dffb57ff9d5d5b182d /scripts/mod | |
parent | 85bd2fddd68e757da8e1af98f857f61a3c9ce647 (diff) | |
download | linux-fsl-qoriq-aae5f662a32c35b1a962627535acb588d48ff5f9.tar.xz |
kbuild: whitelist section mismatch in init/main.c
In init/main.c we have a reference from rest_init() to .init.text
which is intentional.
Rename the function 'init' to 'kernel_init' to make it a
kernel wide unique symbol and 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, 14 insertions, 1 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 1912c75..be0827f 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -589,7 +589,7 @@ static int strrcmp(const char *s, const char *sub) * the pattern is identified by: * tosec = .init.text | .exit.text | .init.data * fromsec = .data - * atsym = *driver, *_template, *_sht, *_ops, *_probe, *probe_one + * atsym = *driver, *_template, *_sht, *_ops, *_probe, *probe_one, *_console * * Pattern 3: * Some symbols belong to init section but still it is ok to reference @@ -599,6 +599,14 @@ static int strrcmp(const char *s, const char *sub) * For ex. symbols marking the init section boundaries. * This pattern is identified by * refsymname = __init_begin, _sinittext, _einittext + * Pattern 4: + * During the early init phase we have references from .init.text to + * .text we have an intended section mismatch - do not warn about it. + * See kernel_init() in init/main.c + * tosec = .init.text + * fromsec = .text + * atsym = kernel_init + * Some symbols belong to init section but still it is ok to reference **/ static int secref_whitelist(const char *modname, const char *tosec, const char *fromsec, const char *atsym, @@ -668,6 +676,11 @@ static int secref_whitelist(const char *modname, const char *tosec, if (strcmp(refsymname, *s) == 0) return 1; } + /* Check for pattern 4 */ + if ((strcmp(tosec, ".init.text") == 0) && + (strcmp(fromsec, ".text") == 0) && + (strcmp(refsymname, "kernel_init") == 0)) + return 1; return 0; } |