mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Schier <nicolas@fjasle.eu>
To: Will Deacon <will@kernel.org>
Cc: linux-kernel@vger.kernel.org, kernel-team@android.com,
	Masahiro Yamada <masahiroy@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	John Stultz <jstultz@google.com>,
	linux-kbuild@vger.kernel.org
Subject: Re: [PATCH v3 2/4] scripts/mksysmap: Factor out sed ignored symbols expression into script
Date: Sat, 29 Jul 2023 20:38:12 +0200	[thread overview]
Message-ID: <ZMVclGCbEK33g+2g@bergen.fjasle.eu> (raw)
In-Reply-To: <20230728113415.21067-3-will@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 5620 bytes --]

On Fri 28 Jul 2023 12:34:13 GMT, Will Deacon wrote:
> To prepare for 'faddr2line' reusing the same ignored symbols list as
> 'mksysmap', factor out the relevant sed expression into its own script,
> removing the double-escapes for '$' symbols as they are no longer
> required.
> 
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Nathan Chancellor <nathan@kernel.org>
> Cc: Nick Desaulniers <ndesaulniers@google.com>
> Cc: Nicolas Schier <nicolas@fjasle.eu>
> Cc: Josh Poimboeuf <jpoimboe@kernel.org>
> Cc: John Stultz <jstultz@google.com>
> Cc: linux-kbuild@vger.kernel.org
> Signed-off-by: Will Deacon <will@kernel.org>
> ---

Thanks!

Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>

>  scripts/mksysmap                | 77 +--------------------------------
>  scripts/sysmap-ignored-syms.sed | 74 +++++++++++++++++++++++++++++++
>  2 files changed, 75 insertions(+), 76 deletions(-)
>  create mode 100644 scripts/sysmap-ignored-syms.sed
> 
> diff --git a/scripts/mksysmap b/scripts/mksysmap
> index 9ba1c9da0a40..a98b34363258 100755
> --- a/scripts/mksysmap
> +++ b/scripts/mksysmap
> @@ -16,7 +16,7 @@
>  # 'W' or 'w'.
>  #
>  
> -${NM} -n ${1} | sed >${2} -e "
> +${NM} -n ${1} | sed >${2} -f $(dirname $0)/sysmap-ignored-syms.sed -e "
>  # ---------------------------------------------------------------------------
>  # Ignored symbol types
>  #
> @@ -27,81 +27,6 @@ ${NM} -n ${1} | sed >${2} -e "
>  # w: local weak symbols
>  / [aNUw] /d
>  
> -# ---------------------------------------------------------------------------
> -# Ignored prefixes
> -#  (do not forget a space before each pattern)
> -
> -# local symbols for ARM, MIPS, etc.
> -/ \\$/d
> -
> -# local labels, .LBB, .Ltmpxxx, .L__unnamed_xx, .LASANPC, etc.
> -/ \.L/d
> -
> -# arm64 EFI stub namespace
> -/ __efistub_/d
> -
> -# arm64 local symbols in PIE namespace
> -/ __pi_\\$/d
> -/ __pi_\.L/d
> -
> -# arm64 local symbols in non-VHE KVM namespace
> -/ __kvm_nvhe_\\$/d
> -/ __kvm_nvhe_\.L/d
> -
> -# arm64 lld
> -/ __AArch64ADRPThunk_/d
> -
> -# arm lld
> -/ __ARMV5PILongThunk_/d
> -/ __ARMV7PILongThunk_/d
> -/ __ThumbV7PILongThunk_/d
> -
> -# mips lld
> -/ __LA25Thunk_/d
> -/ __microLA25Thunk_/d
> -
> -# CFI type identifiers
> -/ __kcfi_typeid_/d
> -/ __kvm_nvhe___kcfi_typeid_/d
> -/ __pi___kcfi_typeid_/d
> -
> -# CRC from modversions
> -/ __crc_/d
> -
> -# EXPORT_SYMBOL (symbol name)
> -/ __kstrtab_/d
> -
> -# EXPORT_SYMBOL (namespace)
> -/ __kstrtabns_/d
> -
> -# ---------------------------------------------------------------------------
> -# Ignored suffixes
> -#  (do not forget '$' after each pattern)
> -
> -# arm
> -/_from_arm$/d
> -/_from_thumb$/d
> -/_veneer$/d
> -
> -# ---------------------------------------------------------------------------
> -# Ignored symbols (exact match)
> -#  (do not forget a space before and '$' after each pattern)
> -
> -# for LoongArch?
> -/ L0$/d
> -
> -# ppc
> -/ _SDA_BASE_$/d
> -/ _SDA2_BASE_$/d
> -
> -# ---------------------------------------------------------------------------
> -# Ignored patterns
> -#  (symbols that contain the pattern are ignored)
> -
> -# ppc stub
> -/\.long_branch\./d
> -/\.plt_branch\./d
> -
>  # ---------------------------------------------------------------------------
>  # Ignored kallsyms symbols
>  #
> diff --git a/scripts/sysmap-ignored-syms.sed b/scripts/sysmap-ignored-syms.sed
> new file mode 100644
> index 000000000000..14b9eb2c9ed9
> --- /dev/null
> +++ b/scripts/sysmap-ignored-syms.sed
> @@ -0,0 +1,74 @@
> +# ---------------------------------------------------------------------------
> +# Ignored prefixes
> +#  (do not forget a space before each pattern)
> +
> +# local symbols for ARM, MIPS, etc.
> +/ \$/d
> +
> +# local labels, .LBB, .Ltmpxxx, .L__unnamed_xx, .LASANPC, etc.
> +/ \.L/d
> +
> +# arm64 EFI stub namespace
> +/ __efistub_/d
> +
> +# arm64 local symbols in PIE namespace
> +/ __pi_\$/d
> +/ __pi_\.L/d
> +
> +# arm64 local symbols in non-VHE KVM namespace
> +/ __kvm_nvhe_\$/d
> +/ __kvm_nvhe_\.L/d
> +
> +# arm64 lld
> +/ __AArch64ADRPThunk_/d
> +
> +# arm lld
> +/ __ARMV5PILongThunk_/d
> +/ __ARMV7PILongThunk_/d
> +/ __ThumbV7PILongThunk_/d
> +
> +# mips lld
> +/ __LA25Thunk_/d
> +/ __microLA25Thunk_/d
> +
> +# CFI type identifiers
> +/ __kcfi_typeid_/d
> +/ __kvm_nvhe___kcfi_typeid_/d
> +/ __pi___kcfi_typeid_/d
> +
> +# CRC from modversions
> +/ __crc_/d
> +
> +# EXPORT_SYMBOL (symbol name)
> +/ __kstrtab_/d
> +
> +# EXPORT_SYMBOL (namespace)
> +/ __kstrtabns_/d
> +
> +# ---------------------------------------------------------------------------
> +# Ignored suffixes
> +#  (do not forget '$' after each pattern)
> +
> +# arm
> +/_from_arm$/d
> +/_from_thumb$/d
> +/_veneer$/d
> +
> +# ---------------------------------------------------------------------------
> +# Ignored symbols (exact match)
> +#  (do not forget a space before and '$' after each pattern)
> +
> +# for LoongArch?
> +/ L0$/d
> +
> +# ppc
> +/ _SDA_BASE_$/d
> +/ _SDA2_BASE_$/d
> +
> +# ---------------------------------------------------------------------------
> +# Ignored patterns
> +#  (symbols that contain the pattern are ignored)
> +
> +# ppc stub
> +/\.long_branch\./d
> +/\.plt_branch\./d
> -- 
> 2.41.0.487.g6d72f3e995-goog

