From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by sourceware.org (Postfix) with ESMTPS id 352213858D28 for ; Sun, 23 Jul 2023 01:07:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 352213858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=marvell.com Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36MNMRkq016422 for ; Sat, 22 Jul 2023 18:06:58 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=NpLA+XWrrqPojHCFqFLQ4e7iyMFl3TuIpZsxD0J+734=; b=j8wjJNF/DyqSETBoR4dvUHymF3aeNq6Fyc6E0R76M/X1CNLF1/TbsogGJoY5uK9602Vq /mAXlsXxC1oWSZTKdB1JxokDMHcs2u6a+FXJjhrtboRPto7qnyibsb9DTEU4/krPa6BP ekNaWKl9bCEhTNJmmUHpDByrmv0IkTPhzlFVtTqIz2a+C4RClGSgvLR7OU/Cs4MGUYHC 4AIZHDRHbASqQ3x8kObHYc56Y5Zl5l0lZCqN3cjBo0iLQzaMO7/7dt98/pRW7CRwjEL7 /5B+wYC7GJqAipjn8VRR2JhEp0cnDtvSPMwMMRa61/EBKKXU6psD7xOI4UrSuogrjPp7 qw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3s0emks2dv-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sat, 22 Jul 2023 18:06:58 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sat, 22 Jul 2023 18:06:56 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Sat, 22 Jul 2023 18:06:56 -0700 Received: from vpnclient.wrightpinski.org.com (unknown [10.76.242.112]) by maili.marvell.com (Postfix) with ESMTP id E1D013F7083; Sat, 22 Jul 2023 18:06:55 -0700 (PDT) From: Andrew Pinski To: CC: Andrew Pinski Subject: [PATCH 2/2] AARCH64: Turn off unwind tables for crtbeginT.o Date: Sat, 22 Jul 2023 18:06:45 -0700 Message-ID: <20230723010645.1622083-2-apinski@marvell.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230723010645.1622083-1-apinski@marvell.com> References: <20230723010645.1622083-1-apinski@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: kGkVwaYas-cpsL4GK1HF2VmEnb6R3r3X X-Proofpoint-ORIG-GUID: kGkVwaYas-cpsL4GK1HF2VmEnb6R3r3X X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-22_12,2023-07-20_01,2023-05-22_02 X-Spam-Status: No, score=-14.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_LOW,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: The problem -fasynchronous-unwind-tables is on by default for aarch64 We need turn it off for crt*.o because it would make __EH_FRAME_BEGIN__ point to .eh_frame data from crtbeginT.o instead of the user-defined object during static linking. This turns it off. OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions. libgcc/ChangeLog: * config.host (aarch64*-*-*): Add t-crtstuff to tmake_file. * config/aarch64/t-crtstuff: New file. --- libgcc/config.host | 6 ++++++ libgcc/config/aarch64/t-crtstuff | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 libgcc/config/aarch64/t-crtstuff diff --git a/libgcc/config.host b/libgcc/config.host index c94d69d84b7..b2d82041a69 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -390,6 +390,7 @@ aarch64*-*-elf | aarch64*-*-rtems*) extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o" extra_parts="$extra_parts crtfastmath.o" tmake_file="${tmake_file} ${cpu_type}/t-aarch64" + tmake_file="${tmake_file} ${cpu_type}/t-crtstuff" tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc" tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" tmake_file="${tmake_file} t-dfprules" @@ -398,6 +399,7 @@ aarch64*-*-elf | aarch64*-*-rtems*) aarch64*-*-freebsd*) extra_parts="$extra_parts crtfastmath.o" tmake_file="${tmake_file} ${cpu_type}/t-aarch64" + tmake_file="${tmake_file} ${cpu_type}/t-crtstuff" tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc" tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" tmake_file="${tmake_file} t-dfprules" @@ -406,12 +408,14 @@ aarch64*-*-freebsd*) aarch64*-*-netbsd*) extra_parts="$extra_parts crtfastmath.o" tmake_file="${tmake_file} ${cpu_type}/t-aarch64" + tmake_file="${tmake_file} ${cpu_type}/t-crtstuff" tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" tmake_file="${tmake_file} t-dfprules" md_unwind_header=aarch64/aarch64-unwind.h ;; aarch64*-*-fuchsia*) tmake_file="${tmake_file} ${cpu_type}/t-aarch64" + tmake_file="${tmake_file} ${cpu_type}/t-crtstuff" tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc" tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp" tmake_file="${tmake_file} t-dfprules" @@ -420,6 +424,7 @@ aarch64*-*-linux*) extra_parts="$extra_parts crtfastmath.o" md_unwind_header=aarch64/linux-unwind.h tmake_file="${tmake_file} ${cpu_type}/t-aarch64" + tmake_file="${tmake_file} ${cpu_type}/t-crtstuff" tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc" tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" tmake_file="${tmake_file} t-dfprules" @@ -428,6 +433,7 @@ aarch64*-*-vxworks7*) extra_parts="$extra_parts crtfastmath.o" md_unwind_header=aarch64/aarch64-unwind.h tmake_file="${tmake_file} ${cpu_type}/t-aarch64" + tmake_file="${tmake_file} ${cpu_type}/t-crtstuff" tmake_file="${tmake_file} ${cpu_type}/t-lse" tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" tmake_file="${tmake_file} t-dfprules" diff --git a/libgcc/config/aarch64/t-crtstuff b/libgcc/config/aarch64/t-crtstuff new file mode 100644 index 00000000000..2e2814e6c67 --- /dev/null +++ b/libgcc/config/aarch64/t-crtstuff @@ -0,0 +1,5 @@ +# -fasynchronous-unwind-tables -funwind-tables is on by default for aarch64 +# We turn it off for crt*.o because it would make __EH_FRAME_BEGIN__ point +# to .eh_frame data from crtbeginT.o instead of the user-defined object +# during static linking. +CRTSTUFF_T_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables -- 2.39.1