|Supporting Dynamic Linking firstname.lastname@example.org (Robbert Haarman) (2010-11-21)|
|Re: Supporting Dynamic Linking email@example.com (Ian Lance Taylor) (2010-11-22)|
|From:||Robbert Haarman <firstname.lastname@example.org>|
|Date:||Sun, 21 Nov 2010 18:37:22 +0100|
|Keywords:||code, linker, question|
|Posted-Date:||21 Nov 2010 23:06:30 EST|
One of the features I am currently working on for Voodoo is making
currently being worked on is making the Voodoo compiler emit code
suitable for use in dynamic libraries. The main impediment here is that
the linker likes to know the size of objects in a dynamic library, but
Voodoo does not currently provide this information. For example, if one
What is the size that should be reported to the linker for some_label?
Perhaps it is one word. Perhaps two. Perhaps another_label is actually
inside the object that starts at some_label, and the size is actually
3 words. Perhaps it is yet another value. One way to resolve this
would be to surround the part that is to be exported by a data ... end data
would make clear that there are two words in the object that starts at
some_label. Perhaps there should also be a default case; for example,
if no data ... end data block is provided, only the first byte/word/string
after the label is exported.
I would appreciate knowing people's thoughts on this matter. How has
this been solved before? Are any of these solutions particularly suitable
for Voodoo, keeping in mind Voodoo's purpose of combining staying
close to the hardware level with being portable to different architectures?
Give a man a fish and he will eat for a day. Teach a man to fish and he
will eat for a lifetime.
Return to the
Search the comp.compilers archives again.