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 11:16:12 +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="1210"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GOGr8K9R2kN/kj1ocsQEqxHXnSHRfWT8=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:YyK7YdY90q4P9eZvcKC/ISfS2w0= sha1:yFRvkq1MYElmpO7joaVGCTGyZbg= Xref: reader02.eternal-september.org comp.lang.ada:52036 Date: 2018-05-06T11:16:12+01:00 List-Id: 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.