* "duplicated external tag"
@ 2012-05-29 11:42 Anders Jansson
2012-05-29 15:38 ` Simon Wright
0 siblings, 1 reply; 2+ messages in thread
From: Anders Jansson @ 2012-05-29 11:42 UTC (permalink / raw)
Hi!
I have a application that explicitly loads other Ada-Dll's (built as
relocatables with GPR files and gprbuild) in GNAT 6.5.0.
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?
/Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: "duplicated external tag"
2012-05-29 11:42 "duplicated external tag" Anders Jansson
@ 2012-05-29 15:38 ` Simon Wright
0 siblings, 0 replies; 2+ messages in thread
From: Simon Wright @ 2012-05-29 15:38 UTC (permalink / raw)
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-29 15:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-29 11:42 "duplicated external tag" Anders Jansson
2012-05-29 15:38 ` Simon Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox