summaryrefslogtreecommitdiffstats
path: root/arch/riscv/Makefile
diff options
context:
space:
mode:
authorAlan Kao <alankao@andestech.com>2018-02-13 06:13:16 +0100
committerPalmer Dabbelt <palmer@sifive.com>2018-04-03 04:59:10 +0200
commita1d2a6b4cee858a2f27eebce731fbf1dfd72cb4e (patch)
tree02678da661691d5576560c22f7aa62621d3773c2 /arch/riscv/Makefile
parentLinux 4.16 (diff)
downloadlinux-a1d2a6b4cee858a2f27eebce731fbf1dfd72cb4e.tar.xz
linux-a1d2a6b4cee858a2f27eebce731fbf1dfd72cb4e.zip
riscv/ftrace: Add RECORD_MCOUNT support
Now recordmcount.pl recognizes RISC-V object files. For the mechanism to work, we have to disable the linker relaxation. Cc: Greentime Hu <greentime@andestech.com> Signed-off-by: Alan Kao <alankao@andestech.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'arch/riscv/Makefile')
-rw-r--r--arch/riscv/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 6719dd30ec5b..899226e0da7d 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -11,6 +11,9 @@
LDFLAGS :=
OBJCOPYFLAGS := -O binary
LDFLAGS_vmlinux :=
+ifeq ($(CONFIG_DYNAMIC_FTRACE),y)
+ LDFLAGS_vmlinux := --no-relax
+endif
KBUILD_AFLAGS_MODULE += -fPIC
KBUILD_CFLAGS_MODULE += -fPIC