From: "Gene" <gene.ressler@gmail.com>
Subject: Re: Linking Ada with large Assembler libs?
Date: 25 Feb 2007 14:47:46 -0800
Date: 2007-02-25T14:47:46-08:00 [thread overview]
Message-ID: <1172443666.325188.312920@z35g2000cwz.googlegroups.com> (raw)
In-Reply-To: <1172093396.490201.203630@a75g2000cwd.googlegroups.com>
On Feb 21, 4:29 pm, "freejack" <freej...@tds.net> wrote:
> The Machine Code Insertions sections of the relevant reference manuals
> have been informative.
>
> However, I'm linking my Ada code with pre-existing libs written in
> Assembler. The GNAT manuals are a little sketchy on how to do this
> properly. I'm using NASM and FASM Assembler code. Most of the
> Assembler code deals primarily with I/O. I'm using Pragma No_Run_Time
> and writing my own Binder files, with a good bit of success.
> It's not such a big problem, as I can do it by fiddling with the
> linker and manipulating the object code. But the result is messy and
> error prone.
>
> What are the best methods you guys have come up with for doing this
> sort of manipulation?
>
> freejack
> Chris
Add a C-call compliant shim layer to your existing lib code. Writing
this in C + embedded assembly is a good idea of possible. Compile and
link to make C-callable static or dynamic libs. In Ada, Import and
link the shims just as any C function.
next prev parent reply other threads:[~2007-02-25 22:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-21 21:29 Linking Ada with large Assembler libs? freejack
2007-02-25 22:47 ` Gene [this message]
2007-03-08 8:58 ` Rolf
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox