This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

g++ 3 name mangling


Hi,

is there an easy (and generic) way in gcc to provide an __asm__ statement
with the mangled name of a c++ method ?

One of the problems I encounter in gcc3 is that the length of the name
is now included in the name, which makes it not trivial to create
assembler stubs for c++ function when the length of the final name may vary.

(The example comes from Mozilla :)

in 2.95.3,
'nsresult nsXPTCStubBase::StubZ()' gets translated into

StubZ__14nsXPTCStubBase  (replace Z with 5, 55, 555)

in 3.0.4 it becomes
_ZN14nsXPTCStubBase5Stub5Ev
_ZN14nsXPTCStubBase6Stub55Ev
_ZN14nsXPTCStubBase7Stub555Ev


Greetings,
--
Jeroen Dobbelaere
Embedded Software Engineer

ACUNIA Embedded Solutions
http://www.acunia.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]