From: Xi Ruoyao <xry111@xry111.site>
To: binutils@sourceware.org
Cc: liuzhensong <liuzhensong@loongson.cn>,
Lulu Cheng <chenglulu@loongson.cn>, Wang Xuerui <i@xen0n.name>,
Chenghua Xu <xuchenghua@loongson.cn>,
Xi Ruoyao <xry111@xry111.site>
Subject: [PATCH 0/2] LoongArch: Fix two bugs breaking IFUNC in static PIE
Date: Tue, 13 Sep 2022 23:44:12 +0800 [thread overview]
Message-ID: <20220913154414.554861-1-xry111@xry111.site> (raw)
To generate a static PIE, the compiler should pass "-static -pie
--no-dynamic-linker -z text" options to the linker [1]. But, LoongArch
BFD linker currently produces wrong result (missing R_LARCH_IRELATIVE
relocs) with IFUNC and those options, causing test failures in Glibc if
static PIE is enabled. Fix them now.
For the detailed analysis of the bugs see the commit messages.
[1]: https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601541.html
Xi Ruoyao (2):
LoongArch: Avoid heap-buffer-overflow in
loongarch_elf_relocate_section
LoongArch: Fix R_LARCH_IRELATIVE insertion after elf_link_sort_relocs
bfd/elfnn-loongarch.c | 59 +++++++++++++++++++++++--------------------
1 file changed, 32 insertions(+), 27 deletions(-)
--
2.37.0
next reply other threads:[~2022-09-13 15:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-13 15:44 Xi Ruoyao [this message]
2022-09-13 15:44 ` [PATCH 1/2] LoongArch: Avoid heap-buffer-overflow in loongarch_elf_relocate_section Xi Ruoyao
2022-09-14 8:57 ` liuzhensong
2022-09-14 10:15 ` Xi Ruoyao
2022-09-14 11:15 ` Xi Ruoyao
2022-09-15 1:47 ` liuzhensong
2022-09-15 2:56 ` Xi Ruoyao
2022-09-15 3:54 ` liuzhensong
2022-09-15 6:13 ` Xi Ruoyao
2022-09-13 15:44 ` [PATCH 2/2] LoongArch: Fix R_LARCH_IRELATIVE insertion after elf_link_sort_relocs Xi Ruoyao
2022-09-15 13:03 ` liuzhensong
2022-09-16 20:11 ` Xi Ruoyao
2022-09-18 9:58 ` Xi Ruoyao
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=20220913154414.554861-1-xry111@xry111.site \
--to=xry111@xry111.site \
--cc=binutils@sourceware.org \
--cc=chenglulu@loongson.cn \
--cc=i@xen0n.name \
--cc=liuzhensong@loongson.cn \
--cc=xuchenghua@loongson.cn \
/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).