Executable compiled on solaris 10 not working on solaris 9

Hi
I compiled an executable on Solaris 10 which creates semaphore ( semget)
but it didn't work on solaris 9 , while it is executing sucessfully on solaris 10. It is throwing the system error that Invalid arguments ( system error 22) on solaris 9.
the ldd for the executable on two servers is as follows:-
on solaris 9:-

% pldd 16373
16373:  ./a.out
/.SUNWnative/usr/lib/brand/solaris9/sparcv9/s9_preload.so.1
/usr/lib/sparcv9/libCstd.so.1
/usr/lib/sparcv9/libCrun.so.1
/usr/lib/sparcv9/libm.so.1
/usr/lib/sparcv9/libc.so.1
/usr/lib/sparcv9/libdl.so.1
/usr/platform/sun4u-us3/lib/sparcv9/libc_psr.so.1

on solaris 10:-

% pldd 28447
28447:  a.out
/usr/lib/sparcv9/libCstd.so.1
/usr/lib/sparcv9/libCrun.so.1
/lib/sparcv9/libm.so.1
/lib/sparcv9/libc.so.1
/platform/sun4v/lib/sparcv9/libc_psr.so.1

It is dependant upon this additional preload.so.1 on solaris9
Can anyone suggest what needs to be changed.

You need to compile your code on Solaris 9.

It is an intended target to compile the code on Solaris 10 and install and test on solaris 9 , which is for backward compatibility.

i have question about this also
if i have executable code for program running on linux
shall i execute it in solaris

Compiling in a newer release than the intended target is unsupported.

---------- Post updated at 15:59 ---------- Previous update was at 15:52 ----------

No, or at least not directly. lxrun, lx branded zones or virtual box are potential solutions on x86. Nothing really usable on SPARC.