Peter N Lewis wrote:
program peter103;
Compiling with --stack-checking reveals
warning: frame size too large for reliable stack checking warning: try reducing the number of local variables
It crashes in:
0 peter103 0x00002dc4 __darwin_gcc3_preregister_frame_info + 0x354 1 peter103 0x00002e78 _p__M0_main_program + 0x3c 2 peter103 0x00002f2c main + 0x34 3 peter103 0x00002728 start + 0x1c8 4 dyld 0x8fe1a278 _dyld_start + 0x64
the problem goes away when specify -mdynamic-no-pic (applicable for programs, not for dynamic libraries). This options generates more efficient code anyway.
Could someone try duplicating this Linux or Windows perhaps to see if it is PPC only, or can anyone read enough PPC to figure out if the code is correct or not?
Specifying -fPIC (the default on Darwin, but not on all systems).
Regards,
Adriaan van Os