xoreaxeaxeax / movfuscator

The single instruction C compiler
Other
9.29k stars 394 forks source link

Not really working #11

Closed l4l closed 7 years ago

l4l commented 7 years ago

I know it's pretty old fun project, but it would be nice if you can help me. It seems movfuscator can't link the final object file:

$ ./build.sh >/dev/null 2>&1 && echo "int main() {}" > tmp.c && ./build/movcc tmp.c
        ___     ___            ___    ___     ___     ___     ___          ___     ___      
       /\  \   /\  \    ___   /\__\  /\  \   /\__\   /\__\   /\  \        /\  \   /\  \    .
      |::\  \ /::\  \  /\  \ /:/ _/_ \:\  \ /:/ _/_ /:/  /  /::\  \  ___ /::\  \ /::\  \   .
      |:::\  \:/\:\  \ \:\  \:/ /\__\ \:\  \:/ /\  \:/  /  /:/\:\  \/\__\:/\:\  \:/\:\__\  .
    __|:|\:\  \  \:\  \ \:\  \ /:/  /  \:\  \ /::\  \  /  _:/ /::\  \/  //  \:\  \ /:/  /   
   /::::|_\:\__\/ \:\__\ \:\__\:/  / \  \:\__\:/\:\__\/  /\__\:/\:\__\_//__/ \:\__\:/__/___ 
   \:\~~\  \/__/\ /:/  / |:|  |/  /\  \ /:/  // /:/  /\ /:/  //  \/__/ \\  \ /:/  /::::/  / 
    \:\  \  \:\  /:/  / \|:|  |__/\:\  /:/  // /:/  /  /:/  //__/:/\:\  \\  /:/  //~~/~~~~  
     \:\  \  \:\/:/  /\__|:|__|  \ \:\/:/  //_/:/  /:\/:/  /:\  \/__\:\  \\/:/  /:\~~\     .
      \:\__\  \::/  /\::::/__/:\__\ \::/  /  /:/  / \::/  / \:\__\   \:\__\:/  / \:\__\    .
       \/__/   \/__/  ~~~~    \/__/  \/__/   \/__/   \/__/   \/__/    \/__/ __/   \/__/    2

  M/o/Vfuscator2

  github.com/xoreaxeaxeax/movfuscator
  chris domas           @xoreaxeaxeax

M/o/Vfuscation started...

tmp.c:1: warning: missing return value
emit/mov>cnsti4(0)
emit/mov>cnsti4(0)
emit/mov>reti4(cnsti4(0))
emit/mov>labelv(1)

M/o/Vfuscation complete.

/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/bin/ld: cannot find -lc
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: cannot find -lm
turbo commented 7 years ago

The usual procedure applies here:

Rinse and repeat for any searching for -* errors.

incertia commented 7 years ago

Try adding -L/usr/lib32/ (movcc is 32 bit compiler). You also need the multilib libraries for your distribution.

l4l commented 7 years ago

Meh, that was easy :\ thanks and sorry for the dumb issue

CapacitorSet commented 6 years ago

If anyone stumbling across this issue is wondering, like I did, where to add the flag:

movcc [...] -Wl-L/usr/lib32/