diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-04-29 01:11:23 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-04-29 01:11:23 -0400 |
commit | 7b7e394185014e0f3bd8989cac937003f20ef9ce (patch) | |
tree | 3beda5f979bba0aa9822534e239cf1b45f3be69c /scripts/mod | |
parent | ddc5d3414593e4d7ad7fbd33e7f7517fcc234544 (diff) | |
parent | 693f7d362055261882659475d2ef022e32edbff1 (diff) |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'scripts/mod')
-rw-r--r-- | scripts/mod/modpost.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 0b92ddff26fd..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; |
@@ -658,7 +661,7 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec, | |||
658 | warn("%s - Section mismatch: reference to %s:%s from %s " | 661 | warn("%s - Section mismatch: reference to %s:%s from %s " |
659 | "before '%s' (at offset -0x%llx)\n", | 662 | "before '%s' (at offset -0x%llx)\n", |
660 | modname, secname, refsymname, fromsec, | 663 | modname, secname, refsymname, fromsec, |
661 | elf->strtab + before->st_name, | 664 | elf->strtab + after->st_name, |
662 | (long long)r.r_offset); | 665 | (long long)r.r_offset); |
663 | } else { | 666 | } else { |
664 | warn("%s - Section mismatch: reference to %s:%s from %s " | 667 | warn("%s - Section mismatch: reference to %s:%s from %s " |
@@ -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", |