public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "徐持恒 Xu Chiheng" <chiheng.xu@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "binutils@sourceware.org" <binutils@sourceware.org>,
	"H.J. Lu" <hjl.tools@gmail.com>
Subject: Re: [PATCH] binutils: partially revert 17c6c3b99156fe82c1e637e1a5fd9f163ac788c8
Date: Mon, 21 Nov 2022 18:59:08 +0800	[thread overview]
Message-ID: <CAPOVtOsCks1NaUp1MgAEtxNMOWvyiSs=zH0Fw1wC+RKWv-UdOA@mail.gmail.com> (raw)
In-Reply-To: <c07fb064-6ffd-5ace-fa7a-bf15c7f46368@suse.com>

On Mon, Nov 21, 2022 at 5:52 PM Jan Beulich <jbeulich@suse.com> wrote:
> >
> > It is clear now that x86-64 linker treats the REL relocation entries
> > as RELA relocation entries, when doing relocation, it does not count
> > the addend in section content, because src_mask is set to 0.
> >
> > Then can objcopy transform the REL relocation entries to RELA
> > relocation entries, so the x86-64 linker can consume them correctly ?
>
> It probably could, but I have no idea how to invasive this would end
> up being.
>

A much simpler solution is to let the linker accept the slightly
non-ABI-conformant ELF64(with both REL and RELA relocation entries).
The use of src_mask is dependent on whether relocation entry is REL or RELA.

      reply	other threads:[~2022-11-21 10:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17 17:44 徐持恒 Xu Chiheng
2022-11-17 18:06 ` H.J. Lu
     [not found]   ` <SY4P282MB40478D0B56A396B9DF249BBE8A069@SY4P282MB4047.AUSP282.PROD.OUTLOOK.COM>
2022-11-17 18:50     ` H.J. Lu
     [not found]       ` <SY4P282MB40470E7AC17968C86A8731488A069@SY4P282MB4047.AUSP282.PROD.OUTLOOK.COM>
2022-11-17 19:11         ` H.J. Lu
     [not found]           ` <SY4P282MB40478BD7C68830B7DC5705358A069@SY4P282MB4047.AUSP282.PROD.OUTLOOK.COM>
2022-11-17 19:51             ` H.J. Lu
     [not found]               ` <SY4P282MB404738CCE8DD452A63DA4B0B8A069@SY4P282MB4047.AUSP282.PROD.OUTLOOK.COM>
2022-11-18  9:37                 ` 徐持恒 Xu Chiheng
2022-11-18 10:01                   ` Jan Beulich
2022-11-18 10:24                     ` 徐持恒 Xu Chiheng
2022-11-18 10:34                       ` Jan Beulich
2022-11-18 10:45                         ` 徐持恒 Xu Chiheng
2022-11-18 13:31                           ` Jan Beulich
     [not found]                             ` <CAPOVtOuQ3Xto+uoRVqfyWDuvqO=8XrL64+ujZHY+OsN81Q4E=A@mail.gmail.com>
2022-11-18 14:03                               ` Jan Beulich
     [not found]                               ` <da40ede4-5f91-a35e-dcae-ab222f0d0cdf@suse.com>
     [not found]                                 ` <CAPOVtOsHOzBxx=1bCMgRP-DfWzJu_eS-5UaEj-q_F8p86R-q9g@mail.gmail.com>
2022-11-18 14:09                                   ` Jan Beulich
2022-11-18 14:14                                     ` 徐持恒 Xu Chiheng
2022-11-18 14:35                             ` 徐持恒 Xu Chiheng
2022-11-21  7:53                               ` Jan Beulich
2022-11-21  8:30                                 ` 徐持恒 Xu Chiheng
2022-11-21  8:50                                   ` 徐持恒 Xu Chiheng
2022-11-21  9:02                                   ` Jan Beulich
2022-11-21  9:06                                     ` Jan Beulich
2022-11-21  9:21                                     ` 徐持恒 Xu Chiheng
2022-11-21  9:52                                       ` Jan Beulich
2022-11-21 10:59                                         ` 徐持恒 Xu Chiheng [this message]

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='CAPOVtOsCks1NaUp1MgAEtxNMOWvyiSs=zH0Fw1wC+RKWv-UdOA@mail.gmail.com' \
    --to=chiheng.xu@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.com \
    --cc=jbeulich@suse.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).