From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 5D7303858C51 for ; Mon, 18 Jul 2022 11:33:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5D7303858C51 Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 06C7066979; Mon, 18 Jul 2022 07:33:48 -0400 (EDT) Message-ID: <62de74c5cfc7e558f82025ccffe5547d58bff172.camel@xry111.site> Subject: Re: [PATCH 1/5 v1] LoongArch: bfd: Add new reloc types. From: Xi Ruoyao To: WANG Xuerui , liuzhensong , binutils@sourceware.org Cc: xuchenghua@loongson.cn, mengqinggang@loongson.cn, Fangrui Song Date: Mon, 18 Jul 2022 19:33:46 +0800 In-Reply-To: <8b637076-eb4c-47e0-2987-ac0973e38bca@xen0n.name> References: <20220718084316.390672-1-liuzhensong@loongson.cn> <8b637076-eb4c-47e0-2987-ac0973e38bca@xen0n.name> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.3 MIME-Version: 1.0 X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FROM_SUSPICIOUS_NTLD, LIKELY_SPAM_FROM, PDS_OTHER_BAD_TLD, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2022 11:34:02 -0000 On Mon, 2022-07-18 at 18:06 +0800, WANG Xuerui wrote: > (Adding Ruoyao and MaskRay to CC, who might be interested in this=20 > development as well, as it concerns the linker implementation.) I've already subscribed binutils@sourceware.org in order not to be passed by. > I think I've voiced my concerns over the naming of these ops multiple=20 > times already; the primary comment ([1]; in English) was posted back in= =20 > May but no one in your team responded. >=20 > Reproducing the content (and adjusting a little) here: >=20 >=20 > Overall in a good direction (and IMHO the direction everyone should have= =20 > taken in the first place), thanks! >=20 Yes, we've been paying additional costs using those "stack based relocation". I'd like to know why they were proposed in first place?=20 (Not accusing anyone, just my curiosity: AFAIK no other targets ever used such a stack for relocation.) /* snip */ > FYI, I did make a list of my suggested names for these reloc types=20 > ("BFD_RELOC_LARCH_" abbreviated to "B_R_L_"): >=20 > Original name=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= Suggested name > -------------=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= -------------- > B_R_L_B16=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 B_R_L_PCREL_SK16 *1 > B_R_L_B21=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 B_R_L_PCREL_SD5K16 > B_R_L_B26=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 B_R_L_PCREL_SD10K16 > B_R_L_ABS_LO12=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 B_R_= L_ABS_0_SK12 > B_R_L_ABS_HI20=C2=A0=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D_PC_HI20=C2=A0=C2=A0=C2=A0 B_R_L_TLS_GD_PCALA_12_SJ20 > B_R_L_TLS_GD64_HI20=C2=A0=C2=A0=C2=A0=C2=A0 B_R_L_TLS_GD_ABS_12_SJ20 It's overall better, but those "J, K" etc are cryptic IMHO. And for "B_R_L_B16" I think "B_R_L_PCREL_SK16" fails to express that the offset should be shifted right by 2, so I'd keep B_R_L_B16 (and similarly, B_R_L_B21 and B_R_L_B26) like the PCALA case. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University