lkml.org 
[lkml]   [2016]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] kbuild: keep __mcount_loc table through dead code elimination
Date
When CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is enabled we must ensure
__mcount_loc is preserved, as otherwise there are no valid entries for
ftrace to work with.

Fixes: 4b89b7f7aad5 ('kbuild: keep data tables through dead code elimination')

Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Acked-by: Nicholas Piggin <npiggin@gmail.com>
---
include/asm-generic/vmlinux.lds.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 0968d13..f492aa4 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -89,7 +89,7 @@
#ifdef CONFIG_FTRACE_MCOUNT_RECORD
#define MCOUNT_REC() . = ALIGN(8); \
VMLINUX_SYMBOL(__start_mcount_loc) = .; \
- *(__mcount_loc) \
+ KEEP(*(__mcount_loc)) \
VMLINUX_SYMBOL(__stop_mcount_loc) = .;
#else
#define MCOUNT_REC()
--
2.7.4
\
 
 \ /
  Last update: 2016-12-22 10:42    [W:0.043 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site