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!feeder.eternal-september.org!feeds.phibee-telecom.net!ecngs!feeder2.ecngs.de!81.171.118.64.MISMATCH!peer04.fr7!news.highwinds-media.com!fx18.fr7.POSTED!not-for-mail Subject: Re: Kernel Syscall from Ada? Newsgroups: comp.lang.ada References: <2048d6d6-04e2-4e2c-9483-e3769da59781@googlegroups.com> From: Per Sandberg User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------8F35A47C49B5F6F491B6BA0F" Message-ID: X-Complaints-To: abuse@usenet.se NNTP-Posting-Date: Thu, 23 Jun 2016 16:28:03 UTC Organization: usenet.se Date: Thu, 23 Jun 2016 18:28:03 +0200 X-Received-Bytes: 2272 X-Received-Body-CRC: 1297358335 Xref: news.eternal-september.org comp.lang.ada:30895 Date: 2016-06-23T18:28:03+02:00 List-Id: This is a multi-part message in MIME format. --------------8F35A47C49B5F6F491B6BA0F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit The attached makefile may provide some initial directions in addition to "pragma import". /Per Den 2016-06-23 kl. 12:58, skrev Björn Lundin: > 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 ? > > --------------8F35A47C49B5F6F491B6BA0F Content-Type: text/plain; charset=UTF-8; name="Makefile" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="Makefile" YWxsOgoJcm0gLWYgKi5hZHMgKi5hbGkgKi5vICouZCAKCShjZCAvdXNyL2luY2x1ZGUgOyBm aW5kIHN5cyAtdHlwZSBmKSB8IGdyZXAgLXYgLWUgdm04Ni5oIC1lIGVsZi5oIHwgc2VkIC1l ICJzLV4tI2luY2x1ZGUgPC0iICAtZSAicy1cJCQtPi0iID5nZW4uYwoJZ2NjIC1jIGdlbi5j IC1mZHVtcC1hZGEtc3BlYyAtZmFkYS1zcGVjLXBhcmVudD1rZXJuZWwKCXJtIC1mICouYyAq Lm8KCg== --------------8F35A47C49B5F6F491B6BA0F--