From patchwork Thu Jul 21 06:41:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenglulu X-Patchwork-Id: 93 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e252:0:0:0:0:0 with SMTP id bl18csp1302437wrb; Wed, 20 Jul 2022 23:45:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t4yXkQLpekzPyat1bOZNYRw9hMp7bIFjShzWHukQwkjbw7YJdM9UfH/DIRcUUq5O9+Nf/v X-Received: by 2002:a17:907:3d94:b0:72b:54bc:aa38 with SMTP id he20-20020a1709073d9400b0072b54bcaa38mr39425179ejc.679.1658385907043; Wed, 20 Jul 2022 23:45:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658385907; cv=none; d=google.com; s=arc-20160816; b=cFj3KJZtwhLAN8VBnOUdpT43oNoC+H5tyRDVKLPbdDDx0TMj8CRnK9yL48l/VafQbH i5e+tmS6seGYt8ciluoqY3ltu+LpLQgtL3gZdiVfLCSSWFsB8wUuf2sk6zTGjopCxS8c wdqK+Zk8W2ARPJs3g/75bqjzP8NbubIfyKu7GakYBhec0IBAgttH+wHxyLsiwbFVZtO8 GekrVOmXSYEakNytlJ1p0/ywipVc7gQpEPCtAj5qEhmWWjO9bGywooZUB9CaCPCbNu03 /E125PJ4wFPauYbU9n9tiihFA33x4/gBMoEaZGUncyLGwBjKplRBcCzHf6jcfnfUAuVf aW3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dmarc-filter:delivered-to; bh=QfCia1/qg9NzCf2orYXKVGGO3VYxaQJfm6BG8WdaoNo=; b=SavO5yrCbFF6DLoLgBRek/46BL+vtOZL174rpVpt92p72Y2xtyvi/8VRFAnje4kvek I+w0z2EFpStP+lphwZzP+OYcSkJ1rgoittPQuI7E5Yp2XDKr79deuBmtXqaRaIS0hltR YJo8sb2YWodg/80BZPIyZNpyIf/KanaF7MMCT9VafhLiVI/mIBZMJdZeQcUdDVUOvxI9 Chfl4aefxNysXuvEG/5Pz38QTp2jCTbvQ4BUcFRGTlpONVP1X0jVRCzLmmxzbbE8du5+ MULF9yeFFMWralZrtrnrqoSp4pM19pzOMxWGjoJk/zw6qtqv0NITwP91dRWVMEoIfZxE JIdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id h5-20020a170906718500b00722f48fa044si1492109ejk.192.2022.07.20.23.45.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 23:45:07 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8D47D384D16F for ; Thu, 21 Jul 2022 06:43:59 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id F076F3857014 for ; Thu, 21 Jul 2022 06:43:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F076F3857014 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn Received: from 5.5.5 (unknown [10.2.5.5]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxf9N+9dhiwgssAA--.40495S5; Thu, 21 Jul 2022 14:43:20 +0800 (CST) From: Lulu Cheng To: gcc-patches@gcc.gnu.org Subject: [PATCH v2 3/3] LoongArch: Modify the definition of the ASM_PREFERRED_EH_DATA_FORMAT macro. Date: Thu, 21 Jul 2022 14:41:23 +0800 Message-Id: <20220721064123.2981805-4-chenglulu@loongson.cn> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220721064123.2981805-1-chenglulu@loongson.cn> References: <20220721064123.2981805-1-chenglulu@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf9Dxf9N+9dhiwgssAA--.40495S5 X-Coremail-Antispam: 1UD129KBjvdXoW7Xw48Wr4fXry3Cr45JrWrXwb_yoWDZFb_Xr y3t3ZrCw4rta48twn0q3yft3W8Za1rJFnYvF93Ar4vkF15XrsxA395X3W5CryFgrnF9F98 Jrs5Krn8ZwnFqjkaLaAFLSUrUUUUbb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbS8FF20E14v26ryj6rWUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUWwA2048vs2IY02 0Ec7CjxVAFwI0_Gr0_Xr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWxJVW8Jr1l84 ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AI xVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20x vE14v26r1Y6r17McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xv r2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxkIecxEwVCm-wCF04k20xvY0x 0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E 7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcV C0I7IYx2IY67AKxVW8JVW5JwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF 04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2jsIEc7 CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUxuc_UUUUU= X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: xuchenghua@loongson.cn, Lulu Cheng , i@xen0n.name Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1738943660903927335?= X-GMAIL-MSGID: =?utf-8?q?1738943660903927335?= Some R_LARCH_64 in section .eh_frame will to generate R_LARCH_NONE, we change relocation to R_LARCH_32_PCREL from R_LARCH_64 in setction .eh_frame and not generate dynamic relocation for R_LARCH_32_PCREL. gcc/ChangeLog: * config/loongarch/loongarch.h (ASM_PREFERRED_EH_DATA_FORMAT): Modify the definition of the ASM_PREFERRED_EH_DATA_FORMAT macro. --- gcc/config/loongarch/loongarch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/loongarch/loongarch.h b/gcc/config/loongarch/loongarch.h index 89a5bd728fe..222b58b838d 100644 --- a/gcc/config/loongarch/loongarch.h +++ b/gcc/config/loongarch/loongarch.h @@ -1128,7 +1128,7 @@ struct GTY (()) machine_function #endif #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \ - (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_absptr) + (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) /* Do emit .note.GNU-stack by default. */ #ifndef NEED_INDICATE_EXEC_STACK