This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: advice needed regarding c++ name mangling
- From: Razya Ladelsky <RAZYA at il dot ibm dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Daniel Berlin <dberlin at dberlin dot org>, gcc at gcc dot gnu dot org, Nathan Sidwell <nathan at codesourcery dot com>
- Date: Sun, 13 Mar 2005 10:54:24 +0200
- Subject: Re: advice needed regarding c++ name mangling
Mark Mitchell <mark@codesourcery.com> wrote on 11/03/2005 04:55:38:
> Daniel Berlin wrote:
>
> > As for why the new name doesn't work, it's not clear from the above.
> > I'd need to see the assembly and the error.
> > :)
>
> Likewise. I assume these functions have only internal linkage? Or that
> the original function is still provided with external linkage? (I'm
> just checking that we're not breaking the ABI.)
>
These functions indeed have only internal linkage.
The error I get is :
/tmp/cc9VryOe.s: Assembler messages:
/tmp/cc9VryOe.s:11056: Error: unrecognized symbol type ""
/tmp/cc9VryOe.s:11056: Warning: rest of line ignored; first ignored
character is `<'
/tmp/cc9VryOe.s:11057: Error: Unrecognized opcode: `operator<<.589:'
/tmp/cc9VryOe.s:11392: Error: expected comma after name `operator' in
.size directive
/tmp/cc9VryOe.s:11392: Warning: rest of line ignored; first ignored
character is `<'
/tmp/cc9VryOe.s:11444: Error: unrecognized symbol type ""
/tmp/cc9VryOe.s:11444: Warning: rest of line ignored; first ignored
character is `<'
/tmp/cc9VryOe.s:11445: Error: Unrecognized opcode: `operator<<.585:'
/tmp/cc9VryOe.s:11849: Error: expected comma after name `operator' in
.size directive
/tmp/cc9VryOe.s:11849: Warning: rest of line ignored; first ignored
character is `<'
the relevant assembly code (a similar assembly is produced for happens
for operator<<.589):
.section
.text._ZNSt13basic_ostreamIN9__gnu_cxx9characterItj11__mbstate_tEESt11char_traitsIS3_EElsEb
.section
.text._ZNSt13basic_ostreamIN9__gnu_cxx9characterItj11__mbstate_tEESt11char_traitsIS3_EElsEl,"ax",@progbits
.align 2
.type operator<<.585, @function
operator<<.585:
.LFB3983:
.loc 22 125 0
.LVL864:
mflr 0
.LCFI384:
stwu 1,-96(1)
.....
The caller's part:
......
.LEHE165:
mr 3,31
bl _ZNSt6localeD1Ev
.LBB4727:
.loc 14 98 0
mr 3,25
li 4,500
.LEHB166:
bl operator<<.585
.LEHE166:
.LBB4728:
.LBB4729:
.LBB4730:
......
Thanks,
Razya
> --
> Mark Mitchell
> CodeSourcery, LLC
> mark@codesourcery.com
> (916) 791-8304