diff options
| author | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-03-04 18:16:26 -0500 |
|---|---|---|
| committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-03-04 18:16:26 -0500 |
| commit | 9209aed0726c77ad13b8d83e73a3cf9f59a8c2b2 (patch) | |
| tree | 89f9a3c64883051f95930d821c62fc9b1a8a201c /scripts | |
| parent | 62070fa42c4ac23d1d71146a4c14702302b80245 (diff) | |
kbuild: kill false positives from section mismatch warnings for powerpc
Building an allmodconfig kernel for ppc64 revealed a number of false
positives - originally reported by Andrew Morton.
This patch removes most if not all false positives for ppc64:
Section .opd
The .opd section contains function descriptors at least for ppc64.
So ignore it for .init.text (was ignored for .exit.text).
See description of function descriptors here:
http://www.linuxbase.org/spec/ELF/ppc64/PPC-elf64abi-1.7.html
Section .toc1
ppc64 places some static variables in .toc1 - ignore the.
Section __bug_tabe
BUG() and friends uses __bug_table. Ignore warnings from that section.
Module parameters are placed in .data.rel for ppc64, for adjust pattern to
match on section named .data*
Tested with gcc: 3.4.0 and binutils 2.15.90.0.3
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/mod/modpost.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 5de3c63091e9..c4dc1d72d02e 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
| @@ -483,7 +483,7 @@ static int strrcmp(const char *s, const char *sub) | |||
| 483 | * this pattern. | 483 | * this pattern. |
| 484 | * The pattern is identified by: | 484 | * The pattern is identified by: |
| 485 | * tosec = .init.data | 485 | * tosec = .init.data |
| 486 | * fromsec = .data | 486 | * fromsec = .data* |
| 487 | * atsym =__param* | 487 | * atsym =__param* |
| 488 | * | 488 | * |
| 489 | * Pattern 2: | 489 | * Pattern 2: |
| @@ -512,7 +512,7 @@ static int secref_whitelist(const char *tosec, const char *fromsec, | |||
| 512 | /* Check for pattern 1 */ | 512 | /* Check for pattern 1 */ |
| 513 | if (strcmp(tosec, ".init.data") != 0) | 513 | if (strcmp(tosec, ".init.data") != 0) |
| 514 | f1 = 0; | 514 | f1 = 0; |
| 515 | if (strcmp(fromsec, ".data") != 0) | 515 | if (strncmp(fromsec, ".data", strlen(".data")) != 0) |
| 516 | f1 = 0; | 516 | f1 = 0; |
| 517 | if (strncmp(atsym, "__param", strlen("__param")) != 0) | 517 | if (strncmp(atsym, "__param", strlen("__param")) != 0) |
| 518 | f1 = 0; | 518 | f1 = 0; |
| @@ -743,9 +743,12 @@ static int init_section_ref_ok(const char *name) | |||
| 743 | /* Absolute section names */ | 743 | /* Absolute section names */ |
| 744 | const char *namelist1[] = { | 744 | const char *namelist1[] = { |
| 745 | ".init", | 745 | ".init", |
| 746 | ".opd", /* see comment [OPD] at exit_section_ref_ok() */ | ||
| 747 | ".toc1", /* used by ppc64 */ | ||
| 746 | ".stab", | 748 | ".stab", |
| 747 | ".rodata", | 749 | ".rodata", |
| 748 | ".text.lock", | 750 | ".text.lock", |
| 751 | "__bug_table", /* used by powerpc for BUG() */ | ||
| 749 | ".pci_fixup_header", | 752 | ".pci_fixup_header", |
| 750 | ".pci_fixup_final", | 753 | ".pci_fixup_final", |
| 751 | ".pdr", | 754 | ".pdr", |
| @@ -812,8 +815,10 @@ static int exit_section_ref_ok(const char *name) | |||
| 812 | ".exit.data", | 815 | ".exit.data", |
| 813 | ".init.text", | 816 | ".init.text", |
| 814 | ".opd", /* See comment [OPD] */ | 817 | ".opd", /* See comment [OPD] */ |
| 818 | ".toc1", /* used by ppc64 */ | ||
| 815 | ".altinstructions", | 819 | ".altinstructions", |
| 816 | ".pdr", | 820 | ".pdr", |
| 821 | "__bug_table", /* used by powerpc for BUG() */ | ||
| 817 | ".exitcall.exit", | 822 | ".exitcall.exit", |
| 818 | ".eh_frame", | 823 | ".eh_frame", |
| 819 | ".stab", | 824 | ".stab", |
