aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/mod/modpost.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index ce7e0d17bae2..2909391a8035 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -650,9 +650,10 @@ static int strrcmp(const char *s, const char *sub)
650 * tosec = .init.text 650 * tosec = .init.text
651 * 651 *
652 * Pattern 10: 652 * Pattern 10:
653 * ia64 has machvec table for each platform. It is mixture of function 653 * ia64 has machvec table for each platform and
654 * pointer of .init.text and .text. 654 * powerpc has a machine desc table for each platform.
655 * fromsec = .machvec 655 * It is mixture of function pointers of .init.text and .text.
656 * fromsec = .machvec | .machine.desc
656 **/ 657 **/
657static int secref_whitelist(const char *modname, const char *tosec, 658static int secref_whitelist(const char *modname, const char *tosec,
658 const char *fromsec, const char *atsym, 659 const char *fromsec, const char *atsym,
@@ -751,7 +752,8 @@ static int secref_whitelist(const char *modname, const char *tosec,
751 return 1; 752 return 1;
752 753
753 /* Check for pattern 10 */ 754 /* Check for pattern 10 */
754 if (strcmp(fromsec, ".machvec") == 0) 755 if ((strcmp(fromsec, ".machvec") == 0) ||
756 (strcmp(fromsec, ".machine.desc") == 0))
755 return 1; 757 return 1;
756 758
757 return 0; 759 return 0;
@@ -887,6 +889,11 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec,
887 elf->strtab + before->st_name, refsymname)) 889 elf->strtab + before->st_name, refsymname))
888 return; 890 return;
889 891
892 /* fromsec whitelist - without a valid 'before'
893 * powerpc has a GOT table in .got2 section */
894 if (strcmp(fromsec, ".got2") == 0)
895 return;
896
890 if (before && after) { 897 if (before && after) {
891 warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s " 898 warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s "
892 "(between '%s' and '%s')\n", 899 "(between '%s' and '%s')\n",