mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-09-22 22:11:38 +08:00
kbuild: do not warn when unwind sections references .init/.exit sections
Andrew Morton reported a number of false positives for ia64 - like these: WARNING: drivers/acpi/button.o - Section mismatch: reference to .init.text: from .IA_64.unwind.init.text after '' (at offset 0x0) WARNING: drivers/acpi/button.o - Section mismatch: reference to .exit.text: from .IA_64.unwind.exit.text after '' (at offset 0x0) WARNING: drivers/acpi/processor.o - Section mismatch: reference to .init.text: from .IA_64.unwind after '' (at offset 0x1e8) They are all false positives - or at least the .c code looks OK. It is not known why sometimes a section name is appended and sometimes not. Fix is to accept references from all sections that includes "unwind." in the name. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
fededcd2af
commit
6e10133fa4
@ -671,6 +671,11 @@ static int init_section_ref_ok(const char *name)
|
|||||||
".debug",
|
".debug",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
/* part of section name */
|
||||||
|
const char *namelist3 [] = {
|
||||||
|
".unwind", /* sample: IA_64.unwind.init.text */
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
for (s = namelist1; *s; s++)
|
for (s = namelist1; *s; s++)
|
||||||
if (strcmp(*s, name) == 0)
|
if (strcmp(*s, name) == 0)
|
||||||
@ -678,6 +683,9 @@ static int init_section_ref_ok(const char *name)
|
|||||||
for (s = namelist2; *s; s++)
|
for (s = namelist2; *s; s++)
|
||||||
if (strncmp(*s, name, strlen(*s)) == 0)
|
if (strncmp(*s, name, strlen(*s)) == 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
for (s = namelist3; *s; s++)
|
||||||
|
if (strstr(*s, name) != NULL)
|
||||||
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -727,6 +735,11 @@ static int exit_section_ref_ok(const char *name)
|
|||||||
".debug",
|
".debug",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
/* part of section name */
|
||||||
|
const char *namelist3 [] = {
|
||||||
|
".unwind", /* Sample: IA_64.unwind.exit.text */
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
for (s = namelist1; *s; s++)
|
for (s = namelist1; *s; s++)
|
||||||
if (strcmp(*s, name) == 0)
|
if (strcmp(*s, name) == 0)
|
||||||
@ -734,6 +747,9 @@ static int exit_section_ref_ok(const char *name)
|
|||||||
for (s = namelist2; *s; s++)
|
for (s = namelist2; *s; s++)
|
||||||
if (strncmp(*s, name, strlen(*s)) == 0)
|
if (strncmp(*s, name, strlen(*s)) == 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
for (s = namelist3; *s; s++)
|
||||||
|
if (strstr(*s, name) != NULL)
|
||||||
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user