From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id 00AF63858D33 for ; Sun, 21 Jan 2024 03:23:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 00AF63858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 00AF63858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=114.242.206.163 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705807413; cv=none; b=RIDLjhkKFYAKvtCeQpy2ZJUCMCtDdD3N6cS8j9zM7KDbeXGltlFRvhyLdmRKF6KGD2EhnLa9aTbP2IDnaESbckaEfr2DlSmCI/rSxeuazgyeXEAiplF5fMySU6WWX9qPXeUsdyAC9/MPgGAmu7aWLbsCsRzP/oRiUx79SyE/ycE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705807413; c=relaxed/simple; bh=v+2hbMsIWpjUand9b6aI2mPwkOtP1VMA8rahG4euERA=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=QxIFhOtqz8pYgGfdffBlu8lAQxde+nnp7pkILFqkVil1Fe2VwiGW8RL6r1e9A0MdwFsVkxUIUNE55b1zL19H0C+5P0qA5Hl6do1ApNfvElu15Gdyam4ABgC140gGaiAt1Li8vwHIGYUHEpyLec2ZnV2WJkJ5fUCl9gMSK3e3cww= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from loongson.cn (unknown [10.2.6.5]) by gateway (Coremail) with SMTP id _____8CxbesvjqxljsMCAA--.12353S3; Sun, 21 Jan 2024 11:23:28 +0800 (CST) Received: from 5.5.5 (unknown [10.2.6.5]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxLs8vjqxl9yIOAA--.2790S2; Sun, 21 Jan 2024 11:23:27 +0800 (CST) From: mengqinggang To: binutils@sourceware.org Cc: xuchenghua@loongson.cn, chenglulu@loongson.cn, liuzhensong@loongson.cn, cailulu@loongson.cn, xry111@xry111.site, i.swmail@xen0n.name, maskray@google.com, luweining@loongson.cn, wanglei@loongson.cn, hejinyang@loongson.cn, mengqinggang Subject: [PATCH] LoongArch: gas: Start a new frag after instructions that can be relaxed Date: Sun, 21 Jan 2024 11:23:26 +0800 Message-Id: <20240121032326.1952820-1-mengqinggang@loongson.cn> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:AQAAf8BxLs8vjqxl9yIOAA--.2790S2 X-CM-SenderInfo: 5phqw15lqjwttqj6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBj93XoW7JF1xAw17Aw4kuw1DtFyxJFc_yoW8Jry3pF 13Zw4a9rWkuFy2ga4qqF15CFWDXryxCrWIvF9FvrW8Zr1kJr90qFWkJryDWFZIqayvgw4a vry0gw1rXFs8AacCm3ZEXasCq-sJn29KB7ZKAUJUUUU5529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUkjb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r106r15M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_ Gr0_Gr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I 8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv67AK xVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64 vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8G jcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2I x0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK 8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I 0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07j1YL9UUUUU= X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: For R_LARCH_TLS_{LE_HI20_R,LE_ADD_R,IE_PC_HI20,LD_PC_HI20,GD_PC_HI20, TLS_DESC_PC_HI20} relocations, start a new frag to get correct eh_frame info. --- gas/config/tc-loongarch.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gas/config/tc-loongarch.c b/gas/config/tc-loongarch.c index 863ac9cea43..47ec8441a3b 100644 --- a/gas/config/tc-loongarch.c +++ b/gas/config/tc-loongarch.c @@ -1089,7 +1089,13 @@ append_fixp_and_insn (struct loongarch_cl_insn *ip) if (symbol_get_frag (to) == symbol_get_frag (from))) */ if (LARCH_opts.relax && (BFD_RELOC_LARCH_PCALA_HI20 == reloc_info[0].type - || BFD_RELOC_LARCH_GOT_PC_HI20 == reloc_info[0].type)) + || BFD_RELOC_LARCH_GOT_PC_HI20 == reloc_info[0].type + || BFD_RELOC_LARCH_TLS_LE_HI20_R == reloc_info[0].type + || BFD_RELOC_LARCH_TLS_LE_ADD_R == reloc_info[0].type + || BFD_RELOC_LARCH_TLS_IE_PC_HI20 == reloc_info[0].type + || BFD_RELOC_LARCH_TLS_LD_PC_HI20 == reloc_info[0].type + || BFD_RELOC_LARCH_TLS_GD_PC_HI20 == reloc_info[0].type + || BFD_RELOC_LARCH_TLS_DESC_PC_HI20 == reloc_info[0].type)) { frag_wane (frag_now); frag_new (0); -- 2.36.0