Question

I am having a two c program file temp1.c and temp2.c. I compiled and generated dot o files for this temp1.o and temp2.o. After that I genrated final.o and final.a by combining these two dot o files. Now these two static libraries are working fine.

Now nm report of final.a is displaying all file names and symbols. But nm report of final.o is not displaying filenames, its displaying only symbols.

What is the way to get the list of file names which I used for creating final.o.

Was it helpful?

Solution

If we create .a file from .o files(temp1.o and temp2.o) then the .a will have the file name of all .o files and its content. But while creating .o from some .o files, then it will contain only content of all .o files and the file names of each .o will not be present.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top