Messages in this thread Patch in this message | | | From | Marcin Nowakowski <> | Subject | [PATCH 1/2] kbuild: keep __mcount_loc table through dead code elimination | Date | Thu, 22 Dec 2016 09:51:46 +0100 |
| |
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
| |