linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: John Ogness <john.ogness@linutronix.de>,
	Nicholas Piggin <npiggin@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc/build: vdso linker warning for orphan sections
Date: Wed, 19 Jul 2023 21:55:34 +1000	[thread overview]
Message-ID: <87ttu0i095.fsf@mail.lhotse> (raw)
In-Reply-To: <87o7k9l2oj.fsf@jogness.linutronix.de>

John Ogness <john.ogness@linutronix.de> writes:
> On 2023-07-18, Michael Ellerman <mpe@ellerman.id.au> wrote:
>>> ld: warning: discarding dynamic section .rela.opd
>>>
>>> and bisects to:
>>>
>>> 8ad57add77d3 ("powerpc/build: vdso linker warning for orphan sections")
>>
>> Can you test with a newer compiler/binutils?
>
> Testing the Debian release cross compilers/binutils:
>
> Debian 10 / gcc 8.3.0  / ld 2.31.1: generates the warning
>
> Debian 11 / gcc 10.2.1 / ld 2.35.2: generates the warning
>
> Debian 12 / gcc 12.2.0 / ld 2.40:   does _not_ generate the warning
>
> I suppose moving to the newer toolchain is the workaround. Although it
> is a bit unusual to require such a modern toolchain in order to build a
> kernel without warnings.

I didn't mean that you should move to a new toolchain to avoid the
warning, I was just curious why you're the only person to see it.

I regularly test with a gcc 5.5.0 / ld 2.29 toolchain and gcc 13.1.1 /
ld 2.39, and I haven't seen the warning. I tried a bunch of others and
can't reproduce it.

Can you confirm that this makes the warning go away?

cheers


diff --git a/arch/powerpc/kernel/vdso/vdso64.lds.S b/arch/powerpc/kernel/vdso/vdso64.lds.S
index bda6c8cdd459..286e1597c548 100644
--- a/arch/powerpc/kernel/vdso/vdso64.lds.S
+++ b/arch/powerpc/kernel/vdso/vdso64.lds.S
@@ -85,7 +85,7 @@ SECTIONS
 		*(.branch_lt)
 		*(.data .data.* .gnu.linkonce.d.* .sdata*)
 		*(.bss .sbss .dynbss .dynsbss)
-		*(.opd)
+		*(.opd .rela.opd)
 		*(.glink .iplt .plt .rela*)
 	}
 }

  reply	other threads:[~2023-07-19 11:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09  5:10 [PATCH] powerpc/build: vdso linker warning for orphan sections Nicholas Piggin
2023-07-03  5:26 ` Michael Ellerman
2023-07-17 19:43 ` John Ogness
2023-07-18 12:59   ` Michael Ellerman
2023-07-18 14:22     ` John Ogness
2023-07-19 11:55       ` Michael Ellerman [this message]
2023-07-19 17:10         ` John Ogness
  -- strict thread matches above, loose matches on Subject: below --
2021-06-11 11:10 Nicholas Piggin
2021-06-17  1:48 ` Nicholas Piggin
2020-03-03  1:27 Nicholas Piggin
2020-07-30 12:50 ` Michael Ellerman

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=87ttu0i095.fsf@mail.lhotse \
    --to=mpe@ellerman.id.au \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.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).