From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: How to get Ada to =?utf-8?Q?=E2=80=9Ccross?= the =?utf-8?Q?ch?= =?utf-8?Q?asm=E2=80=9D=3F?= Date: Sun, 06 May 2018 18:40:26 +0100 Organization: A noiseless patient Spider Message-ID: References: <878t9nemrl.fsf@nightsong.com> <87h8nl50rw.fsf@nightsong.com> <87d0y97lda.fsf@nightsong.com> <874ljl7jyb.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="9f501ea9e34918f5bf485e8ebfe284c9"; logging-data="9013"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/21Rn06KBql63MpLP4ZfWnDNufywCJi4k=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:8TN87cuqCHOaaNnoM9+Ym1fvvts= sha1:8qkacN4SW5hgydGW4yNunsNZZCI= Xref: reader02.eternal-september.org comp.lang.ada:52045 Date: 2018-05-06T18:40:26+01:00 List-Id: Niklas Holsti writes: > On 18-05-06 13:16 , Simon Wright wrote: >> Niklas Holsti writes: >> >>> On 18-05-06 11:02 , Simon Wright wrote: >>>> Dennis Lee Bieber writes: >>>> >>>>> And for the avionics I have been exposed to -- you do not use >>>>> constructs that require the secondary stack... Same reason -- size >>>>> not known until run-time. >>>> >>>> Just for interest, I just rebuilt AdaCore's Certyflie with the >>>> restriction No_Secondary_Stack; no problems. >>> >>> Just from curiosity: did you check that the linked program did not >>> include any secondary-stack functions? I've found that some versions >>> of GNAT Pro for the SPARC/LEON do not fully obey the >>> No_Secondary_Stack restriction in the gnat.adc file. >> >> The map file only shows that s-secsta was linked because of >> s-tarest. Maybe the map only shows the first reason for linking. I see >> that although the main crazyflie application doesn't use the secondary >> stack, the support library does; and sure enough, it's string >> catenation, in one place, in the logging subsystem. Could have been >> avoided by careful assignment to slices of a fixed string. > > So GNAT did not complain about the support library violating > No_Secondary_Stack? > > Perhaps someone should report this to AdaCore... I'll put it on my > to-do-list, for the SPARC/LEON compiler case. Hold fire on that! the restriction was only applied in the application project, not the support library. When I applied the retriction to the support library, it found 12 units that couldn't be compiled: only one of these was in Ada_Drivers_Library (stm32-board.adb; but there were 3 spec files that failed the check).