Hello!

I've been trying to strip an executable created with DMD from symbols. Has 
anyone any experience with this?

I can't seem to rid my execs of more or less containing the entire class-tree. 
Example:

// sym.d - - - -
import std.stdio;
class Bunny{
        int x;
        int getX()
        {
                return x;
        }
}
void main()
{
        auto b = new Bunny();
        writefln("Hello %d", b.getX() );
}

// - - - - - (OSX 10.6)

# dmd -release sym
# strip sym
# nm sym | grep Bunny
000028c8 T _D3sym5Bunny4getXMFZi
# _

// - - - - -

This was of course a simplified example. I tried putting "private" in front of 
the class, but that didn't change anything.

Any ideas? I'm just lost. Is it the same on Linux?

Or maybe this is one of those "features" that allows D to call functions by 
name or something? I see "T" is a text entry, by reading the man-pages..

(I suppose it really doesn't matter, but if possible I'd like to not expose 
function and class names in my binaries, for (I think) obvious reasons.)


Kind regards
/HF




Reply via email to