Re: Linking Ada with large Assembler libs?
- From: "Gene" <gene.ressler@xxxxxxxxx>
- Date: 25 Feb 2007 14:47:46 -0800
On Feb 21, 4:29 pm, "freejack" <freej...@xxxxxxx> 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.
.
- References:
- Linking Ada with large Assembler libs?
- From: freejack
- Linking Ada with large Assembler libs?
- Prev by Date: Re: Preferred OS, processor family for running embedded Ada?
- Next by Date: Re: recent changes in compiler pricing
- Previous by thread: Linking Ada with large Assembler libs?
- Next by thread: Calling Ada from C
- Index(es):