neurobin / shc

Shell script compiler

Home Page:https://neurobin.org/projects/softwares/unix/shc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Produced binaries not work if compiled with -m64 mode

yvoinov opened this issue · comments

Produced binaries not work if compiled with -m64 mode on Solaris 10. And will never work on Solaris 11, because of it is pure 64-bit, without 32-bit ABI.

What does it mean "not work"? Compiled script output show garbage, for example:
// Compiling C-source

gcc -O3 -m64 -c -o ramdisk.sh.x.o ramdisk.sh.x.c -I.

// Linking C-source

gcc -s -m64 -o ramdisk ramdisk.sh.x.o

// Running (should show "# ./ramdisk
Usage ./ramdisk <start|stop|backup|restore>"):

./ramdisk

./ramdisk: 6lkП&*3§1z1C¥