From: mengqinggang <mengqinggang@loongson.cn>
To: Xi Ruoyao <xry111@xry111.site>,
Jinyang He <hejinyang@loongson.cn>,
Chenghua Xu <xuchenghua@loongson.cn>,
Zhensong Liu <liuzhensong@loongson.cn>,
WANG Xuerui <i.swmail@xen0n.name>
Cc: binutils@sourceware.org, Xing Li <lixing@loongson.cn>,
yala <zhaojunchao@loongson.cn>, Peng Fan <fanpeng@loongson.cn>
Subject: Re: [PATCH 1/2] LoongArch: bfd: Remove elf_seg_map condition in loongarch_elf_relax_section
Date: Sat, 7 Oct 2023 09:23:04 +0800 [thread overview]
Message-ID: <e2f0f75e-67a3-2b30-697d-f397b5eb1462@loongson.cn> (raw)
In-Reply-To: <3316ceeff68fd7e8ca7a9fe1d1e5c58c94d1dad2.camel@xry111.site>
Hi,
I will send a patch in the next few days to solve this issue and other
issues
related to relaxation.
在 2023/10/5 下午7:19, Xi Ruoyao 写道:
> On Thu, 2023-10-05 at 18:09 +0800, Xi Ruoyao via Binutils wrote:
>> Hi Jinyang,
>>
>> Any progress on this? During my attempt trying to balance relaxation
>> and scheduling better in GCC I found the elf_seg_map condition is
>> preventing relaxation on *every* shared library (when we are linking a
>> shared library the elf_seg_map of .text is NULL).
>>
>> On a modern system most code paths are in shared libraries, so it's
>> really bad not to perform the relaxation on them. Esp. now we are
>> disabling explicit relocs for relaxation, so if we don't relax shared
>> libraries we are likely regressing the overall performance of the
>> system.
> Phew. It's not only a performance issue. It's actually a *correctness*
> issue because the condition also causes R_LARCH_ALIGN skipped, so some
> programs depending on code alignment (for e.g. duff-device-like code
> using pcaddi for eg) will be broken.
>
> Generally skipping the entire relaxation pass for any section containing
> R_LARCH_ALIGN is wrong (as we've discussed in
> https://github.com/llvm/llvm-project/pull/67424). Even if we don't
> really relax a thing we still *must* process R_LARCH_ALIGN.
>
>> Sorry for disturbing you during the national holiday, feel free to defer
>> the reply until the holiday ends!
next prev parent reply other threads:[~2023-10-07 1:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 8:49 Jinyang He
2023-07-11 8:49 ` [PATCH 2/2] LoongArch: bfd: Add counter to get real relax region Jinyang He
2023-07-12 6:35 ` [PATCH 1/2] LoongArch: bfd: Remove elf_seg_map condition in loongarch_elf_relax_section mengqinggang
2023-07-12 8:08 ` Jinyang He
2023-07-13 3:13 ` mengqinggang
2023-07-13 7:19 ` Jinyang He
2023-07-13 8:18 ` Jinyang He
2023-10-05 10:09 ` Xi Ruoyao
2023-10-05 11:19 ` Xi Ruoyao
2023-10-07 1:23 ` mengqinggang [this message]
2023-10-10 13:13 ` 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=e2f0f75e-67a3-2b30-697d-f397b5eb1462@loongson.cn \
--to=mengqinggang@loongson.cn \
--cc=binutils@sourceware.org \
--cc=fanpeng@loongson.cn \
--cc=hejinyang@loongson.cn \
--cc=i.swmail@xen0n.name \
--cc=liuzhensong@loongson.cn \
--cc=lixing@loongson.cn \
--cc=xry111@xry111.site \
--cc=xuchenghua@loongson.cn \
--cc=zhaojunchao@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).