public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: Nick Clifton <nickc@redhat.com>, "H.J. Lu" <hjl.tools@gmail.com>,
	binutils@sourceware.org
Subject: PR28827 - [2.38 Regression] ld hits assertion building LLVM 9 on powerpc64le-linux-gnu
Date: Fri, 4 Feb 2022 21:36:13 +1030	[thread overview]
Message-ID: <Yf0IpSteyH3KQHOx@squeak.grove.modra.org> (raw)

Hi Nick, HJ,
I've spent most of today debugging a build of libclang-cpp.so.9 using
the binutils 2.38 release branch.  The problem occurs after only a few
iterations of stub sizing, so all the patches I already committed for
potential bugs when we hit 20 iteration don't so anything as far as
actually linking the real object files.

The problem is caused by the new relro code introducing a gap at the
end of the relro segment.  On powerpc64 that means between the .got
and .plt section.  That gap changes when .eh_frame shrinks after
consolidating CIEs and garbage collecting unused FDEs, which happens
after the stub sizing passes are run from ldemul_after_allocation.
Unfortunately, if the .got/.plt gap increases, plt call stubs may need
to be larger to access addresses in the PLT from the toc pointer reg
and thus not fit in space allocated for them.

Please revert the relro patches on the branch.  I'm now certain that
PR28827 is directly caused by them.

-- 
Alan Modra
Australia Development Lab, IBM

             reply	other threads:[~2022-02-04 11:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 11:06 Alan Modra [this message]
2022-02-04 14:36 ` H.J. Lu

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=Yf0IpSteyH3KQHOx@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.com \
    --cc=nickc@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 read-only IMAP folder(s) and NNTP newsgroup(s).