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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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: =?UTF-8?Q?Bj=c3=b6rn_Lundin?= Newsgroups: comp.lang.ada Subject: Re: Kernel Syscall from Ada? Date: Thu, 23 Jun 2016 12:58:05 +0200 Organization: A noiseless patient Spider Message-ID: References: <2048d6d6-04e2-4e2c-9483-e3769da59781@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 23 Jun 2016 10:58:06 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="6a09ccc49493ecf301ef65af9aa456c7"; logging-data="1748"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/r71ksPcnXv1LiOMffPyxE" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 In-Reply-To: <2048d6d6-04e2-4e2c-9483-e3769da59781@googlegroups.com> Cancel-Lock: sha1:0NKUE3krvqkGwZgz0xw5Oyc0QOU= Xref: news.eternal-september.org comp.lang.ada:30892 Date: 2016-06-23T12:58:05+02:00 List-Id: On 2016-06-23 10:36, Diogenes wrote: > Is there a simple way to make a direct (Linux)Kernel syscall from Ada without using the system C library? i.e. Make a direct call as in Assembler? > > I'm asking because I've found a way to strip about 80k from a statically linked executable by not including Interfaces.C in the runtime. > > I've gotten my code to work reasonably well (no segfaults or memory errors) using inline Assembler. But it seems like there should be an Abstract or Generic "syscall" feature as part of the System library that we could use for doing our own Kernel calls. Same thing for the vDSO. > > Any tips? > > Diogenes > pragma import ? -- -- Björn