[Issue 1508] dmd/linux template symbol issues

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 16 17:03:50 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1508





------- Comment #1 from braddr at puremagic.com  2007-09-16 19:03 -------
$ nm a.o | ../../../demangle/demangle  
00000000 T class a.A a.A._ctor(void*)
00000014 R Z a.A.__init
00000028 R Z a.A.__vtbl
00000060 D Z a.A.__Class
00000026 T void a.A.anything(void*)
00000000 D Z a.I.__Interface
00000000 W void c.C!(char).C.foo(void*)
00000000 V Z c.C!(char).C.__init
00000000 V Z c.C!(char).C.__vtbl
00000000 V Z c.C!(char).C.__Class
         U Z Object.__Class
         U int object.Object.opCmp(class Object, void*)
         U void object.Object.print(void*)
         U uint object.Object.toHash(void*)
         U int object.Object.opEquals(class Object, void*)
         U char[] object.Object.toString(void*)
         U Z ClassInfo.__vtbl
         U void invariant._d_invariant(class Object)
         U __gdc_personality_v0
00000039 t __t12__D1a1A8anythingMFZv.1000
         U _d_newclass

$ nm b.o | ../../../demangle/demangle  
00000000 T class b.B b.B._ctor(void*)
00000010 R Z b.B.__init
00000020 R Z b.B.__vtbl
00000000 D Z b.B.__Class
00000000 W void c.C!(char).C.foo(void*)
00000000 V Z c.C!(char).C.__init
00000000 V Z c.C!(char).C.__vtbl
00000000 V Z c.C!(char).C.__Class
         U Z Object.__Class
         U int object.Object.opCmp(class Object, void*)
         U void object.Object.print(void*)
         U uint object.Object.toHash(void*)
         U int object.Object.opEquals(class Object, void*)
         U char[] object.Object.toString(void*)
         U Z ClassInfo.__vtbl
         U void invariant._d_invariant(class Object)
         U __gdc_personality_v0
         U _d_newclass

$ nm c.o | ../../../demangle/demangle 
<no symbols>
===========

A key difference is that gdc makes the template symbols weak and dmd doesn't.

One thing I failed to note in the original description, perturbing the order of
the .o's on the gcc line affects the results.  a before b works, b before a
doesn't.  When building with gdc, the order doesn't matter.. at least in the
orders I've tried.


-- 



More information about the Digitalmars-d-bugs mailing list