From: "H.J. Lu" <hjl.tools@gmail.com>
To: pierre.lauber@aiub.unibe.ch, Jan Beulich <JBeulich@suse.com>,
Binutils <binutils@sourceware.org>
Subject: Bug in dynamic linker ld 2.37.20211103-150100.7.29
Date: Fri, 10 Jun 2022 12:38:29 -0700 [thread overview]
Message-ID: <CAMe9rOrLUODZOrvUuimbi_EHS=nLUwFTAkQrQODp+2AxO+yEug@mail.gmail.com> (raw)
commit 17c6c3b99156fe82c1e637e1a5fd9f163ac788c8
Author: Jan Beulich <jbeulich@suse.com>
Date: Fri May 7 12:05:12 2021 +0200
x86-64/ELF: clear src_mask for all reloc types
x86-64 uses rela relocations. The comment next to the field's declaration
says "Non-zero values for ELF USE_RELA targets should be viewed with
suspicion ..." And indeed the fields being non-zero causes section
contents to be accumulated into the final relocated values in addition to
the relocations' addends, which is contrary to the ELF spec.
But for_main.o from
https://lists.gnu.org/archive/html/bug-binutils/2022-06/msg00064.html
has
28: e8 fc ff ff ff call 29 <main+0x29> 29: R_X86_64_PLT32
for_rtl_init_
2d: e8 fc ff ff ff call 2e <main+0x2e> 2e: R_X86_64_PLT32 MAIN__
32: e8 fc ff ff ff call 33 <main+0x33> 33: R_X86_64_PLT32
for_rtl_finish_
This is clearly wrong since addend is 0. This is a bug in the
compiler which was
used to generate it. If you have to use the buggy compiler, you need to use
binutils 2.36 or older.
--
H.J.
reply other threads:[~2022-06-10 19:39 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='CAMe9rOrLUODZOrvUuimbi_EHS=nLUwFTAkQrQODp+2AxO+yEug@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=JBeulich@suse.com \
--cc=binutils@sourceware.org \
--cc=pierre.lauber@aiub.unibe.ch \
/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).