Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750981AbcLVJlD (ORCPT ); Thu, 22 Dec 2016 04:41:03 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:36601 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754624AbcLVJlC (ORCPT ); Thu, 22 Dec 2016 04:41:02 -0500 From: Marcin Nowakowski To: Arnd Bergmann , CC: Nicholas Piggin Subject: [PATCH RESEND 0/2] kbuild: dead code elimination: ftrace fixes Date: Thu, 22 Dec 2016 09:51:45 +0100 Message-ID: <1482396707-14349-1-git-send-email-marcin.nowakowski@imgtec.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.2.5] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 812 Lines: 21 Enabling dead code & data elimination currently breaks ftrace operation, as the __mcount_loc section is removed (as it is not referenced directly anywhere in the code). Moreover, there are a lot of entries missing in the __mcount_loc section as the recordmcount tool doesn't currently properly handle the section names as created by the use of -ffunction-sections. The following 2 patches fix that behaviour. They are based on next-20161208. Marcin Nowakowski (2): kbuild: keep __mcount_loc table through dead code elimination recordmcount: fix mcount recording with -ffunction-sections include/asm-generic/vmlinux.lds.h | 2 +- scripts/Makefile | 5 +++++ scripts/recordmcount.c | 26 +++++++++++++++++++++++++- 3 files changed, 31 insertions(+), 2 deletions(-) -- 2.7.4