public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Pierre Labastie <pierre.labastie@neuf.fr>
Cc: Xi Ruoyao <xry111@xry111.site>, Binutils <binutils@sourceware.org>
Subject: Re: question: i386 ld.gold reports "internal error" linking files with SHT_RELA section
Date: Tue, 30 Aug 2022 13:36:34 -0700	[thread overview]
Message-ID: <CAMe9rOpev=9c65HWFwZLQvKcjRq9SUQ4MSKMPQirAwcDELBMHg@mail.gmail.com> (raw)
In-Reply-To: <d171096013e06af9e0e275167aad57259c1b38f9.camel@neuf.fr>

On Tue, Aug 30, 2022 at 11:53 AM Pierre Labastie
<pierre.labastie@neuf.fr> wrote:
>
> On Tue, 2022-08-30 at 11:21 -0700, H.J. Lu wrote:
> > On Tue, Aug 30, 2022 at 7:39 AM Xi Ruoyao via Binutils
> > <binutils@sourceware.org> wrote:
> > >
> > > Building SeaMonkey on i686 results:
> > >
> > >     "/usr/bin/ld.gold: internal error in relocate_section, at
> > > ../../gold/i386.cc:3683"
> > >
> > > i386.cc:3683 is:
> > >
> > >     gold_assert(sh_type == elfcpp::SHT_REL);
> > >
> > > AFAIK i386 normally use SHT_REL and x86_64 normally use SHT_RELA.  But
> > > we've found that nasm-2.15.05 generates SHT_RELA for i386 as well.
> > >
> > > So should SHT_RELA be allowed for i386 at all?  If "yes" we should fix
> > > it for gold, if "no" we should fix it for nasm.
> > > --
> > > Xi Ruoyao <xry111@xry111.site>
> > > School of Aerospace Science and Technology, Xidian University
> >
> >  SHT_RELA shouldn't be used for i386.
> >
>
> But it is accepted by ld.bfd...

Do you have .o files for ld.bfd I can take a look at?

> FWIIW, only the dwarf debug sections are generated as SHT_RELA by nasm.
>
> Pierre Labastie



-- 
H.J.

  reply	other threads:[~2022-08-30 20:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 14:38 Xi Ruoyao
2022-08-30 18:21 ` H.J. Lu
2022-08-30 18:53   ` Pierre Labastie
2022-08-30 20:36     ` H.J. Lu [this message]
2022-08-31  4:43       ` Xi Ruoyao
2022-08-31 19:20         ` H.J. Lu
2022-09-01  0:47           ` Xi Ruoyao
2022-09-01 16:34             ` 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='CAMe9rOpev=9c65HWFwZLQvKcjRq9SUQ4MSKMPQirAwcDELBMHg@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=pierre.labastie@neuf.fr \
    --cc=xry111@xry111.site \
    /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).