diff options
-rw-r--r-- | scripts/mod/modpost.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 7e8079a34adf..cd00e9f07589 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -492,17 +492,19 @@ static int strrcmp(const char *s, const char *sub) | |||
492 | * These functions may often be marked __init and we do not want to | 492 | * These functions may often be marked __init and we do not want to |
493 | * warn here. | 493 | * warn here. |
494 | * the pattern is identified by: | 494 | * the pattern is identified by: |
495 | * tosec = .init.text | .exit.text | 495 | * tosec = .init.text | .exit.text | .init.data |
496 | * fromsec = .data | 496 | * fromsec = .data |
497 | * atsym = *_driver, *_ops, *_probe, *probe_one | 497 | * atsym = *_driver, *_template, *_sht, *_ops, *_probe, *probe_one |
498 | **/ | 498 | **/ |
499 | static int secref_whitelist(const char *tosec, const char *fromsec, | 499 | static int secref_whitelist(const char *tosec, const char *fromsec, |
500 | const char *atsym) | 500 | const char *atsym) |
501 | { | 501 | { |
502 | int f1 = 1, f2 = 1; | 502 | int f1 = 1, f2 = 1; |
503 | const char **s; | 503 | const char **s; |
504 | const char *pat2sym[] = { | 504 | const char *pat2sym[] = { |
505 | "_driver", | 505 | "_driver", |
506 | "_template", /* scsi uses *_template a lot */ | ||
507 | "_sht", /* scsi also used *_sht to some extent */ | ||
506 | "_ops", | 508 | "_ops", |
507 | "_probe", | 509 | "_probe", |
508 | "_probe_one", | 510 | "_probe_one", |
@@ -522,7 +524,8 @@ static int secref_whitelist(const char *tosec, const char *fromsec, | |||
522 | 524 | ||
523 | /* Check for pattern 2 */ | 525 | /* Check for pattern 2 */ |
524 | if ((strcmp(tosec, ".init.text") != 0) && | 526 | if ((strcmp(tosec, ".init.text") != 0) && |
525 | (strcmp(tosec, ".exit.text") != 0)) | 527 | (strcmp(tosec, ".exit.text") != 0) && |
528 | (strcmp(tosec, ".init.data") != 0)) | ||
526 | f2 = 0; | 529 | f2 = 0; |
527 | if (strcmp(fromsec, ".data") != 0) | 530 | if (strcmp(fromsec, ".data") != 0) |
528 | f2 = 0; | 531 | f2 = 0; |
@@ -820,6 +823,7 @@ static int exit_section(const char *name) | |||
820 | * For our future {in}sanity, add a comment that this is the ppc .opd | 823 | * For our future {in}sanity, add a comment that this is the ppc .opd |
821 | * section, not the ia64 .opd section. | 824 | * section, not the ia64 .opd section. |
822 | * ia64 .opd should not point to discarded sections. | 825 | * ia64 .opd should not point to discarded sections. |
826 | * [.rodata] like for .init.text we ignore .rodata references -same reason | ||
823 | **/ | 827 | **/ |
824 | static int exit_section_ref_ok(const char *name) | 828 | static int exit_section_ref_ok(const char *name) |
825 | { | 829 | { |
@@ -829,6 +833,7 @@ static int exit_section_ref_ok(const char *name) | |||
829 | ".exit.text", | 833 | ".exit.text", |
830 | ".exit.data", | 834 | ".exit.data", |
831 | ".init.text", | 835 | ".init.text", |
836 | ".rodata", | ||
832 | ".opd", /* See comment [OPD] */ | 837 | ".opd", /* See comment [OPD] */ |
833 | ".toc1", /* used by ppc64 */ | 838 | ".toc1", /* used by ppc64 */ |
834 | ".altinstructions", | 839 | ".altinstructions", |