C++ areas again

Peter Naulls peter at chocky.org
Wed Dec 8 09:19:24 PST 2004


In message <3565.213.122.75.71.1102511844.squirrel at 213.122.75.71>
          "Nick Burrett" <nick at sqrt.co.uk> wrote:

> but because you haven't compiled SuperTux with -mpoke-function-name, there
> is a size mismatch and therefore a code mismatch.
> 
> The solution is as follows:
> 
> In gcc/gcc/config/arm/riscos-aof.h, modify the macro
> ASM_DECLARE_FUNCTION_NAME().  Change the line:
> 
>    if (TARGET_POKE_FUNCTION_NAME)
> to
>    if (TARGET_POKE_FUNCTION_NAME && in_text_section ())
> 
> and re-compile everything.  This code change will only output a function
> name for standard code segments.  Code segments in COMDEF, LINKONCE
> sections will not have an embedded function name.  Though not perfect and
> could potentially make stack-backtraces slightly less readable, I don't
> really see a better solution.

Well, that certainly sounds correct, and I've put the patch in as well
as fixed drlink, but it doesn't seem to have fixed the root problem.
I'm pretty sure I've rebuild everything relevant:

Error: Size of common area 'C$$.gnu.linkonce.t._ZN6BadGuyD1Ev' in 'leveleditor.o' differs from definition in 'badguy.o' (240 != 224))
Error: Size of common area 'C$$.gnu.linkonce.t._ZN6PlayerD1Ev' in 'world.o' differs from definition in 'player.o' (240 != 224))
Error: Size of common area 'C$$.gnu.linkonce.t._ZNSt6vectorIP7SurfaceSaIS1_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS1_S3_EERKS1_' in 'tile.o' differs from definition in 'button.o' (912 != 908))
Error: Size of common area 'C$$.gnu.linkonce.t._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6_' in '/usr/src/gccsdk/arm-riscos-aof/gcc-3_4/libstdc/stage2/apcs32/arch3/unixlib/string-inst.o' differs from definition in 'level.o' (300 != 268))
Error: Size of common area 'C$$.gnu.linkonce.t._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S8_' in '/usr/src/gccsdk/arm-riscos-aof/gcc-3_4/libstdc/stage2/apcs32/arch3/unixlib/string-inst.o' differs from definition in 'level.o' (256 != 208))


It's interesting that the 3rd size difference is only 4 bytes.

-- 
Peter Naulls - peter at chocky.org        | http://www.chocky.org/
----------------------------------------------------------------------------
Drobe - http://www.drobe.co.uk/        | The Premier RISC OS News Site



More information about the gcc mailing list