From: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
To: Arnd Bergmann <arnd@arndb.de>, <linux-kernel@vger.kernel.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Subject: [PATCH 1/2] kbuild: keep __mcount_loc table through dead code elimination
Date: Thu, 22 Dec 2016 09:51:46 +0100 [thread overview]
Message-ID: <1482396707-14349-2-git-send-email-marcin.nowakowski@imgtec.com> (raw)
In-Reply-To: <1482396707-14349-1-git-send-email-marcin.nowakowski@imgtec.com>
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
next prev parent reply other threads:[~2016-12-22 9:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-22 8:51 [PATCH RESEND 0/2] kbuild: dead code elimination: ftrace fixes Marcin Nowakowski
2016-12-22 8:51 ` Marcin Nowakowski [this message]
2016-12-22 8:51 ` [PATCH 2/2] recordmcount: fix mcount recording with -ffunction-sections Marcin Nowakowski
2016-12-22 9:08 ` [PATCH RESEND 0/2] kbuild: dead code elimination: ftrace fixes Nicholas Piggin
2016-12-22 9:15 ` Marcin Nowakowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1482396707-14349-2-git-send-email-marcin.nowakowski@imgtec.com \
--to=marcin.nowakowski@imgtec.com \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®