ipo: warning #11010: file format not recognized

ipo: warning #11010: file format not recognized

Hi,

I went in to an eclipse indigo project which builds fine and turned on the setting to generate assembly output files. I did this through the "Settings" menu and then "Output files". After selecting assembly and source, the compiler option included -S. However, now when I build the project I get the below. If I remove the desire to output the assembly file, the project will build. What is wrong?

make -k all
Building file: ../src/Main.cpp
Invoking: Intel Intel(R) 64 C++ Compiler
icpc -g -S -MMD -MP -MF"src/Main.d" -MT"src/Main.d" -c -o "src/Main.o" "../src/Main.cpp"
Finished building: ../src/Main.cpp

Building target: isdigittest
Invoking: Intel Intel(R) 64 C++ Linker
icpc -L/usr/lib/x86_64-linux-gnu -o "isdigittest" ./src/Main.o -lrt
ipo: warning #11010: file format not recognized for ./src/Main.o
ld:./src/Main.o: file format not recognized; treating as linker script
ld:./src/Main.o:1: syntax error
make: *** [isdigittest] Error 1
make: Target `all' not remade because of errors.

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

If you look at the file src/Main.o, you'll find that it's the assembly listing you requested via -S.  From the icc man page description of the -o option:  "If -S is specified, it specifies the name of the generated assembly listing file."  When you use -S in a compilation, an object file suitable for linking is not generated.

Quote:

Jeff Arnold (Intel) wrote:

If you look at the file src/Main.o, you'll find that it's the assembly listing you requested via -S.  From the icc man page description of the -o option:  "If -S is specified, it specifies the name of the generated assembly listing file."  When you use -S in a compilation, an object file suitable for linking is not generated.

Hi- thanks for the prompt response. So how can I build/link as well as generate the assembly output? You answer sounds like I can only build to generate the assembly, or build to execute the program- I cannot do both in one step?

icpc knows how to make .o from .s file but assumes a .o file needs no more processing before sending to ld.  If you would change Main.o to Main.s you would have a chance.

Hi TC,

I can "reproduce" the issue. The solution to generate assembly code and continue link correctly is to use "-Fa" option. In eclipse, you can check another option under the "Settings" menu and then "Output files" (which is "Generate Assembler Source and Binary Files").

Let me know if you cannot find the option, and I acn provide you a screenshots. But it is easy to find it...as it is just under the option you selected (-S).

Thanks,

Shenghong

 

**** Build of configuration Release for project test ****

make -k all
Building file: ../src/test.c
Invoking: Intel Intel(R) 64 C Compiler
icc -Fa -MMD -MP -MF"src/test.d" -MT"src/test.d" -c -o "src/test.o" "../src/test.c"
Finished building: ../src/test.c
 
Building target: test
Invoking: Intel Intel(R) 64 C Linker
icc  -o "test"  ./src/test.o  
Finished building target: test
 

**** Build Finished ****

Quote:

shenghong-geng (Intel) wrote:

Hi TC,

I can "reproduce" the issue. The solution to generate assembly code and continue link correctly is to use "-Fa" option. In eclipse, you can check another option under the "Settings" menu and then "Output files" (which is "Generate Assembler Source and Binary Files").

Let me know if you cannot find the option, and I acn provide you a screenshots. But it is easy to find it...as it is just under the option you selected (-S).

Thanks,

Shenghong

 

**** Build of configuration Release for project test ****

make -k all
Building file: ../src/test.c
Invoking: Intel Intel(R) 64 C Compiler
icc -Fa -MMD -MP -MF"src/test.d" -MT"src/test.d" -c -o "src/test.o" "../src/test.c"
Finished building: ../src/test.c
 
Building target: test
Invoking: Intel Intel(R) 64 C Linker
icc  -o "test"  ./src/test.o  
Finished building target: test
 

**** Build Finished ****

Thank you

Login to leave a comment.