From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id 7BBC43858409 for ; Mon, 13 Dec 2021 17:20:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7BBC43858409 Received: by mail-wm1-x333.google.com with SMTP id o29so12515646wms.2 for ; Mon, 13 Dec 2021 09:20:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:subject:message-id:date:cc:to; bh=9qEOF6zZVmwZE/VMLrflukB+MhnyACVx1XgedUMfmMM=; b=XMjATR7o6DbIhStfknk4JGUkzCwc0oJqkwWW4PTahVvnV2nN5+CFm80dufXhANILig 12nDZrTJrmpNS64uUFmAhHOf5lEaOO78DEJZ9tOBcPgpp6N1prTJYG7C6lxvIXATGwO6 P1ndYmsL/XFIRx79SqrZb3LRQlSqHQiQNiEUPixi0sOoR2ra0CHKRPf/eJzHDk71yxjb 9ELH+RdTya0DBY6F7x+u2zgx29PTM0+zaYzs1rxE8JcJSHm/m40Z2VJRVXtnZj6agHAB 5CQfg2vO2np7rrpkRoUQ0N4LzEWfr9gQnPhntBQiqm8THOnRyG+tQ99DiYX66guy0bJm W3rw== X-Gm-Message-State: AOAM530/c/4KNKL4hKEFB7ew+DH+VLsdWBa2aqZlGFZe7/i6OivHv8tF QZm6Td3vWSrYVWWOuPSgDlz9tVX9nrHkG2Uk X-Google-Smtp-Source: ABdhPJxD4ewKXpz1eO5nDcJ1/7Wz7X77vmG3UIuWJBJ/5T7GDUXpaCgY0PxepxVgbMSSpcpLHGYwXw== X-Received: by 2002:a7b:cf02:: with SMTP id l2mr39903021wmg.78.1639416042545; Mon, 13 Dec 2021 09:20:42 -0800 (PST) Received: from smtpclient.apple ([2a02:2ab8:224:1:b88d:a214:69d4:e7f5]) by smtp.gmail.com with ESMTPSA id s8sm13063629wra.9.2021.12.13.09.20.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Dec 2021 09:20:42 -0800 (PST) From: Olivier Hainque Content-Type: multipart/mixed; boundary="Apple-Mail=_FA909B99-1D81-4312-B1D8-EF5F811344C2" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: [PATCH] Tigthen libc_internal and vxcrtstuff for VxWorks shared objects Message-Id: <53E8A5C4-96C3-418D-85C7-92FE140FEC71@adacore.com> Date: Mon, 13 Dec 2021 18:20:41 +0100 Cc: Olivier Hainque , Rasmus Villemoes , =?utf-8?B?RnLDqWTDqXJpYyBLb25yYWQ=?= To: gcc-patches X-Mailer: Apple Mail (2.3654.100.0.2.22) X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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-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: , X-List-Received-Date: Mon, 13 Dec 2021 17:20:45 -0000 --Apple-Mail=_FA909B99-1D81-4312-B1D8-EF5F811344C2 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii This change tightens and documents the use of libc_internal, then strengthens the VxWorks crtstuff objects for the support of shared libraries. In particular: - Define __dso_handle, which libstdc++.so requires, - Provide _init and _fini functions to run through the init/fini arrays for shared libs in configurations which HAVE_INITFINI_ARRAY_SUPPORT. The init/fini functions are provided by libc_internal.a for static links but with slightly different names and we don't want to risk dragging other libc_internal contents in the closure accidentally so make sure we don't link with it. As for the !vxworks crtstuff, the new shared libs specific bits are conditioned by a CRTSTUFFS_O macro, for which we provide new Makefile fragment. The bits to actually use the fragment and the shared objects will be added by a forthcoming change, as part of a more general configury update for shared libs. The change also adds guards the eh table registration code in vxcrtstuff so the objects can be used for either init/fini or eh tables independently. Tested together with the other patches in the current series. Olivier 2021-12-07 Fred Konrad Olivier Hainque gcc/ * config/vxworks.h (VXWORKS_BASE_LIBS_RTP): Guard -lc_internal on !shared+!non-static and document. (VXWORKS_LIB_SPEC): Remove the bits intended to drag the init/fini functions from libc_internal in the shared lib case. (VX_CRTBEGIN_SPEC/VX_CRTEND_SPEC): Use vxcrtstuff objects also in configurations with shared lib and INITFINI_ARRAY support. libgcc/ * config/t-vxcrtstuffS: New Makefile fragment. * config/vxcrtstuff.c: Provide __dso_handle. Provide _init/_fini functions for INITFINI_ARRAY support in shared libs and guard the definition of eh table registration functions on conditions indicating they are needed. --Apple-Mail=_FA909B99-1D81-4312-B1D8-EF5F811344C2 Content-Disposition: attachment; filename=0006-Tigthen-libc_internal-and-crtstuff-for-VxWorks-share.patch Content-Type: application/octet-stream; x-unix-mode=0640; name="0006-Tigthen-libc_internal-and-crtstuff-for-VxWorks-share.patch" Content-Transfer-Encoding: quoted-printable =46rom=20f181024d7c31131079a6829f2a217562208c557a=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Frederic=20Konrad=20=0A= Date:=20Thu,=205=20Nov=202020=2011:34:57=20+0100=0ASubject:=20[PATCH]=20= Tigthen=20libc_internal=20and=20crtstuff=20for=20VxWorks=20shared=20= objects=0A=0AThis=20change=20tightens=20and=20documents=20the=20use=20of=20= libc_internal,=20then=0Astrengthens=20the=20VxWorks=20crtstuff=20objects=20= for=20the=20support=20of=20shared=0Alibraries.=20In=20particular:=0A=0A-=20= Define=20__dso_handle,=20which=20libstdc++.so=20requires,=0A=0A-=20= Provide=20_init=20and=20_fini=20functions=20to=20run=20through=20the=20= init/fini=20arrays=0A=20=20for=20shared=20libs=20in=20configurations=20= which=20HAVE_INITFINI_ARRAY_SUPPORT.=0A=0AThe=20init/fini=20functions=20= are=20provided=20by=20libc_internal.a=20for=20static=20links=0Abut=20= with=20slightly=20different=20names=20and=20we=20don't=20want=20to=20= risk=20dragging=20other=0Alibc_internal=20contents=20in=20the=20closure=20= accidentally=20so=20make=20sure=20we=20don't=0Alink=20with=20it.=0A=0AAs=20= for=20the=20!vxworks=20crtstuff,=20the=20new=20shared=20libs=20specific=20= bits=20are=0Aconditioned=20by=20a=20CRTSTUFFS_O=20macro,=20for=20which=20= we=20provide=20new=20Makefile=0Afragment.=0A=0AThe=20bits=20to=20= actually=20use=20the=20fragment=20and=20the=20shared=20objects=20will=0A= be=20added=20by=20a=20forthcoming=20change,=20as=20part=20of=20a=20more=20= general=20configury=0Aupdate=20for=20shared=20libs.=0A=0AThe=20change=20= also=20adds=20guards=20the=20eh=20table=20registration=20code=0Ain=20= vxcrtstuff=20so=20the=20objects=20can=20be=20used=20for=20either=20= init/fini=0Aor=20eh=20tables=20independently.=0A=0A2021-12-07=20=20Fred=20= Konrad=20=20=0A=20=20=20=20=20=20=20=20=20=20=20=20= Olivier=20Hainque=20=20=0A=0Agcc/=0A=09*=20= config/vxworks.h=20(VXWORKS_BASE_LIBS_RTP):=20Guard=20-lc_internal=0A=09= on=20!shared+!non-static=20and=20document.=0A=09(VXWORKS_LIB_SPEC):=20= Remove=20the=20bits=20intended=20to=20drag=20the=0A=09init/fini=20= functions=20from=20libc_internal=20in=20the=20shared=20lib=20case.=0A=09= (VX_CRTBEGIN_SPEC/VX_CRTEND_SPEC):=20Use=20vxcrtstuff=20objects=20also=20= in=0A=09configurations=20with=20shared=20lib=20and=20INITFINI_ARRAY=20= support.=0A=0Alibgcc/=0A=09*=20config/t-vxcrtstuffS:=20New=20Makefile=20= fragment.=0A=09*=20config/vxcrtstuff.c:=20Provide=20__dso_handle.=20= Provide=20_init/_fini=0A=09functions=20for=20INITFINI_ARRAY=20support=20= in=20shared=20libs=20and=20guard=0A=09the=20definition=20of=20eh=20table=20= registration=20functions=20on=20conditions=0A=09indicating=20they=20are=20= needed.=0A---=0A=20gcc/config/vxworks.h=20=20=20=20=20=20=20=20|=2042=20= +++++++++++++-------=0A=20libgcc/config/t-vxcrtstuffS=20|=20=209=20+++++=0A= =20libgcc/config/vxcrtstuff.c=20=20|=2077=20= ++++++++++++++++++++++++++++++++++---=0A=203=20files=20changed,=20109=20= insertions(+),=2019=20deletions(-)=0A=20create=20mode=20100644=20= libgcc/config/t-vxcrtstuffS=0A=0Adiff=20--git=20a/gcc/config/vxworks.h=20= b/gcc/config/vxworks.h=0Aindex=2096076e3c272..52d6aa1ae96=20100644=0A---=20= a/gcc/config/vxworks.h=0A+++=20b/gcc/config/vxworks.h=0A@@=20-101,11=20= +101,23=20@@=20along=20with=20GCC;=20see=20the=20file=20COPYING3.=20=20= If=20not=20see=0A=20=20=20=20the=20default=20CPP=20spec=20for=20C++=20as=20= well.=20=20*/=0A=20#undef=20CPLUSPLUS_CPP_SPEC=0A=20=0A-/*=20For=20= VxWorks=20static=20rtps,=20the=20system=20provides=20libc_internal.a,=20= a=20superset=20of=0A-=20=20=20libgcc.a=20that=20we=20need=20to=20use=20= e.g.=20to=20satisfy=20references=20to=20__init=20and=0A-=20=20=20__fini.=20= =20We=20still=20want=20our=20libgcc=20to=20prevail=20for=20symbols=20it=20= would=20provide=0A-=20=20=20(e.g.=20register=20save=20entry=20points),=20= so=20re-place=20it=20here=20between=20libraries=0A-=20=20=20that=20might=20= reference=20it=20and=20libc_internal.=0A+/*=20For=20VxWorks=20static=20= rtps,=20the=20system=20provides=20libc_internal.a=20for=20a=20variety=0A= +=20=20=20of=20purposes.=20Care=20is=20needed=20to=20include=20it=20= appropriately.=0A+=0A+=20=20=20-=20In=20some=20configurations,=20= libc_internal=20fills=20in=20possible=20references=20from=0A+=20=20=20=20= =20the=20static=20libc=20that=20we=20don't=20wouldn't=20satisfy=20= ourselves,=20say,=20with=0A+=20=20=20=20=20libgcc.=20=20An=20example=20= is=20the=20__aeabi_memcpy=20family=20of=20functions=20on=20arm,=0A+=20=20= =20=20=20which=20have=20very=20specific=20ABI=20allowances.=0A+=0A+=20=20= =20-=20OTOH,=20in=20some=20configurations=20the=20library=20provides=20= typical=20libgcc=0A+=20=20=20=20=20services,=20for=20example=20register=20= save/restore=20entry=20points=20on=20powerpc.=20We=0A+=20=20=20=20=20= want=20our=20libgcc=20to=20prevail=20for=20symbols=20it=20would=20= provide,=20so=20place=0A+=20=20=20=20=20-lc_internal=20after=20-lc=20= -lgcc.=0A+=0A+=20=20=20-=20libc_internal=20also=20contains=20= __init/__fini=20functions=20for=0A+=20=20=20=20=20USE_INITFINI_ARRAY=20= support.=20However,=20the=20system=20expects=20these=20in=0A+=20=20=20=20= =20every=20shared=20lib=20as=20well,=20with=20slightly=20different=20= names,=20and=20it=20is=0A+=20=20=20=20=20simpler=20for=20us=20to=20= provide=20our=20own=20versions=20through=20vxcrtstuff.=0A=20=0A=20=20=20=20= In=20addition,=20some=20versions=20of=20VxWorks=20rely=20on=20explicit=20= extra=20libraries=20for=0A=20=20=20=20system=20calls=20and=20the=20set=20= of=20base=20network=20libraries=20of=20common=20use=20varies=0A@@=20= -120,7=20+132,8=20@@=20along=20with=20GCC;=20see=20the=20file=20= COPYING3.=20=20If=20not=20see=0A=20#define=20VXWORKS_NET_LIBS_RTP=20= "-lnet=20-ldsi"=0A=20#endif=0A=20=0A-#define=20VXWORKS_BASE_LIBS_RTP=20= "-lc=20-lgcc=20-lc_internal"=0A+#define=20VXWORKS_BASE_LIBS_RTP=20\=0A+=20= =20"-lc=20-lgcc=20%{!shared:%{!non-static:-lc_internal}}"=0A=20=0A=20= #define=20VXWORKS_EXTRA_LIBS_RTP=0A=20=0A@@=20-161,10=20+174,9=20@@=20= along=20with=20GCC;=20see=20the=20file=20COPYING3.=20=20If=20not=20see=0A= =20#endif=0A=20=0A=20#undef=20VXWORKS_LIB_SPEC=0A-#define=09= VXWORKS_LIB_SPEC=09=09=09=09=09=09\=0A-"%{mrtp:%{shared:-u=20"=20= USER_LABEL_PREFIX=20"__init=20-u=20"=20USER_LABEL_PREFIX=20"__fini}=20\=0A= -=09%{!shared:%{non-static:-u=20"=20USER_LABEL_PREFIX=20"_STI__6__rtld=20= -ldl}=20\=0A-=09=09=20=20"=20TLS_SYM=20"=20\=0A+#define=09= VXWORKS_LIB_SPEC=09=09=09=09=09=09=20=20=20\=0A= +"%{mrtp:%{!shared:%{non-static:-u=20"=20USER_LABEL_PREFIX=20= "_STI__6__rtld=20-ldl}=20\=0A+=09=09=20=20"=20TLS_SYM=20"=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=09=09=20=20= --start-group=20"=20VXWORKS_LIBS_RTP=20"=20--end-group}}"=0A=20=0A=20/*=20= The=20no-op=20spec=20for=20"-shared"=20below=20is=20present=20because=20= otherwise=20GCC=0A@@=20-196,11=20+208,13=20@@=20along=20with=20GCC;=20= see=20the=20file=20COPYING3.=20=20If=20not=20see=0A=20#define=20= VXWORKS_LIBGCC_SPEC=20"-lgcc"=0A=20#endif=0A=20=0A-/*=20Setup=20the=20= crtstuff=20begin/end=20we=20might=20need=20for=20dwarf=20EH=20= registration.=20=20*/=0A+/*=20Setup=20the=20crtstuff=20begin/end=20we=20= might=20need=20for=20dwarf=20EH=20registration=0A+=20=20=20and/or=20= INITFINI_ARRAY=20support=20for=20shared=20libs.=20=20*/=0A=20=0A-#if=20= !defined(CONFIG_SJLJ_EXCEPTIONS)=20&&=20DWARF2_UNWIND_INFO=0A-#define=20= VX_CRTBEGIN_SPEC=20"vx_crtbegin.o%s"=0A-#define=20VX_CRTEND_SPEC=20= "-l:vx_crtend.o"=0A+#if=20(HAVE_INITFINI_ARRAY_SUPPORT=20&&=20= defined(ENABLE_SHARED_LIBGCC))=20\=0A+=20=20=20=20||=20= (DWARF2_UNWIND_INFO=20&&=20!defined(CONFIG_SJLJ_EXCEPTIONS))=0A+#define=20= VX_CRTBEGIN_SPEC=20"%{!shared:vx_crtbegin.o%s;:vx_crtbeginS.o%s}"=0A= +#define=20VX_CRTEND_SPEC=20=20=20= "%{!shared:vx_crtend.o%s;:vx_crtendS.o%s}"=0A=20#else=0A=20#define=20= VX_CRTBEGIN_SPEC=20""=0A=20#define=20VX_CRTEND_SPEC=20""=0Adiff=20--git=20= a/libgcc/config/t-vxcrtstuffS=20b/libgcc/config/t-vxcrtstuffS=0Anew=20= file=20mode=20100644=0Aindex=2000000000000..6b65b0005be=0A---=20= /dev/null=0A+++=20b/libgcc/config/t-vxcrtstuffS=0A@@=20-0,0=20+1,9=20@@=0A= +#=20Shared=20versions=20of=20vx_crt{begin,end}.o,=20those=20one=20must=20= be=20compiled=20only=0A+#=20when=20the=20shared=20libraries=20are=20= available=0A+=0A+vx_crtbeginS.o:=20$(srcdir)/config/vxcrtstuff.c=0A+=09= $(crt_compile)=20$(CRTSTUFF_T_CFLAGS_S)=20-DCRT_BEGIN=20-c=20$<=20= -DCRTSTUFFS_O=0A+vx_crtendS.o:=20$(srcdir)/config/vxcrtstuff.c=0A+=09= $(crt_compile)=20$(CRTSTUFF_T_CFLAGS_S)=20-DCRT_END=20-c=20$<=20= -DCRTSTUFFS_O=0A+=0A+EXTRA_PARTS=20+=3D=20vx_crtbeginS.o=20vx_crtendS.o=0A= diff=20--git=20a/libgcc/config/vxcrtstuff.c=20= b/libgcc/config/vxcrtstuff.c=0Aindex=20c15e15e54e9..80f51f7399d=20100644=0A= ---=20a/libgcc/config/vxcrtstuff.c=0A+++=20b/libgcc/config/vxcrtstuff.c=0A= @@=20-50,15=20+50,25=20@@=20see=20the=20files=20COPYING3=20and=20= COPYING.RUNTIME=20respectively.=20=20If=20not,=20see=0A=20#define=20= USE_CDTORS_SECTIONS=0A=20#endif=0A=20=0A+#if=20DWARF2_UNWIND_INFO=20&&=20= !defined(__USING_SJLJ_EXCEPTIONS__)=0A+#define=20USE_EH_FRAME_REGISTRY=0A= +#endif=0A+=0A=20/*=20=20------------------------------=20crtbegin=20= -------------------------------=20=20*/=0A=20=0A=20#ifdef=20CRT_BEGIN=0A=20= =0A-/*=20Stick=20a=20label=20at=20the=20beginning=20of=20the=20frame=20= unwind=20info=20so=20we=20can=20register=0A-=20=20=20and=20deregister=20= it=20with=20the=20exception=20handling=20library=20code.=20=20*/=0A= -static=20const=20char=20__EH_FRAME_BEGIN__[]=0A= -__attribute__((section(__LIBGCC_EH_FRAME_SECTION_NAME__),=20= aligned(4)))=0A-=20=20=3D=20{=20};=0A+#if=20DEFAULT_USE_CXA_ATEXIT=20&&=20= defined(__RTP__)=0A+/*=20This=20mimics=20the=20crtstuff.c=20behavior.=20=20= dso_handle=20should=20be=20NULL=20for=20the=0A+=20=20=20main=20program=20= (in=20vx_crtbegin.o)=20and=20a=20unique=20value=20for=20the=20shared=20= libraries=0A+=20=20=20(in=20vx_crtbeginS.o).=20=20=20*/=0A+extern=20void=20= *__dso_handle=20__attribute__=20((__visibility__=20("hidden")));=0A= +#ifdef=20CRTSTUFFS_O=0A+void=20*__dso_handle=20=3D=20&__dso_handle;=0A= +#else=0A+void=20*__dso_handle=20=3D=200;=0A+#endif=0A+#endif=20/*=20= DEFAULT_USE_CXA_ATEXIT=20*/=0A=20=0A=20/*=20Determine=20what=20names=20= to=20use=20for=20the=20constructor/destructor=20functions.=20=20*/=0A=20=0A= @@=20-89,6=20+99,53=20@@=20= __attribute__((section(__LIBGCC_EH_FRAME_SECTION_NAME__),=20aligned(4)))=0A= =20#define=20EH_CTOR_ATTRIBUTE=20__attribute__((constructor=20(101)))=0A=20= #define=20EH_DTOR_ATTRIBUTE=20__attribute__((destructor=20(101)))=0A=20=0A= +/*=20Provide=20the=20init/fini=20array=20support=20functions=20for=20= shared=20libraries,=0A+=20=20=20where=20we=20don't=20want=20to=20drag=20= libc_internal=20contents=20blindly=20and=20which=0A+=20=20=20provides=20= functions=20with=20a=20slightly=20different=20name=20anyway.=20=20*/=0A+=0A= +#if=20HAVE_INITFINI_ARRAY_SUPPORT=20&&=20defined(CRTSTUFFS_O)=0A+=0A+/*=20= Run=20through=20the=20.init_array,=20.fini_array=20sections.=20=20The=20= linker=20script=0A+=20=20=20*must*=20provide=20__init_array_start,=20= __init_array_end,=20__fini_array_start,=0A+=20=20=20__fini_array_end=20= symbols.=20=20*/=0A+=0A+typedef=20void=20(*initfini_ptr)=20(void);=0A= +extern=20initfini_ptr=20__init_array_start[];=0A+extern=20initfini_ptr=20= __init_array_end[];=0A+extern=20initfini_ptr=20__fini_array_start[];=0A= +extern=20initfini_ptr=20__fini_array_end[];=0A+=0A+/*=20Provide=20the=20= actual=20code=20through=20static=20functions,=20which=20don't=20need=0A+=20= =20=20to=20be=20exposed=20in=20the=20shared=20lib=20interface.=20=20*/=0A= +=0A+static=20void=20__exec_init_array(void)=0A+{=0A+=20=20initfini_ptr=20= *fn;=0A+=20=20for=20(fn=20=3D=20__init_array_start;=20fn=20<=20= __init_array_end;=20++fn)=0A+=20=20=20=20(*fn)();=0A+}=0A+=0A+static=20= void=20__exec_fini_array(void)=0A+{=0A+=20=20initfini_ptr=20*fn;=0A+=20=20= for=20(fn=20=3D=20__fini_array_end=20-=201;=20fn=20>=3D=20= __fini_array_start;=20--fn)=0A+=20=20=20=20(*fn)();=0A+}=0A+=0A+/*=20= Reference=20the=20two=20above=20functions=20as=20the=20init=20/=20fini=20= function.=20=20*/=0A+=0A+void=20__attribute__=20((__section__=20=20= (".init")))=20_init()=0A+{=0A+=20=20__exec_init_array();=0A+}=0A+=0A= +void=20__attribute__=20((__section__=20=20(".fini")))=20_fini()=0A+{=0A= +=20=20__exec_fini_array();=0A+}=0A+=0A+#endif=20/*=20__CRTSTUFFS_O__=20= */=0A+=0A=20#else=20/*=20!USE_INITFINI_ARRAY=20=20*/=0A=20=0A=20/*=20= Note:=20Even=20in=20case=20of=20.ctors/.dtors=20sections,=20we=20can't=20= use=20the=20attribute=0A@@=20-100,6=20+157,13=20@@=20= __attribute__((section(__LIBGCC_EH_FRAME_SECTION_NAME__),=20aligned(4)))=0A= =20=0A=20#endif=20/*=20USE_INITFINI_ARRAY=20=20*/=0A=20=0A+#ifdef=20= USE_EH_FRAME_REGISTRY=0A+/*=20Stick=20a=20label=20at=20the=20beginning=20= of=20the=20frame=20unwind=20info=20so=20we=20can=20register=0A+=20=20=20= and=20deregister=20it=20with=20the=20exception=20handling=20library=20= code.=20=20*/=0A+static=20const=20char=20__EH_FRAME_BEGIN__[]=0A= +__attribute__((section(__LIBGCC_EH_FRAME_SECTION_NAME__),=20= aligned(4)))=0A+=20=20=3D=20{=20};=0A+=0A=20EH_LINKAGE=20= EH_CTOR_ATTRIBUTE=20void=20EH_CTOR_NAME=20(void)=0A=20{=0A=20=20=20= static=20struct=20object=20object;=0A@@=20-110,6=20+174,7=20@@=20= EH_LINKAGE=20EH_DTOR_ATTRIBUTE=20void=20EH_DTOR_NAME=20(void)=0A=20{=0A=20= =20=20__deregister_frame_info=20(__EH_FRAME_BEGIN__);=0A=20}=0A+#endif=20= /*=20USE_EH_FRAME_REGISTRY=20*/=0A=20=0A=20#ifdef=20USE_CDTORS_SECTIONS=0A= =20/*=20As=20explained=20above,=20we=20need=20to=20manually=20build=20= the=20sections=20here=20as=20the=0A@@=20-126,6=20+191,7=20@@=20static=20= void=20(*=20volatile=20eh_registration_dtors[])()=0A=20=0A=20#elif=20= defined=20(CRT_END)=20/*=20!=20CRT_BEGIN=20*/=0A=20=0A+#ifdef=20= USE_EH_FRAME_REGISTRY=0A=20/*=20Terminate=20the=20frame=20unwind=20info=20= section=20with=20a=204byte=200=20as=20a=20sentinel;=0A=20=20=20=20this=20= would=20be=20the=20'length'=20field=20in=20a=20real=20FDE.=20=20*/=0A=20=0A= @@=20-133,6=20+199,7=20@@=20static=20const=20char=20__FRAME_END__[]=0A=20= =20=20=20=20=20__attribute__=20((used,=20= section(__LIBGCC_EH_FRAME_SECTION_NAME__),=0A=20=09=09=20=20=20=20=20= aligned(4)))=0A=20=20=20=3D=20{=200,=200,=200,=200=20};=0A+#endif=20/*=20= USE_EH_FRAME_REGISTRY=20*/=0A=20=0A=20#else=20/*=20!=20CRT_BEGIN=20&=20!=20= CRT_END=20*/=0A=20=0A--=20=0A2.25.1=0A=0A= --Apple-Mail=_FA909B99-1D81-4312-B1D8-EF5F811344C2--