public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <i@maskray.me>
To: mengqinggang <mengqinggang@loongson.cn>
Cc: binutils@sourceware.org, xuchenghua@loongson.cn,
	liuzhensong@loongson.cn, chenglulu@loongson.cn,
	xry111@xry111.site, i.swmail@xen0n.name, maskray@google.com,
	hp@bitrange.com
Subject: Re: [PATCH v3 0/6] LoongArch linker relaxation support.
Date: Sat, 24 Dec 2022 10:10:02 -0800	[thread overview]
Message-ID: <20221224181002.rzlsz3sxpyy2tzyy@gmail.com> (raw)
In-Reply-To: <20221216072336.1087469-1-mengqinggang@loongson.cn>

On 2022-12-16, mengqinggang wrote:
>This is the v3 version of patches to support loongarch linker relax.
>The new relocs document at here:
>  https://github.com/loongson/LoongArch-Documentation/pull/77
>
>The patch set changelog:
>
>v2 -> v3:
>1. Fix ChangeLog entries, delete extra TABs.
>
>mengqinggang (6):
>  LoongArch: include: Add support for linker relaxation.
>  LoongArch: bfd: Add support for linker relaxation.
>  LoongArch: opcodes: Add support for linker relaxation.
>  LoongArch: binutils: Add support for linker relaxation.
>  LoongArch: gas: Add support for linker relaxation.
>  LoongArch: ld: Add support for linker relaxation.
>

Regarding relaxation, there is no hurry. It's a linked unit size
optimization (minor in many cases) with significant relocataion file
overhead and other costs (see
https://maskray.me/blog/2021-03-14-the-dark-side-of-riscv-linker-relaxation):
debug informtion, .gcc_except_table, unimplemented split DWARF, almost
all metadata sections anchoring text sections, ld --emit-relocs, etc.
RISC-V linker relaxation while used prevailingly due to GCC/Clang
default -mrelax, has many issues not sorted out. And some issues are in
inferior states due to backward compatibility.

My best advice is to postpone adding linker relaxation until every other
part is mature.

      parent reply	other threads:[~2022-12-24 18:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16  7:23 mengqinggang
2022-12-16  7:23 ` [PATCH v3 1/6] LoongArch: include: Add support for linker relaxation mengqinggang
2022-12-16  7:23 ` [PATCH v3 2/6] LoongArch: bfd: " mengqinggang
2022-12-16  7:23 ` [PATCH v3 3/6] LoongArch: opcodes: " mengqinggang
2022-12-16  7:23 ` [PATCH v3 4/6] LoongArch: binutils: " mengqinggang
2022-12-16  7:23 ` [PATCH v3 5/6] LoongArch: gas: " mengqinggang
2022-12-16  7:23 ` [PATCH v3 6/6] LoongArch: ld: " mengqinggang
2022-12-24 18:10 ` Fangrui Song [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=20221224181002.rzlsz3sxpyy2tzyy@gmail.com \
    --to=i@maskray.me \
    --cc=binutils@sourceware.org \
    --cc=chenglulu@loongson.cn \
    --cc=hp@bitrange.com \
    --cc=i.swmail@xen0n.name \
    --cc=liuzhensong@loongson.cn \
    --cc=maskray@google.com \
    --cc=mengqinggang@loongson.cn \
    --cc=xry111@xry111.site \
    --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).