-- 
Nicolas Schier
 
epost|xmpp: nicolas@fjasle.eu          irc://oftc.net/nsc
↳ gpg: 18ed 52db e34f 860e e9fb  c82b 7d97 0932 55a0 ce7f
     -- frykten for herren er opphav til kunnskap --

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-07-29 18:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-28 11:34 [PATCH v3 0/4] Fix 'faddr2line' for LLVM arm64 builds Will Deacon
2023-07-28 11:34 ` [PATCH v3 1/4] scripts/faddr2line: Use LLVM addr2line and readelf if LLVM=1 Will Deacon
2023-07-29 20:47   ` Masahiro Yamada
2023-08-01 16:50     ` Nick Desaulniers
2023-07-28 11:34 ` [PATCH v3 2/4] scripts/mksysmap: Factor out sed ignored symbols expression into script Will Deacon
2023-07-29 18:38   ` Nicolas Schier [this message]
2023-07-28 11:34 ` [PATCH v3 3/4] scripts/faddr2line: Constrain readelf output to symbols from System.map Will Deacon
2023-08-01 16:42   ` Nick Desaulniers
2023-08-01 17:17     ` Sami Tolvanen
2023-08-02 19:54   ` Masahiro Yamada
2023-08-04 14:30     ` Will Deacon
2023-08-07 20:06       ` Masahiro Yamada
2023-07-28 11:34 ` [PATCH v3 4/4] scripts/faddr2line: Don't filter out non-function symbols from readelf Will Deacon

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=ZMVclGCbEK33g+2g@bergen.fjasle.eu \
    --to=nicolas@fjasle.eu \
    --cc=jpoimboe@kernel.org \
    --cc=jstultz@google.com \
    --cc=kernel-team@android.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=will@kernel.org \
    /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®