mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
62070fa42c
commit
9209aed072
1 changed files with 7 additions and 2 deletions
|
@ -483,7 +483,7 @@ static int strrcmp(const char *s, const char *sub)
|
|||
* this pattern.
|
||||
* The pattern is identified by:
|
||||
* tosec = .init.data
|
||||
* fromsec = .data
|
||||
* fromsec = .data*
|
||||
* atsym =__param*
|
||||
*
|
||||
* Pattern 2:
|
||||
|
@ -512,7 +512,7 @@ static int secref_whitelist(const char *tosec, const char *fromsec,
|
|||
/* Check for pattern 1 */
|
||||
if (strcmp(tosec, ".init.data") != 0)
|
||||
f1 = 0;
|
||||
if (strcmp(fromsec, ".data") != 0)
|
||||
if (strncmp(fromsec, ".data", strlen(".data")) != 0)
|
||||
f1 = 0;
|
||||
if (strncmp(atsym, "__param", strlen("__param")) != 0)
|
||||
f1 = 0;
|
||||
|
@ -743,9 +743,12 @@ static int init_section_ref_ok(const char *name)
|
|||
/* Absolute section names */
|
||||
const char *namelist1[] = {
|
||||
".init",
|
||||
".opd", /* see comment [OPD] at exit_section_ref_ok() */
|
||||
".toc1", /* used by ppc64 */
|
||||
".stab",
|
||||
".rodata",
|
||||
".text.lock",
|
||||
"__bug_table", /* used by powerpc for BUG() */
|
||||
".pci_fixup_header",
|
||||
".pci_fixup_final",
|
||||
".pdr",
|
||||
|
@ -812,8 +815,10 @@ static int exit_section_ref_ok(const char *name)
|
|||
".exit.data",
|
||||
".init.text",
|
||||
".opd", /* See comment [OPD] */
|
||||
".toc1", /* used by ppc64 */
|
||||
".altinstructions",
|
||||
".pdr",
|
||||
"__bug_table", /* used by powerpc for BUG() */
|
||||
".exitcall.exit",
|
||||
".eh_frame",
|
||||
".stab",
|
||||
|
|
Loading…
Reference in a new issue