comp.lang.ada
 help / color / mirror / Atom feed
From: Mark Lorenzen <mark.lorenzen@gmail.com>
Subject: Re: Loadable module in Ada.
Date: Thu, 3 Dec 2009 05:40:17 -0800 (PST)
Date: 2009-12-03T05:40:17-08:00	[thread overview]
Message-ID: <3f7376da-6666-446d-a1f5-4e6cad8165d1@a21g2000yqc.googlegroups.com> (raw)
In-Reply-To: 2009120301362116807-stevenshack@stevenshackcom

On 3 Dec., 10:36, Steven Shack <stevensh...@stevenshack.com> wrote:
> I'd like to create a loadable module in an Ada program. I've searched
> around, but can't
> seem to find any examples of this. Say I've got some calculation or a
> driver and I'd like to have
> multiple different versions of it with the same interface. I'd like to
> be able to load and replace
> these modules at runtime.
>
> In C I'd do this with pic code, dlsym and function pointers. I can't
> seem to find the equivalent
> in Ada. Can anyone help me out?
>
> Thanks

I'm not sure what you mean by loadable module, but if you mean dynamic
linking at run-time, you should take a look at this very interesting
article:
http://www.adacore.com/wp-content/uploads/2005/04/dynamic_plugin_loading_with_ada.pdf

Note that you will of course still need support from the OS, so there
is no pure Ada
solution, just as there is no pure C solution (the dl* system calls
just happen to
have a C API).

- Mark



  parent reply	other threads:[~2009-12-03 13:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-03  9:36 Loadable module in Ada Steven Shack
2009-12-03 10:00 ` xavier grave
2009-12-03 10:49   ` Steven Shack
2009-12-03 13:40 ` Mark Lorenzen [this message]
2009-12-03 20:06 ` Pascal Obry
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox