From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Nathan Chancellor <nathan@kernel.org>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Nick Desaulniers <ndesaulniers@google.com>,
Tom Rix <trix@redhat.com>,
linuxppc-dev@lists.ozlabs.org, llvm@lists.linux.dev,
patches@lists.linux.dev
Subject: Re: [PATCH 1/2] powerpc/vdso: Remove unused ENTRY in linker scripts
Date: Tue, 10 May 2022 16:22:08 +1000 [thread overview]
Message-ID: <ea0096e5-e1cb-a25d-e5b1-1774c0614397@ozlabs.ru> (raw)
In-Reply-To: <20220509204635.2539549-2-nathan@kernel.org>
On 5/10/22 06:46, Nathan Chancellor wrote:
> When linking vdso{32,64}.so.dbg with ld.lld, there is a warning about
> not finding _start for the starting address:
>
> ld.lld: warning: cannot find entry symbol _start; not setting start address
> ld.lld: warning: cannot find entry symbol _start; not setting start address
>
> Looking at GCC + GNU ld, the entry point address is 0x0:
>
> $ llvm-readelf -h vdso{32,64}.so.dbg &| rg "(File|Entry point address):"
> File: vdso32.so.dbg
> Entry point address: 0x0
> File: vdso64.so.dbg
> Entry point address: 0x0
>
> This matches what ld.lld emits:
>
> $ powerpc64le-linux-gnu-readelf -p .comment vdso{32,64}.so.dbg
>
> File: vdso32.so.dbg
>
> String dump of section '.comment':
> [ 0] Linker: LLD 14.0.0
> [ 14] clang version 14.0.0 (Fedora 14.0.0-1.fc37)
>
> File: vdso64.so.dbg
>
> String dump of section '.comment':
> [ 0] Linker: LLD 14.0.0
> [ 14] clang version 14.0.0 (Fedora 14.0.0-1.fc37)
>
> $ llvm-readelf -h vdso{32,64}.so.dbg &| rg "(File|Entry point address):"
> File: vdso32.so.dbg
> Entry point address: 0x0
> File: vdso64.so.dbg
> Entry point address: 0x0
>
> Remove ENTRY to remove the warning, as it is unnecessary for the vDSO to
> function correctly.
Sounds more like a bugfix to me - _start is simply not defined, I wonder
why ld is not complaining.
Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> arch/powerpc/kernel/vdso/vdso32.lds.S | 1 -
> arch/powerpc/kernel/vdso/vdso64.lds.S | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/arch/powerpc/kernel/vdso/vdso32.lds.S b/arch/powerpc/kernel/vdso/vdso32.lds.S
> index 58e0099f70f4..e0d19d74455f 100644
> --- a/arch/powerpc/kernel/vdso/vdso32.lds.S
> +++ b/arch/powerpc/kernel/vdso/vdso32.lds.S
> @@ -13,7 +13,6 @@ OUTPUT_FORMAT("elf32-powerpcle", "elf32-powerpcle", "elf32-powerpcle")
> OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
> #endif
> OUTPUT_ARCH(powerpc:common)
> -ENTRY(_start)
>
> SECTIONS
> {
> diff --git a/arch/powerpc/kernel/vdso/vdso64.lds.S b/arch/powerpc/kernel/vdso/vdso64.lds.S
> index 0288cad428b0..1a4a7bc4c815 100644
> --- a/arch/powerpc/kernel/vdso/vdso64.lds.S
> +++ b/arch/powerpc/kernel/vdso/vdso64.lds.S
> @@ -13,7 +13,6 @@ OUTPUT_FORMAT("elf64-powerpcle", "elf64-powerpcle", "elf64-powerpcle")
> OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", "elf64-powerpc")
> #endif
> OUTPUT_ARCH(powerpc:common64)
> -ENTRY(_start)
>
> SECTIONS
> {
next prev parent reply other threads:[~2022-05-10 6:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 20:46 [PATCH 0/2] Link the PowerPC vDSO with ld.lld Nathan Chancellor
2022-05-09 20:46 ` [PATCH 1/2] powerpc/vdso: Remove unused ENTRY in linker scripts Nathan Chancellor
2022-05-09 21:05 ` Nick Desaulniers
2022-05-10 6:22 ` Alexey Kardashevskiy [this message]
2022-05-10 6:41 ` Fangrui Song
2022-05-09 20:46 ` [PATCH 2/2] powerpc/vdso: Link with ld.lld when requested Nathan Chancellor
2022-05-09 21:24 ` Nick Desaulniers
2022-05-09 21:47 ` Nathan Chancellor
2022-05-09 21:58 ` Nick Desaulniers
2022-05-09 22:30 ` Nathan Chancellor
2022-05-10 6:22 ` Alexey Kardashevskiy
2022-05-10 16:25 ` Nathan Chancellor
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=ea0096e5-e1cb-a25d-e5b1-1774c0614397@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=benh@kernel.crashing.org \
--cc=christophe.leroy@csgroup.eu \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=llvm@lists.linux.dev \
--cc=mpe@ellerman.id.au \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=patches@lists.linux.dev \
--cc=paulus@samba.org \
--cc=trix@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).