diff options
author | Quentin Casasnovas <quentin.casasnovas@oracle.com> | 2015-04-15 23:46:41 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-04-22 04:01:33 -0400 |
commit | c5c3439af0f9c08e253d2a703a7eb3deba7d8591 (patch) | |
tree | bfeb5c3f00886e13dd829a6f490f4b30947bfd7c /scripts | |
parent | e84048aa173f2403fa468cb189f101b57fece539 (diff) |
modpost: do not try to match the SHT_NUL section.
Trying to match the SHT_NUL section isn't useful and causes build failures
on parisc and mn10300 since the addition of section strict white-listing
and __ex_table sanitizing.
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Fixes: 050e57fd5936 ("modpost: add strict white-listing when referencing....")
Fixes: 52dc0595d540 ("modpost: handle relocations mismatch in __ex_table.")
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mod/modpost.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index fd949770da0c..45e4027d3193 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -1064,6 +1064,15 @@ static const struct sectioncheck *section_mismatch( | |||
1064 | int elems = sizeof(sectioncheck) / sizeof(struct sectioncheck); | 1064 | int elems = sizeof(sectioncheck) / sizeof(struct sectioncheck); |
1065 | const struct sectioncheck *check = §ioncheck[0]; | 1065 | const struct sectioncheck *check = §ioncheck[0]; |
1066 | 1066 | ||
1067 | /* | ||
1068 | * The target section could be the SHT_NUL section when we're | ||
1069 | * handling relocations to un-resolved symbols, trying to match it | ||
1070 | * doesn't make much sense and causes build failures on parisc and | ||
1071 | * mn10300 architectures. | ||
1072 | */ | ||
1073 | if (*tosec == '\0') | ||
1074 | return NULL; | ||
1075 | |||
1067 | for (i = 0; i < elems; i++) { | 1076 | for (i = 0; i < elems; i++) { |
1068 | if (match(fromsec, check->fromsec)) { | 1077 | if (match(fromsec, check->fromsec)) { |
1069 | if (check->bad_tosec[0] && match(tosec, check->bad_tosec)) | 1078 | if (check->bad_tosec[0] && match(tosec, check->bad_tosec)) |