From patchwork Fri Feb 26 19:50:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 63108 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp55273lbc; Fri, 26 Feb 2016 11:51:09 -0800 (PST) X-Received: by 10.67.24.104 with SMTP id ih8mr4560468pad.124.1456516269563; Fri, 26 Feb 2016 11:51:09 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a84si21761233pfj.109.2016.02.26.11.51.09; Fri, 26 Feb 2016 11:51:09 -0800 (PST) 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; dkim=pass header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755136AbcBZTvH (ORCPT + 30 others); Fri, 26 Feb 2016 14:51:07 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:33593 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753139AbcBZTvF (ORCPT ); Fri, 26 Feb 2016 14:51:05 -0500 Received: by mail-wm0-f44.google.com with SMTP id g62so85658065wme.0 for ; Fri, 26 Feb 2016 11:51:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=AWMZawEcGE+BgF5dQ8g8/2S+rQ1Bv5Xs0cVDyolswWA=; b=d1aFrdP5WgwidpBXpb2PVDCra2nTka6oO1dossiwgGWph4fCMz3EBbcY3pYYBWSsWB +qOslJjQ52f5QzQAmcAaW1m7UmoXVu61LY33lR/Pf4fT8sjB16CV0AoF4zep6N7SBD9J pyqhr5L6xNqo8fB27M00v1sbEJmjGgy+O6/bU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AWMZawEcGE+BgF5dQ8g8/2S+rQ1Bv5Xs0cVDyolswWA=; b=ROkx+cCiMK+L1U5fjLyEhhessOahkJzznoZVxgVHV4aKW0WyZUcWfUaRpNOFfys3WR QWmTlNrliGX23rwNIOByQ8rY4/khde9eIrMfZmRhGi98EvkLKudoLm12PpK7CGFgVVb7 IZSTtmrtrNqJfdnuNtOjw8pfjfl7j4+ZEigGmX4J9XaNJ81KRhp6D4paAcOpL++r83Tt nc6EJc9Ic7wkht5J+IDwQJfBtgM5KRGX3qHMpdhFnY+Jsbb1J1KH08JhcbWmKFsO4BNT sVXXD0NGBdj2l0NycZ1RjUvNtAIKFakZbkvBOkZPRpjAT8Hwac3VGVl3TEUd/YhMi6S5 I+Fw== X-Gm-Message-State: AD7BkJIJ6ZV/6GeIHw3e86NX4UaV2HePI9s1Qjv/rK+3FP0aLO55lv7ns31M79g80eL07CWX X-Received: by 10.194.63.75 with SMTP id e11mr3306500wjs.79.1456516263210; Fri, 26 Feb 2016 11:51:03 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id qs1sm13759514wjc.2.2016.02.26.11.51.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Feb 2016 11:51:02 -0800 (PST) From: Ard Biesheuvel To: arnd@arndb.de, mmarek@suse.cz, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Ard Biesheuvel Subject: [PATCH] kallsyms: ignore ARM mode switching veneers Date: Fri, 26 Feb 2016 20:50:54 +0100 Message-Id: <1456516254-15615-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On ARM, the linker may emit veneers to deal with relative branch instructions that appear too far away from their targets. Since the second kallsyms pass results in an increase of the kernel size, it may result in additional veneers to be emitted, potentially affecting the output of kallsyms itself if these symbols are visible to it, and for that reason, symbols whose names end in '_veneer' are ignored explicitly. However, when building Thumb2 kernels, such veneers are named differently if they also incur a mode switch, and since they are not filtered by kallsyms, they may cause the build to fail. So filter symbols whose names end in '_from_arm' or '_from_thumb' as well. Cc: Arnd Bergmann Signed-off-by: Ard Biesheuvel --- scripts/kallsyms.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.5.0 Tested-by: Arnd Bergmann diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 8fa81e84e295..e2379de76563 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -215,6 +215,8 @@ static int symbol_valid(struct sym_entry *s) static char *special_suffixes[] = { "_veneer", /* arm */ + "_from_arm", /* arm */ + "_from_thumb", /* arm */ NULL }; int i;