Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2412024pxb; Sun, 30 Jan 2022 15:41:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdnJpo2UbxdHzpQKdriVJowkTmgz9vv+GWEjl1fmGn4s4X/Z2LxPHpKnLGeIReWcDReCpS X-Received: by 2002:a17:907:234f:: with SMTP id we15mr10010291ejb.235.1643586086345; Sun, 30 Jan 2022 15:41:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643586086; cv=none; d=google.com; s=arc-20160816; b=KWOkKdyz5mAPd8A9kpeshHSXV3n1VdgObuVbMpQ1M0hI4QARCQbWjs8O8NmMC0QiOy nUEjUaoVEV9mxfcnXPv/KOW4h5cJ0xeIEKZYLoe19aeW7i/KPd3fR7B+ZZ4vJr0xxxOo I2o3N6hdrB8TsnmyzJlq9snmu5pw7Rd+XsSHPGcc5zBmwLyWAbBvp6H98d+M9r6uLzrx 5ilK8QVwAxTyjfB15QOe5PG+2K7sh4waUV95dmmG7wiJQCkW/ZG0nCw1tZduYOlRyuef QbWLZWQpPdN0RPSVOVMYDtm3Q1SQD2rzjATQgQmKh6yTRtIaHEeOxbSXbW8BXg5lV7vg 2tgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/+SeEyjxwFir/H5f1F7mn87tKlWsYSPhRkGZK9gJ8WQ=; b=P3tG0EW2x7zxIjI90b4iRY7/6XX8o5I+kn/cDFzQmdJKq/loHGhUmjNrrcqJCw+79P cpNxWeirCvl1YUGIGztPlNbgfWGCXNX9sy/q9AtucQiLmtAhtrvtdN/APjQjdEHrkVyo Lw4U6KwQPKzPUo3v7BjDQ45sVkmLE24dS3m7he/D/5KNVb3bV8T6UCymiO5AMn7qsIqQ re88HqXLtO/ci2FmLwtPy1ylHIAep9191LdNYajjazqMIci1CRlYolky9lvSRmRBKHH6 lYlohSFP39FsLBtletVrpgi+3uOsmyMJtmseAlOVwWwlOo1JK5TNNFCZ1XlgH3CO+X4s NPwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=idITS+qs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ho31si6789433ejc.635.2022.01.30.15.41.01; Sun, 30 Jan 2022 15:41:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=idITS+qs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347947AbiA1K57 (ORCPT + 99 others); Fri, 28 Jan 2022 05:57:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242852AbiA1K56 (ORCPT ); Fri, 28 Jan 2022 05:57:58 -0500 Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E26B4C061714 for ; Fri, 28 Jan 2022 02:57:57 -0800 (PST) Received: by mail-qk1-x732.google.com with SMTP id o25so5169420qkj.7 for ; Fri, 28 Jan 2022 02:57:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/+SeEyjxwFir/H5f1F7mn87tKlWsYSPhRkGZK9gJ8WQ=; b=idITS+qsEgTSqNSARyHb+MK0YAl2Lqm/wpb3MvDnXngVHUq1mz+rnZ7QdNtndfwy/4 uNyfrv58+iBhnw6pxZPKkFayx4X6V8R1jT8XdorGiKT1UH9Pove0mzucSr6xprNbgHU9 6Nk01dHZv4vyA1HMxj+iqrJxlNtvthBQ5kOfiswGZaZWvu8hymtRi7HBsvbGS9/0yjKT YrPHHIT4By0Npi7M/d4LX7s9Kfk72OV6yfzY7alNXjR3UIjigIBMiCovwY500/flfX3c +Ei8dBGIBRda++OvbQsfCrpbi9LgGLFxDgfXAPrGa2RECeIZtIWqx5Uc7RX4xAnJyzK1 XcWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/+SeEyjxwFir/H5f1F7mn87tKlWsYSPhRkGZK9gJ8WQ=; b=dnr3qMQIPrGvNcFwBCpl27SdX0K4/uvfNAiQn0ithDM76LfvvdKAEGITCNRHdJeP+g pkQvrjlPRPm7xsmVDDIqFfY+A9uhQ4hOlZAz30Lv7tQGKb8hkxw/Ft4HKo/37ojAiJBv Eh61Ta0WWrwkOhzxLuzyYNrIQ/HCW14uMWswdhoCcqQVuhi2XtgHtbgqFeLOwoyf5L5L r/ILVT6NyIAuDTRRy6V1McdIIOXas9MbZlNncXnNgXVsk3j8CsB/JDgJCDBqF8zRA9ok ObAbE2o5+VVz7tWkZ1bRWzilJz4eXUxLaUczqTsP/n9TcntqFdavMem+MU7HMFSQNA/5 Mvag== X-Gm-Message-State: AOAM530q//+W7ngLjSMSEu8xgodnKkGi5m2cJ8FFzYAaEU69VkGEJ+wi rwah1xX0327GSgB8zXF+TUU= X-Received: by 2002:a05:620a:1132:: with SMTP id p18mr5276652qkk.543.1643367477079; Fri, 28 Jan 2022 02:57:57 -0800 (PST) Received: from WRT-WX9.. ([207.246.89.135]) by smtp.gmail.com with ESMTPSA id t11sm2932998qkm.77.2022.01.28.02.57.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jan 2022 02:57:56 -0800 (PST) From: Changbin Du To: Nathan Chancellor , Masahiro Yamada , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-riscv@lists.infradead.org, Changbin Du Subject: [PATCH] kallsyms: ignore local block labels generated by compiler Date: Fri, 28 Jan 2022 18:57:46 +0800 Message-Id: <20220128105746.2459-1-changbin.du@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The llvm compiler can generate lots of local block labels and they might overlap with C defined symbols. So let's ignore such local labels. Before this change, dumpstack shows a local symbol for epc: [ 0.040341][ T0] Hardware name: riscv-virtio,qemu (DT) [ 0.040376][ T0] epc : .LBB6_14+0x22/0x6a [ 0.040452][ T0] ra : restore_all+0x12/0x6e After this change, the C defined symbol is shown which is expected: [ 0.035795][ T0] Hardware name: riscv-virtio,qemu (DT) [ 0.036332][ T0] epc : trace_hardirqs_on+0x54/0x13c [ 0.036567][ T0] ra : restore_all+0x12/0x6e Signed-off-by: Changbin Du --- scripts/kallsyms.c | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 54ad86d13784..5f4be9d72a32 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -108,6 +108,7 @@ static bool is_ignored_symbol(const char *name, char type) /* Symbol names that begin with the following are ignored.*/ static const char * const ignored_prefixes[] = { "$", /* local symbols for ARM, MIPS, etc. */ + ".LBB", /* local block labels generated by compiler */ ".LASANPC", /* s390 kasan local symbols */ "__crc_", /* modversions */ "__efistub_", /* arm64 EFI stub namespace */ -- 2.32.0