public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Subject: PR29542, PowerPC gold internal error in get_output_view,
Date: Mon, 26 Sep 2022 14:54:49 +0930	[thread overview]
Message-ID: <YzE3oXUU0FSkNRU8@squeak.grove.modra.org> (raw)

We were attempting to set a BSS style section contents.

	PR 29542
	* powerpc.cc (Output_data_plt_powerpc::do_write): Don't set .plt,
	.iplt or .lplt section contents when position independent.

diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 22c0462326d..b950869d0b6 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -4338,7 +4338,8 @@ template<int size, bool big_endian>
 void
 Output_data_plt_powerpc<size, big_endian>::do_write(Output_file* of)
 {
-  if (!this->sym_ents_.empty())
+  if (!this->sym_ents_.empty()
+      && !parameters->options().output_is_position_independent())
     {
       const section_size_type offset = this->offset();
       const section_size_type oview_size

-- 
Alan Modra
Australia Development Lab, IBM

                 reply	other threads:[~2022-09-26  5:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=YzE3oXUU0FSkNRU8@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    /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).