Skip to content

Commit

Permalink
kbuild: ignore section mismatch warning for references from .paravirt…
Browse files Browse the repository at this point in the history
…probe to .init.text

Added on request from:  Rusty Russell <[email protected]>

Signed-off-by: Sam Ravnborg <[email protected]>
Cc:  Rusty Russell <[email protected]>
  • Loading branch information
sravnborg committed May 2, 2007
1 parent 66bd32e commit b4d5171
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,13 @@ static int strrcmp(const char *s, const char *sub)
* tosec = .init.data
* fromsec = .text*
* refsymname = logo_
*
* Pattern 8:
* Symbols contained in .paravirtprobe may safely reference .init.text.
* The pattern is:
* tosec = .init.text
* fromsec = .paravirtprobe
*
**/
static int secref_whitelist(const char *modname, const char *tosec,
const char *fromsec, const char *atsym,
Expand Down Expand Up @@ -712,6 +719,12 @@ static int secref_whitelist(const char *modname, const char *tosec,
(strncmp(fromsec, ".text", strlen(".text")) == 0) &&
(strncmp(refsymname, "logo_", strlen("logo_")) == 0))
return 1;

/* Check for pattern 8 */
if ((strcmp(tosec, ".init.text") == 0) &&
(strcmp(fromsec, ".paravirtprobe") == 0))
return 1;

return 0;
}

Expand Down

0 comments on commit b4d5171

Please sign in to comment.