Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] MIPS: fix modversioning of _mcount symbol
@ 2017-04-11 12:51 James Cowgill
  2017-04-11 12:51 ` James Cowgill
  2017-04-12 13:19 ` Ralf Baechle
  0 siblings, 2 replies; 3+ messages in thread
From: James Cowgill @ 2017-04-11 12:51 UTC (permalink / raw)
  To: Ralf Baechle, linux-mips; +Cc: James.Cowgill

In commit 827456e71036 ("MIPS: Export _mcount alongside its definition")
the EXPORT_SYMBOL macro exporting _mcount was moved from C code into
assembly. Unlike C, exported assembly symbols need to have a function
prototype in asm/asm-prototypes.h for modversions to work properly.
Without this, modpost prints out this warning:

     WARNING: EXPORT symbol "_mcount" [vmlinux] version generation failed,
     symbol will not be versioned.

Fix by including asm/ftrace.h (where _mcount is declared) in
asm/asm-prototypes.h.

Fixes: 827456e71036 ("MIPS: Export _mcount alongside its definition")
Signed-off-by: James Cowgill <James.Cowgill@imgtec.com>
---
 arch/mips/include/asm/asm-prototypes.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/include/asm/asm-prototypes.h b/arch/mips/include/asm/asm-prototypes.h
index a160cf69bb92..6e28971fe73a 100644
--- a/arch/mips/include/asm/asm-prototypes.h
+++ b/arch/mips/include/asm/asm-prototypes.h
@@ -3,3 +3,4 @@
 #include <asm/fpu.h>
 #include <asm-generic/asm-prototypes.h>
 #include <asm/uaccess.h>
+#include <asm/ftrace.h>
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] MIPS: fix modversioning of _mcount symbol
  2017-04-11 12:51 [PATCH] MIPS: fix modversioning of _mcount symbol James Cowgill
@ 2017-04-11 12:51 ` James Cowgill
  2017-04-12 13:19 ` Ralf Baechle
  1 sibling, 0 replies; 3+ messages in thread
From: James Cowgill @ 2017-04-11 12:51 UTC (permalink / raw)
  To: Ralf Baechle, linux-mips; +Cc: James.Cowgill

In commit 827456e71036 ("MIPS: Export _mcount alongside its definition")
the EXPORT_SYMBOL macro exporting _mcount was moved from C code into
assembly. Unlike C, exported assembly symbols need to have a function
prototype in asm/asm-prototypes.h for modversions to work properly.
Without this, modpost prints out this warning:

     WARNING: EXPORT symbol "_mcount" [vmlinux] version generation failed,
     symbol will not be versioned.

Fix by including asm/ftrace.h (where _mcount is declared) in
asm/asm-prototypes.h.

Fixes: 827456e71036 ("MIPS: Export _mcount alongside its definition")
Signed-off-by: James Cowgill <James.Cowgill@imgtec.com>
---
 arch/mips/include/asm/asm-prototypes.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/include/asm/asm-prototypes.h b/arch/mips/include/asm/asm-prototypes.h
index a160cf69bb92..6e28971fe73a 100644
--- a/arch/mips/include/asm/asm-prototypes.h
+++ b/arch/mips/include/asm/asm-prototypes.h
@@ -3,3 +3,4 @@
 #include <asm/fpu.h>
 #include <asm-generic/asm-prototypes.h>
 #include <asm/uaccess.h>
+#include <asm/ftrace.h>
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: fix modversioning of _mcount symbol
  2017-04-11 12:51 [PATCH] MIPS: fix modversioning of _mcount symbol James Cowgill
  2017-04-11 12:51 ` James Cowgill
@ 2017-04-12 13:19 ` Ralf Baechle
  1 sibling, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2017-04-12 13:19 UTC (permalink / raw)
  To: James Cowgill; +Cc: linux-mips

Thanks, applied.

  Ralf

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-12 13:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-11 12:51 [PATCH] MIPS: fix modversioning of _mcount symbol James Cowgill
2017-04-11 12:51 ` James Cowgill
2017-04-12 13:19 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox