From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from thoth.sbs.de (thoth.sbs.de [192.35.17.2]) by sourceware.org (Postfix) with ESMTPS id 6EA923858410 for ; Tue, 26 Oct 2021 10:03:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6EA923858410 Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id 19QA3jih028683 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Oct 2021 12:03:45 +0200 Received: from USCIMMBX004.net.plm.eds.com ([161.134.128.186]) by mail2.siemens.de (8.15.2/8.15.2) with ESMTPS id 19QA3ahs031349 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 26 Oct 2021 12:03:44 +0200 Received: from BELEMMBX006.net.plm.eds.com (194.138.214.85) by USCIMMBX004.net.plm.eds.com (161.134.128.186) with Microsoft SMTP Server (TLS) id 14.3.498.0; Tue, 26 Oct 2021 06:03:19 -0400 Received: from BELEMMBX004.net.plm.eds.com (194.138.214.87) by BELEMMBX006.net.plm.eds.com (194.138.214.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 26 Oct 2021 12:03:15 +0200 Received: from BELEMMBX004.net.plm.eds.com ([::1]) by BELEMMBX004.net.plm.eds.com ([::1]) with mapi id 15.01.2242.012; Tue, 26 Oct 2021 12:03:15 +0200 From: "Dallman, John" To: Florian Weimer , "Dallman, John via Gcc-help" Subject: RE: C, -fexceptions, libgcc_s, and related matters on arm64 Thread-Topic: C, -fexceptions, libgcc_s, and related matters on arm64 Thread-Index: AdfHR6jZ/G6Xra3dRMSJsULJymnBlgAwzyi7AJDxzFA= Date: Tue, 26 Oct 2021 10:03:15 +0000 Message-ID: <2bdac0728530420dab96f1c5d18dba93@siemens.com> References: <87y26jdigr.fsf@mid.deneb.enyo.de> In-Reply-To: <87y26jdigr.fsf@mid.deneb.enyo.de> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-document-confidentiality: NotClassified x-originating-ip: [194.138.214.54] X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.6.1018-26490.005 X-TM-AS-Result: No-18.349000-5.000000-10 X-TMASE-MatchedRID: U4jXvEiKZBVilY5wApBwQredLpfvchkDHFRvTrWZaDuIO3JWGOvZgU+c rEA4+nhZBph69XjMbdmGH4oKUdBqn/wy4VtUEEhOioDqk5A4bxcQ40rF+sKGgho8wYJxWb0OWzS vetZt4+6A6UrbM3j3qbCnmFJjUsRqehbssCjfelMKjLn4ZPjQFYt55Ou5Qz3gFFE4cEcLppML// VMxXlyE4//n6T080FNR+5MLVjVCjTkiQdDfa3GsN8VPvU4z2RYawK5eZ3xESydqq0c64R1qnFmR H67eyYFZjalLJ/eGNsvz85wugLPCDd4qojoyEFYTe7+XlTQW5rZKH0ma5I4uJpWgCLYjjT966+N YMjB9utuk/UxcgSyhu+uSiVyBvj84UD6lR/JDlk6TdBxbIMMHx8yfcj+KB1Jc7uq4k7WFKP0OZj gklguOnqm3WhT4L+klAhDc0H6X7WtpGTv2/TiY5a14dAJZrADo8WMkQWv6iWEC+FqH1HDJtgMqr 0Esrf3ymsk/wUE4hoMFsa+1wyh/JRMZUCEHkRt X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--18.349000-5.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1018-26490.005 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-TM-SNTS-SMTP: AAE47972645C6A97524957F9D0F2AC31FD1DDDC3F3AD8758DE0EACA37D7CB3E42 X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2021 10:03:52 -0000 > Check -S output and see if references to the personality routine are ther= e. Then proceed to the generated object files. On x86-64, the personality is referenced, quite a lot, in the assembler out= put: $ grep __gcc_personality pk/pk_bb.s .cfi_personality 0x9b,DW.ref.__gcc_personality_v0 .globl __gcc_personality_v0 .cfi_personality 0x9b,DW.ref.__gcc_personality_v0 .hidden DW.ref.__gcc_personality_v0 .weak DW.ref.__gcc_personality_v0 .section .data.DW.ref.__gcc_personality_v0,"awG",@progbits,D= W.ref.__gcc_personality_v0,comdat .type DW.ref.__gcc_personality_v0, @object .size DW.ref.__gcc_personality_v0, 8 DW.ref.__gcc_personality_v0: .quad __gcc_personality_v0 On arm64, it is not: $ grep gcc_per pk/pk_bb.s ((no output)) > Maybe your AArch64 toolchain defaults to static linking? It seems to be happily using dynamic linking. On x86-64: $ ldd /path/to/libmine.so linux-vdso.so.1 =3D> (0x00007ffec69bc000) libgcc_s.so.1 =3D> /lib64/libgcc_s.so.1 (0x00007f5eaed0c000) libpthread.so.0 =3D> /lib64/libpthread.so.0 (0x00007f5eaeaef000) libc.so.6 =3D> /lib64/libc.so.6 (0x00007f5eae72e000) libm.so.6 =3D> /lib64/libm.so.6 (0x00007f5eae42c000) /lib64/ld-linux-x86-64.so.2 (0x00007f5eb3c4f000) And on arm64: $ ldd /path/to/libmine.so linux-vdso.so.1 (0x0000ffff90cca000) libpthread.so.0 =3D> /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000= ffff8d04d000) libc.so.6 =3D> /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff8ceda000= ) /lib/ld-linux-aarch64.so.1 (0x0000ffff90c9a000) libm.so.6 =3D> /lib/aarch64-linux-gnu/libm.so.6 (0x0000ffff8ce2d000= ) The difference is that the arm64 build does not reference libgcc_s.so. > Or the compiler is not GCC and does not actually implement this GNU exten= sion? $ cc --version cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Any more ideas? Thanks, -- John Dallman Siemens Digital Industries Software > -----Original Message----- > From: Florian Weimer > Sent: 23 October 2021 13:38 > To: Dallman, John via Gcc-help > Cc: Dallman, John (DI SW PE OT PC PDE) > Subject: Re: C, -fexceptions, libgcc_s, and related matters on arm64 > > * John via Gcc-help Dallman: > > > My arm64 compile options are similar: cc -march=3Darmv8-a > > -ffp-contract=3Doff -O -fPIC -D_POSIX_SOURCE - > D_POSIX_C_SOURCE=3D200112L > > -c -fexceptions -std=3Dc99 -Wformat -Wformat-security > > -fstack-protector-strong -fno-strict-aliasing > > > > Any suggestions? > > Check -S output and see if references to the personality routine are ther= e. > Then proceed to the generated object files. > > Maybe your AArch64 toolchain defaults to static linking? Or the compiler= is > not GCC and does not actually implement this GNU extension? ----------------- Siemens Industry Software Limited is a limited company registered in Englan= d and Wales. Registered number: 3476850. Registered office: Faraday House, Sir William Siemens Square, Frimley, Surr= ey, GU16 8QD.