* [PATCH v2] kbuild: Fix names of .tmp_vmlinux {kall,}syms files
@ 2024-11-26 15:58 Sedat Dilek
2024-11-26 16:45 ` Masahiro Yamada
0 siblings, 1 reply; 3+ messages in thread
From: Sedat Dilek @ 2024-11-26 15:58 UTC (permalink / raw)
To: Masahiro Yamada, Nathan Chancellor, Nicolas Schier, linux-kbuild,
linux-kernel
Cc: Sedat Dilek
When playing with gendwarfksyms v6 from Sami Tolvanen I noticed:
$ LC_ALL=C ls -alth .tmp_vmlinux*
-rw-rw-r-- 1 dileks dileks 3.1M Nov 22 20:52 .tmp_vmlinux2.kallsyms.o
-rw-rw-r-- 1 dileks dileks 34M Nov 22 20:52 .tmp_vmlinux2.kallsyms.S
-rw-rw-r-- 1 dileks dileks 6.5M Nov 22 20:52 .tmp_vmlinux2.syms
-rwxrwxr-x 1 dileks dileks 101M Nov 22 20:52 .tmp_vmlinux2
-rw-rw-r-- 1 dileks dileks 3.1M Nov 22 20:52 .tmp_vmlinux1.kallsyms.o
-rw-rw-r-- 1 dileks dileks 34M Nov 22 20:52 .tmp_vmlinux1.kallsyms.S
-rw-rw-r-- 1 dileks dileks 6.5M Nov 22 20:52 .tmp_vmlinux1.syms
-rwxrwxr-x 1 dileks dileks 52M Nov 22 20:52 .tmp_vmlinux1.btf.o
-rwxrwxr-x 1 dileks dileks 514M Nov 22 20:52 .tmp_vmlinux1
-rw-rw-r-- 1 dileks dileks 2.1K Nov 22 20:51 .tmp_vmlinux0.kallsyms.o
-rw-rw-r-- 1 dileks dileks 6.3K Nov 22 20:51 .tmp_vmlinux0.kallsyms.S
-rw-rw-r-- 1 dileks dileks 0 Nov 22 20:51 .tmp_vmlinux.kallsyms0.syms
.tmp_vmlinux.kallsyms0.syms is NULL byte - it's a dummy file.
Further looking at the other .tmp_vmlinux syms files:
.tmp_vmlinux2.syms
.tmp_vmlinux1.syms
.tmp_vmlinux.kallsyms0.syms
Change the naming of file
.tmp_vmlinux.kallsyms0.syms -> .tmp_vmlinux0.syms
While at this, fix the comments in scripts/link-vmlinux.sh.
INFO: v2 is based on Linux v6.12
Link: https://github.com/samitolvanen/linux/commits/gendwarfksyms-v6
Link: https://lore.kernel.org/all/CA+icZUXvu0Kw8RH1ZGBKgYGG-8u9x8BbsEkjtm4vSVKkXPTg+Q@mail.gmail.com/
Link: https://lore.kernel.org/all/20241123132237.15700-1-sedat.dilek@gmail.com/ (v1)
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
v1 -> v2:
- Add commit description and follow naming consistency
as requested by Masahiroy san. -dileks
scripts/link-vmlinux.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index a9b3f34a78d2..239fe036606f 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -203,8 +203,8 @@ kallsymso=
strip_debug=
if is_enabled CONFIG_KALLSYMS; then
- true > .tmp_vmlinux.kallsyms0.syms
- kallsyms .tmp_vmlinux.kallsyms0.syms .tmp_vmlinux0.kallsyms
+ true > .tmp_vmlinux0.syms
+ kallsyms .tmp_vmlinux0.syms .tmp_vmlinux0.kallsyms
fi
if is_enabled CONFIG_KALLSYMS || is_enabled CONFIG_DEBUG_INFO_BTF; then
@@ -231,14 +231,14 @@ if is_enabled CONFIG_KALLSYMS; then
# Generate section listing all symbols and add it into vmlinux
# It's a four step process:
# 0) Generate a dummy __kallsyms with empty symbol list.
- # 1) Link .tmp_vmlinux.kallsyms1 so it has all symbols and sections,
+ # 1) Link .tmp_vmlinux1.kallsyms so it has all symbols and sections,
# with a dummy __kallsyms.
- # Running kallsyms on that gives us .tmp_kallsyms1.o with
+ # Running kallsyms on that gives us .tmp_vmlinux1.kallsyms.o with
# the right size
- # 2) Link .tmp_vmlinux.kallsyms2 so it now has a __kallsyms section of
+ # 2) Link .tmp_vmlinux2.kallsyms so it now has a __kallsyms section of
# the right size, but due to the added section, some
# addresses have shifted.
- # From here, we generate a correct .tmp_vmlinux.kallsyms2.o
+ # From here, we generate a correct .tmp_vmlinux2.kallsyms.o
# 3) That link may have expanded the kernel image enough that
# more linker branch stubs / trampolines had to be added, which
# introduces new names, which further expands kallsyms. Do another
--
2.45.2
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] kbuild: Fix names of .tmp_vmlinux {kall,}syms files
2024-11-26 15:58 [PATCH v2] kbuild: Fix names of .tmp_vmlinux {kall,}syms files Sedat Dilek
@ 2024-11-26 16:45 ` Masahiro Yamada
2024-11-26 16:49 ` Sedat Dilek
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2024-11-26 16:45 UTC (permalink / raw)
To: Sedat Dilek; +Cc: Nathan Chancellor, Nicolas Schier, linux-kbuild, linux-kernel
On Wed, Nov 27, 2024 at 12:58 AM Sedat Dilek <sedat.dilek@gmail.com> wrote:
>
> When playing with gendwarfksyms v6 from Sami Tolvanen I noticed:
The gendwarfksyms is unrelated.
>
> $ LC_ALL=C ls -alth .tmp_vmlinux*
>
> -rw-rw-r-- 1 dileks dileks 3.1M Nov 22 20:52 .tmp_vmlinux2.kallsyms.o
> -rw-rw-r-- 1 dileks dileks 34M Nov 22 20:52 .tmp_vmlinux2.kallsyms.S
> -rw-rw-r-- 1 dileks dileks 6.5M Nov 22 20:52 .tmp_vmlinux2.syms
> -rwxrwxr-x 1 dileks dileks 101M Nov 22 20:52 .tmp_vmlinux2
>
> -rw-rw-r-- 1 dileks dileks 3.1M Nov 22 20:52 .tmp_vmlinux1.kallsyms.o
> -rw-rw-r-- 1 dileks dileks 34M Nov 22 20:52 .tmp_vmlinux1.kallsyms.S
> -rw-rw-r-- 1 dileks dileks 6.5M Nov 22 20:52 .tmp_vmlinux1.syms
> -rwxrwxr-x 1 dileks dileks 52M Nov 22 20:52 .tmp_vmlinux1.btf.o
> -rwxrwxr-x 1 dileks dileks 514M Nov 22 20:52 .tmp_vmlinux1
>
> -rw-rw-r-- 1 dileks dileks 2.1K Nov 22 20:51 .tmp_vmlinux0.kallsyms.o
> -rw-rw-r-- 1 dileks dileks 6.3K Nov 22 20:51 .tmp_vmlinux0.kallsyms.S
> -rw-rw-r-- 1 dileks dileks 0 Nov 22 20:51 .tmp_vmlinux.kallsyms0.syms
>
> .tmp_vmlinux.kallsyms0.syms is NULL byte - it's a dummy file.
>
> Further looking at the other .tmp_vmlinux syms files:
>
> .tmp_vmlinux2.syms
> .tmp_vmlinux1.syms
> .tmp_vmlinux.kallsyms0.syms
>
> Change the naming of file
>
> .tmp_vmlinux.kallsyms0.syms -> .tmp_vmlinux0.syms
>
> While at this, fix the comments in scripts/link-vmlinux.sh.
>
> INFO: v2 is based on Linux v6.12
>
> Link: https://github.com/samitolvanen/linux/commits/gendwarfksyms-v6
> Link: https://lore.kernel.org/all/CA+icZUXvu0Kw8RH1ZGBKgYGG-8u9x8BbsEkjtm4vSVKkXPTg+Q@mail.gmail.com/
> Link: https://lore.kernel.org/all/20241123132237.15700-1-sedat.dilek@gmail.com/ (v1)
I removed unnecessary information.
I left only the following description.
------------>8------------------
kbuild: rename .tmp_vmlinux.kallsyms0.syms to .tmp_vmlinux0.syms
Change the naming for consistency.
While at this, fix the comments in scripts/link-vmlinux.sh.
------------>8------------------
Applied to linux-kbuild.
Thanks.
> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
> ---
> v1 -> v2:
> - Add commit description and follow naming consistency
> as requested by Masahiroy san. -dileks
>
> scripts/link-vmlinux.sh | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> index a9b3f34a78d2..239fe036606f 100755
> --- a/scripts/link-vmlinux.sh
> +++ b/scripts/link-vmlinux.sh
> @@ -203,8 +203,8 @@ kallsymso=
> strip_debug=
>
> if is_enabled CONFIG_KALLSYMS; then
> - true > .tmp_vmlinux.kallsyms0.syms
> - kallsyms .tmp_vmlinux.kallsyms0.syms .tmp_vmlinux0.kallsyms
> + true > .tmp_vmlinux0.syms
> + kallsyms .tmp_vmlinux0.syms .tmp_vmlinux0.kallsyms
> fi
>
> if is_enabled CONFIG_KALLSYMS || is_enabled CONFIG_DEBUG_INFO_BTF; then
> @@ -231,14 +231,14 @@ if is_enabled CONFIG_KALLSYMS; then
> # Generate section listing all symbols and add it into vmlinux
> # It's a four step process:
> # 0) Generate a dummy __kallsyms with empty symbol list.
> - # 1) Link .tmp_vmlinux.kallsyms1 so it has all symbols and sections,
> + # 1) Link .tmp_vmlinux1.kallsyms so it has all symbols and sections,
> # with a dummy __kallsyms.
> - # Running kallsyms on that gives us .tmp_kallsyms1.o with
> + # Running kallsyms on that gives us .tmp_vmlinux1.kallsyms.o with
> # the right size
> - # 2) Link .tmp_vmlinux.kallsyms2 so it now has a __kallsyms section of
> + # 2) Link .tmp_vmlinux2.kallsyms so it now has a __kallsyms section of
> # the right size, but due to the added section, some
> # addresses have shifted.
> - # From here, we generate a correct .tmp_vmlinux.kallsyms2.o
> + # From here, we generate a correct .tmp_vmlinux2.kallsyms.o
> # 3) That link may have expanded the kernel image enough that
> # more linker branch stubs / trampolines had to be added, which
> # introduces new names, which further expands kallsyms. Do another
> --
> 2.45.2
>
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] kbuild: Fix names of .tmp_vmlinux {kall,}syms files
2024-11-26 16:45 ` Masahiro Yamada
@ 2024-11-26 16:49 ` Sedat Dilek
0 siblings, 0 replies; 3+ messages in thread
From: Sedat Dilek @ 2024-11-26 16:49 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Nathan Chancellor, Nicolas Schier, linux-kbuild, linux-kernel
On Tue, Nov 26, 2024 at 5:46 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Wed, Nov 27, 2024 at 12:58 AM Sedat Dilek <sedat.dilek@gmail.com> wrote:
> >
> > When playing with gendwarfksyms v6 from Sami Tolvanen I noticed:
>
> The gendwarfksyms is unrelated.
>
> >
> > $ LC_ALL=C ls -alth .tmp_vmlinux*
> >
> > -rw-rw-r-- 1 dileks dileks 3.1M Nov 22 20:52 .tmp_vmlinux2.kallsyms.o
> > -rw-rw-r-- 1 dileks dileks 34M Nov 22 20:52 .tmp_vmlinux2.kallsyms.S
> > -rw-rw-r-- 1 dileks dileks 6.5M Nov 22 20:52 .tmp_vmlinux2.syms
> > -rwxrwxr-x 1 dileks dileks 101M Nov 22 20:52 .tmp_vmlinux2
> >
> > -rw-rw-r-- 1 dileks dileks 3.1M Nov 22 20:52 .tmp_vmlinux1.kallsyms.o
> > -rw-rw-r-- 1 dileks dileks 34M Nov 22 20:52 .tmp_vmlinux1.kallsyms.S
> > -rw-rw-r-- 1 dileks dileks 6.5M Nov 22 20:52 .tmp_vmlinux1.syms
> > -rwxrwxr-x 1 dileks dileks 52M Nov 22 20:52 .tmp_vmlinux1.btf.o
> > -rwxrwxr-x 1 dileks dileks 514M Nov 22 20:52 .tmp_vmlinux1
> >
> > -rw-rw-r-- 1 dileks dileks 2.1K Nov 22 20:51 .tmp_vmlinux0.kallsyms.o
> > -rw-rw-r-- 1 dileks dileks 6.3K Nov 22 20:51 .tmp_vmlinux0.kallsyms.S
> > -rw-rw-r-- 1 dileks dileks 0 Nov 22 20:51 .tmp_vmlinux.kallsyms0.syms
> >
> > .tmp_vmlinux.kallsyms0.syms is NULL byte - it's a dummy file.
> >
> > Further looking at the other .tmp_vmlinux syms files:
> >
> > .tmp_vmlinux2.syms
> > .tmp_vmlinux1.syms
> > .tmp_vmlinux.kallsyms0.syms
> >
> > Change the naming of file
> >
> > .tmp_vmlinux.kallsyms0.syms -> .tmp_vmlinux0.syms
> >
> > While at this, fix the comments in scripts/link-vmlinux.sh.
> >
> > INFO: v2 is based on Linux v6.12
> >
> > Link: https://github.com/samitolvanen/linux/commits/gendwarfksyms-v6
> > Link: https://lore.kernel.org/all/CA+icZUXvu0Kw8RH1ZGBKgYGG-8u9x8BbsEkjtm4vSVKkXPTg+Q@mail.gmail.com/
> > Link: https://lore.kernel.org/all/20241123132237.15700-1-sedat.dilek@gmail.com/ (v1)
>
>
>
>
> I removed unnecessary information.
>
> I left only the following description.
>
> ------------>8------------------
> kbuild: rename .tmp_vmlinux.kallsyms0.syms to .tmp_vmlinux0.syms
>
> Change the naming for consistency.
>
> While at this, fix the comments in scripts/link-vmlinux.sh.
> ------------>8------------------
>
>
> Applied to linux-kbuild.
> Thanks.
>
Cool, thanks!
-Sedat-
>
> > Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
> > ---
> > v1 -> v2:
> > - Add commit description and follow naming consistency
> > as requested by Masahiroy san. -dileks
> >
> > scripts/link-vmlinux.sh | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> > index a9b3f34a78d2..239fe036606f 100755
> > --- a/scripts/link-vmlinux.sh
> > +++ b/scripts/link-vmlinux.sh
> > @@ -203,8 +203,8 @@ kallsymso=
> > strip_debug=
> >
> > if is_enabled CONFIG_KALLSYMS; then
> > - true > .tmp_vmlinux.kallsyms0.syms
> > - kallsyms .tmp_vmlinux.kallsyms0.syms .tmp_vmlinux0.kallsyms
> > + true > .tmp_vmlinux0.syms
> > + kallsyms .tmp_vmlinux0.syms .tmp_vmlinux0.kallsyms
> > fi
> >
> > if is_enabled CONFIG_KALLSYMS || is_enabled CONFIG_DEBUG_INFO_BTF; then
> > @@ -231,14 +231,14 @@ if is_enabled CONFIG_KALLSYMS; then
> > # Generate section listing all symbols and add it into vmlinux
> > # It's a four step process:
> > # 0) Generate a dummy __kallsyms with empty symbol list.
> > - # 1) Link .tmp_vmlinux.kallsyms1 so it has all symbols and sections,
> > + # 1) Link .tmp_vmlinux1.kallsyms so it has all symbols and sections,
> > # with a dummy __kallsyms.
> > - # Running kallsyms on that gives us .tmp_kallsyms1.o with
> > + # Running kallsyms on that gives us .tmp_vmlinux1.kallsyms.o with
> > # the right size
> > - # 2) Link .tmp_vmlinux.kallsyms2 so it now has a __kallsyms section of
> > + # 2) Link .tmp_vmlinux2.kallsyms so it now has a __kallsyms section of
> > # the right size, but due to the added section, some
> > # addresses have shifted.
> > - # From here, we generate a correct .tmp_vmlinux.kallsyms2.o
> > + # From here, we generate a correct .tmp_vmlinux2.kallsyms.o
> > # 3) That link may have expanded the kernel image enough that
> > # more linker branch stubs / trampolines had to be added, which
> > # introduces new names, which further expands kallsyms. Do another
> > --
> > 2.45.2
> >
> >
>
>
> --
> Best Regards
> Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-26 16:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-26 15:58 [PATCH v2] kbuild: Fix names of .tmp_vmlinux {kall,}syms files Sedat Dilek
2024-11-26 16:45 ` Masahiro Yamada
2024-11-26 16:49 ` Sedat Dilek
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®