diff options
author | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-02-22 15:24:50 -0500 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-02-22 15:24:50 -0500 |
commit | 6e10133fa4b2366e8ef18bc2ce34afe727b1c4ba (patch) | |
tree | 10204f957a5a42c2e9496eb3cdd074eb7132481c /scripts/mod/modpost.c | |
parent | fededcd2af6219de69b252b7d3ea4b4ec2f33c7a (diff) |
kbuild: do not warn when unwind sections references .init/.exit sections
Andrew Morton reported a number of false positives for ia64 - like these:
WARNING: drivers/acpi/button.o - Section mismatch: reference to .init.text: from .IA_64.unwind.init.text after '' (at offset 0x0)
WARNING: drivers/acpi/button.o - Section mismatch: reference to .exit.text: from .IA_64.unwind.exit.text after '' (at offset 0x0)
WARNING: drivers/acpi/processor.o - Section mismatch: reference to .init.text: from .IA_64.unwind after '' (at offset 0x1e8)
They are all false positives - or at least the .c code looks OK.
It is not known why sometimes a section name is appended and sometimes not.
Fix is to accept references from all sections that includes "unwind." in the name.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/mod/modpost.c')
-rw-r--r-- | scripts/mod/modpost.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 5b076ef51996..7f25354deba2 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -671,13 +671,21 @@ static int init_section_ref_ok(const char *name) | |||
671 | ".debug", | 671 | ".debug", |
672 | NULL | 672 | NULL |
673 | }; | 673 | }; |
674 | 674 | /* part of section name */ | |
675 | const char *namelist3 [] = { | ||
676 | ".unwind", /* sample: IA_64.unwind.init.text */ | ||
677 | NULL | ||
678 | }; | ||
679 | |||
675 | for (s = namelist1; *s; s++) | 680 | for (s = namelist1; *s; s++) |
676 | if (strcmp(*s, name) == 0) | 681 | if (strcmp(*s, name) == 0) |
677 | return 1; | 682 | return 1; |
678 | for (s = namelist2; *s; s++) | 683 | for (s = namelist2; *s; s++) |
679 | if (strncmp(*s, name, strlen(*s)) == 0) | 684 | if (strncmp(*s, name, strlen(*s)) == 0) |
680 | return 1; | 685 | return 1; |
686 | for (s = namelist3; *s; s++) | ||
687 | if (strstr(*s, name) != NULL) | ||
688 | return 1; | ||
681 | return 0; | 689 | return 0; |
682 | } | 690 | } |
683 | 691 | ||
@@ -727,6 +735,11 @@ static int exit_section_ref_ok(const char *name) | |||
727 | ".debug", | 735 | ".debug", |
728 | NULL | 736 | NULL |
729 | }; | 737 | }; |
738 | /* part of section name */ | ||
739 | const char *namelist3 [] = { | ||
740 | ".unwind", /* Sample: IA_64.unwind.exit.text */ | ||
741 | NULL | ||
742 | }; | ||
730 | 743 | ||
731 | for (s = namelist1; *s; s++) | 744 | for (s = namelist1; *s; s++) |
732 | if (strcmp(*s, name) == 0) | 745 | if (strcmp(*s, name) == 0) |
@@ -734,6 +747,9 @@ static int exit_section_ref_ok(const char *name) | |||
734 | for (s = namelist2; *s; s++) | 747 | for (s = namelist2; *s; s++) |
735 | if (strncmp(*s, name, strlen(*s)) == 0) | 748 | if (strncmp(*s, name, strlen(*s)) == 0) |
736 | return 1; | 749 | return 1; |
750 | for (s = namelist3; *s; s++) | ||
751 | if (strstr(*s, name) != NULL) | ||
752 | return 1; | ||
737 | return 0; | 753 | return 0; |
738 | } | 754 | } |
739 | 755 | ||