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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.110.68 with SMTP id m4mr10034029qap.2.1364335042283; Tue, 26 Mar 2013 14:57:22 -0700 (PDT) X-Received: by 10.50.16.71 with SMTP id e7mr632005igd.14.1364335042242; Tue, 26 Mar 2013 14:57:22 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!ca1no8509046qab.0!news-out.google.com!k8ni11100qas.0!nntp.google.com!ca1no8509042qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 26 Mar 2013 14:57:21 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=69.20.190.126; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 69.20.190.126 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Runtime startup code for the GNAT Runtime...and a bit of humble pie. From: Shark8 Injection-Date: Tue, 26 Mar 2013 21:57:22 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2918 Xref: news.eternal-september.org comp.lang.ada:14731 Date: 2013-03-26T14:57:21-07:00 List-Id: On Tuesday, March 26, 2013 3:27:55 PM UTC-6, Diogenes wrote: > Anyone know if there's a list of what parts of the Ada language can be co= mpiled statically without any Runtime whatsoever? That's a very good question. Sadly I have no answer for you -- I know Tasking and certain attributes, li= ke 'Image, need it. >=20 > I realize that the default GNAT installations will link to the runtime re= gardless, but I was wondering if it's possible to write startup code in Ada= with a bit of assembler thrown in(possibly inline)? Thinking of maybe writ= ing an art0.o, art1.o(Ada Runtime, as opposed to crt0.o for the C Runtime). Nah, call it something like "Applied Diversified Ada Runtime" (ADA_Runtime)= ... ;) >=20 > I can get a good bit of it running by linking with musl-libc, but the nex= t step is doing Ada/Assembler startup code followed by direct calls to the = kernel itself.(Using clone() and futex() instead of pthreads for example). That may be a bad call, if I'm reading you right. Wouldn't it be best to write it first in a way so your [hardware] dependenc= ies are in one spot and secondly [and possibly separately] the platform-dep= endence? {IOW, get it to a state where a no-OS body could be supplied as we= ll as an optimized-for-the-OS. Tying your runtime to pthreads [POSIX] early= on might be a rather bad idea... as you don't want to force POSIX on the p= eople who would want bare-metal access [or conceivably their own OS].} >=20 > I'm suspecting I'll be limited to procedures and functions exclusively, b= ut hey, at this level that's all I'll need to get started. That's certainly a good thing.