problem with 64 bits binary
jerome duquennoy <jerome.duquennoy <at> wanadoo.fr>
2007-09-27 08:31:14 GMT
I have a serious problem with gnat on solaris 9 :
I need to compile my code in 64bits mode.
So, in the gpr file, I added the m64 and RTS=rts-m64 options.
The RTS=rts-m64 don't seem to work, I had to export ADA_INCLUDE_PATH and ADA_OBJECTS_PATH to be able to link my soft.
Now, my code is compiled in 64 bits, and the executable linked. It is seen by the OS as a 64bits sparcv9 binary :
bash-2.05$ file factory
factory: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped
But when I launch the binary, it immediately crashes (core dump).
GDB told me it crashed on b~factory.adb, line 2152 :
Program received signal SIGSEGV, Segmentation fault.
0x0000000100434ea4 in main (argc=0, argv=(system.address) 0x0, envp=(system.address) 0x0) at b~factory.adb:2152
2152 function main
This line is :
2152: function main
2153: (argc : Integer;
2154: argv : System.Address;
2155: envp : System.Address)
2156: return Integer
How can a program crash on the main function header ???
Can the binary code be invalid ?
The 32 bit version executes fine on the same OS, compiled with the same version of gnat (GNAT Pro 5.04a1).
Thanks for your help !
help-gnat mailing list
help-gnat <at> gnu.org