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!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Protected Objects and Interrupt Handlers Date: Thu, 25 Feb 2016 19:49:59 +0000 Organization: A noiseless patient Spider Message-ID: References: <7663896a-a15e-47fd-8c7e-54a1c20d8d0f@googlegroups.com> <2922ffdd-9678-4502-9bcb-8b199af91543@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="03d977edd803a9f1bf346d48fa393156"; logging-data="26513"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18nbXf4IfOJNJDil8VYF66OubhUDallcDU=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:UKn1914pHufirdC5f6TMnP+Is4s= sha1:KKQUzxtQ3VUHXitkPshfUzPF3yE= Xref: news.eternal-september.org comp.lang.ada:29612 Date: 2016-02-25T19:49:59+00:00 List-Id: Tero Koskinen writes: > For example in the normal case, you can have all the startup code in C > (or in Ada, which is then exported to C) Actually, very little even needs exporting to C! I had one that I've given convention Asm (it's invoked by the linker script), but I'm not at all sure it needs it. Mind you, procedure Program_Initialization with Export, Convention => Asm, External_Name => "program_initialization", No_Return; pragma Machine_Attribute (Program_Initialization, "naked"); procedure Program_Initialization is begin -- _estack: the first address after the top of stack space System.Machine_Code.Asm ("ldr sp, =_estack", Volatile => True); Complete_Program_Initialization; end Program_Initialization; probably isn't going to cause much trouble anyway.