From: Andrew Jones <ajones@ventanamicro.com>
To: Jisheng Zhang <jszhang@kernel.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Conor Dooley <conor.dooley@microchip.com>,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] riscv: vdso: fix section overlapping under some conditions
Date: Tue, 1 Nov 2022 10:19:42 +0100 [thread overview]
Message-ID: <20221101091942.k7pgcbbkudgjk4ae@kamzik> (raw)
In-Reply-To: <20221031175842.1699-1-jszhang@kernel.org>
On Tue, Nov 01, 2022 at 01:58:42AM +0800, Jisheng Zhang wrote:
> lkp reported a build error, I tried the config and can reproduce
> build error as below:
>
> VDSOLD arch/riscv/kernel/vdso/vdso.so.dbg
> ld.lld: error: section .note file range overlaps with .text
> >>> .note range is [0x7C8, 0x803]
> >>> .text range is [0x800, 0x1993]
>
> ld.lld: error: section .text file range overlaps with .dynamic
> >>> .text range is [0x800, 0x1993]
> >>> .dynamic range is [0x808, 0x937]
>
> ld.lld: error: section .note virtual address range overlaps with .text
> >>> .note range is [0x7C8, 0x803]
> >>> .text range is [0x800, 0x1993]
>
> Fix it by removing the hardcoding 0x800 and related comments.
>
> Link: https://lore.kernel.org/lkml/202210122123.Cc4FPShJ-lkp@intel.com/#r
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
> arch/riscv/kernel/vdso/vdso.lds.S | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/arch/riscv/kernel/vdso/vdso.lds.S b/arch/riscv/kernel/vdso/vdso.lds.S
> index 01d94aae5bf5..344209d2e128 100644
> --- a/arch/riscv/kernel/vdso/vdso.lds.S
> +++ b/arch/riscv/kernel/vdso/vdso.lds.S
> @@ -31,13 +31,7 @@ SECTIONS
>
> .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
>
> - /*
> - * This linker script is used both with -r and with -shared.
> - * For the layouts to match, we need to skip more than enough
> - * space for the dynamic symbol table, etc. If this amount is
> - * insufficient, ld -shared will error; simply increase it here.
> - */
> - . = 0x800;
Hi Jisheng,
Removing this hard coded value is a good thing, but I don't understand
why, if it was necessary before, that it's no longer necessary. Can you
please explain that in the commit message? If the linker improved in
this regard, then do we need to document a new minimum linker version?
> + . = ALIGN(16);
Aligning text to a 4-byte boundary makes sense to me, but I don't
understand the 16-byte boundary requirement. Can you please explain
this for my education?
Thanks,
drew
> .text : { *(.text .text.*) } :text
>
> .data : {
> --
> 2.37.2
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2022-11-01 9:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-31 17:58 [PATCH] riscv: vdso: fix section overlapping under some conditions Jisheng Zhang
2022-11-01 9:19 ` Andrew Jones [this message]
2022-11-02 17:28 ` Jisheng Zhang
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=20221101091942.k7pgcbbkudgjk4ae@kamzik \
--to=ajones@ventanamicro.com \
--cc=aou@eecs.berkeley.edu \
--cc=conor.dooley@microchip.com \
--cc=jszhang@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lkp@intel.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.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