We should do better here by effetively "dereferencing" references to the .toc (or the .got2) section, but that is much harder.
Unified · Split
| @@ -870,9 +870,12 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec, · 869 unmodified lines | ||
| 870 | 870 | return; |
| 871 | 871 | |
| 872 | 872 | /* fromsec whitelist - without a valid 'before' |
| 873 | − * powerpc has a GOT table in .got2 section */ | |
| 873 | + * powerpc has a GOT table in .got2 section | |
| 874 | + * and also a .toc section */ | |
| 874 | 875 | if (strcmp(fromsec, ".got2") == 0) |
| 875 | 876 | return; |
| 877 | + if (strcmp(fromsec, ".toc") == 0) | |
| 878 | + return; | |
| 876 | 879 | |
| 877 | 880 | if (before && after) { |
| 878 | 881 | warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s " |