comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: "duplicated external tag"
Date: Tue, 29 May 2012 16:38:31 +0100
Date: 2012-05-29T16:38:31+01:00	[thread overview]
Message-ID: <m2k3zvt2tk.fsf@pushface.org> (raw)
In-Reply-To: 8f40f59a-0086-4065-a984-6c834114f69e@3g2000vbx.googlegroups.com

Anders Jansson <proara2@gmail.com> writes:

> I have a application that explicitly loads other Ada-Dll's (built as
> relocatables with GPR files and gprbuild) in GNAT 6.5.0.

Given that version of GNAT, I'd have thought you could get an answer
from AdaCore?

> When I try to load the same Dll the second time, Ada Elab generates
> exception "Program Error" with message "duplicated external tag"!
> I have tried to move all "tagged" types away from the visible/exported
> side of the Dll's, so it just have the entry points needed. I use
> a .def file to limit the visible entry points.
> And these entry points are only 5 procedures/functions!
> So here's the question!
> Is there any way to supress the elaboration checks on "tagged" types,
> so that I can load as many Dll's as needed?
> Or can this be done in anyother way?

From a position of some ignorance, I would have thought you should put
the offending tagged types into DLLs of their own, so that each DLL only
gets loaded once.

In GCC 4.7.0, a-tags.adb has the comment

      --  Verify that the external tag of this TSD is not registered in
      --  the runtime hash table.

(TSD is "type-specific data"), and I guess the "runtime hash table" is
in the Ada RTS and shared by all DLLs, hence your problem.

debug.adb says that the compiler flag -gnatdQ suppresses the runtime
check.



      reply	other threads:[~2012-05-29 15:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-29 11:42 "duplicated external tag" Anders Jansson
2012-05-29 15:38 ` Simon Wright [this message]
replies disabled

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