Migration of binary file from Sunos 5.8 to Sunos 5.9

I have compiled binary file using "cc" on SunOS 5.8 and the same binary file i have copied to SunOS 5.9 and it is giving me core dump error.I want to know whether migration of compiled code from lower version to higer version created this problem. how can i solve this problem.I am pasting the core dump file for reference

------------------------------------------------------------------
A loadobject was found with an unexpected checksum value.
See `help core mismatch' for details, and run `proc -map'
to see what checksum values were expected and found.
dbx: warning: Some symbolic information might be incorrect.
dbx: warning: could not initialize thread debugging library -- generic libthread_db.so error
dbx: warning: thread related commands will not be available
dbx: warning: see `help lwp', `help lwps' and `help where'
t@null (l@1) terminated by signal SEGV (Segmentation Fault)
0xfe7e5f8c: _cancelon : save %sp, -96, %sp
Current function is l32_cleanup
1031 fprintf(global_stats.log_fp, "*************************************** \n");(dbx) where
[1] _cancelon(0x4, 0x0, 0x0, 0x0, 0x1, 0x0), at 0xfe7e5f8c
[2] _thr_exit_common(0xfe7f8b84, 0x0, 0xfe5c0590, 0xfe7f8000, 0x0, 0x0), at 0xfe7e1d00
[3] _thr_suspend_allmutators(0xfe5c0590, 0xfe4a0000, 0x0, 0xfe5bc000, 0x0, 0x0), at 0xfe7e2700
[4] extract_format(0x2008, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfe546c98
[5] _wrtchk(0x31fb8, 0x0, 0x0, 0xfe5bc000, 0xfe5bc000, 0x0), at 0xfe58f154
[6] _doprnt(0x20930, 0xffbff96c, 0x31fb8, 0xfe5bc000, 0x0, 0x0), at 0xfe58501c
[7] vprintf(0x31fb8, 0x20930, 0x0, 0x0, 0xfe546cac, 0xfe5a0054), at 0xfe588614
=>[8] l32_cleanup(), line 1031 in "geserve.c"
[9] main(), line 191 in "geserve.c"
----------------------------------------------------------------------

I dont think so... porting an binary to higher version would in no way cause a core dump.

binary image in your case is purely generated due to SIGSEGV - 11
and in a printf statement can u please review ur printf statement or if possible can u please post the part of the source code.

Even though there are cases where you would encounter core being dumped when a binary is being ported to higher version

1)when dependices are not checked
2)POSIX standards are not defined in case you are using threading in your code
3)permissions are not properly set for you to read database libraries

these are some of the examples.

Please let us know how u proceed.