I have a very specialized file written in x86-64 assembly for Linux, compiled under GCC. I need to move that code over to a Visual Studio project and mll64.exe wants the assembly file to be in Intel format.
I have tried to build a cross-platform DLL but it doesn't work:
15:47:19 cpudiag2 > gcc -shared -o my.dll my.o
/usr/bin/ld: my.o: relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC my.o: could not read symbols: Bad value collect2: ld returned 1 exit status
15:47:19 cpudiag2 > gcc -fPIC my.S
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' collect2: ld returned 1 exit status
So then I tried to let GCC decompile from the object file into Intel syntax but that doesn't work either. Both of the following two commands result in decompiled assembly code in the AT&T syntax. Why?
objdump -d -M=intel my.o
gcc -S -masm=intel my.o