From patchwork Fri Jun 17 10:07:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102165 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp197189qgy; Fri, 17 Jun 2016 03:06:19 -0700 (PDT) X-Received: by 10.66.178.49 with SMTP id cv17mr1532990pac.157.1466157979728; Fri, 17 Jun 2016 03:06:19 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c185si11749312pfa.116.2016.06.17.03.06.19; Fri, 17 Jun 2016 03:06:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933580AbcFQKGF (ORCPT + 30 others); Fri, 17 Jun 2016 06:06:05 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:65060 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933559AbcFQKGD (ORCPT ); Fri, 17 Jun 2016 06:06:03 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0MRfyq-1apbig0bO4-00SiAH; Fri, 17 Jun 2016 12:05:58 +0200 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Arnd Bergmann , Kees Cook , linux-kernel@vger.kernel.org Subject: [PATCH] lkdtm: avoid link error on ARM Date: Fri, 17 Jun 2016 12:07:28 +0200 Message-Id: <20160617100745.1956133-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:QJBmctC/C3MDPLjMHnZP97PNKjzxaB29YUsrJ5Ys09k1xJyHNgb 8RAU0pL1sXfb+30PWBU4MQ/jAnOzZ8KXBLNKRZyROpwG+arL3ca+SniEC24BO+0jPEhOLYJ 7Kdg4VhTGElD+ym361nOto2KIVg3tX2oa7AKi159UVPZtlWAvM1iVBgWco2C+/yQVj7+USV 1msTRW/Aey1WC+YJR2QZA== X-UI-Out-Filterresults: notjunk:1; V01:K0:pHfjDR1xBfI=:GpbNN8IodWbF4rbTC/CcfT CyAdnAQ5J8BdVVcaBPv168OrJSmdwatbdEJywk3Im2P6Qy78Sa690jmaNsbktQ+JBRhQfzxNv b9rwI4ensPhzgS0rtWT+jIoiC7MhgJ6Oxmh1RS0CGsNieN30epZrabaVTXQykjxE1XMe7o2Vq a89akgFopKUp0Kr98av5dCsR1Z6Nfziet26jrANjR2OGGcxgmSChg79SDsDvS5k/h1k4KHQAb XhikjIwykiKxZKGlVhxEXAcBihd8hZKdEPDAlTwpSBRx7mKxp4H1Nl+vqYYA08hpkghzXRtB1 P6ZdgI10fZnx9ePPubGWBFo7gmUtFC+y6LqYBGpL8iu0hC/B7Jj3GkWoAM9aodY0jKijJpV2R n79E+hIHgNrMLSZEZjin3WxPR3jpC59kPUYo2H0CzI9Ux/GkoIrUEnqvC4nqoDC0XXnkUV4bq 80CMXgkWr24VERMp5LlQAfP4Rp6utmn+QonHXj8DMwRwNL7MkKt9Su7tRDwchXh1VEIGpk5YY UJmH/BPdxs/tkbjt8IR3f3GA3ouTyITLl+I3VXvcvMnD1loNMleSdR8kGuo3FPEiC6qLxk7rN qtmFtXcM8XP7rwYnrL347LKI6lsuFRv1NIXutEcdpB0242V9si7flLl0h8fnMduYy9t+PI5eS XMlzn5o83hIwdbZpLRqiPa6Kc3RiSGgBrHAqZuTkvLyDllzFwC3+IW9PNW9sAw02SX1Q= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The lkdtm_rodata file is built so that a function in it gets linked into the .rodata ELF section. This works fine normally, but on 32-bit ARM with really large kernels, it prevents the linker from inserting a veneer for the call to __gnu_mcount_nc in case we are building with "gcc -pg": drivers/misc/built-in.o: In function `lkdtm_rodata_do_nothing': panel.c:(.rodata+0x1480): relocation truncated to fit: R_ARM_CALL against symbol `__gnu_mcount_nc' defined in .text section in arch/arm/kernel/built-in.o We probably never want the profiling code to be enabled for this file anyway, so this just removes the option here, and for the sake of consistency also in the lkdtm core module. Signed-off-by: Arnd Bergmann Fixes: 9a49a528dcf3 ("lkdtm: add function for testing .rodata section") --- drivers/misc/Makefile | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 7d45ed4a1549..4a25eeaa30f9 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -60,6 +60,8 @@ obj-$(CONFIG_PANEL) += panel.o lkdtm-$(CONFIG_LKDTM) += lkdtm_core.o lkdtm-$(CONFIG_LKDTM) += lkdtm_rodata_objcopy.o +CFLAGS_REMOVE_lkdtm_core.o += -pg +CFLAGS_REMOVE_lkdtm_rodata.o += -pg OBJCOPYFLAGS := OBJCOPYFLAGS_lkdtm_rodata_objcopy.o := \