clang Unexpected output

Hi,

When I type the command:
clang-5.0 -c -o s.o stdio.h (note: stdio.h taken from /usr/include/... )

This creates some output in s.o
The problem is that I don't know what format it is.
objdump cannot read it.

Please can someone tell me what format that file is, and which
clang/llvm tool can be made to read it?

Kind Regards

James

stdio.h should be a pure header file with no functions defined in it at all (they’ll be in some stdio.c somewhere else), and therefore no code generated.

Ahh … if you do that with either gcc or clang without the “-o s.o” then you’ll get a file called stdio.h.gch. WIth gcc “file stdio.h.gch” will tell you…

stdio.h.gch: GCC precompiled header (version 014) for C

I guess clang also made some kind of precompiled header format, but “file” doesn’t know about it.

I couldn’t find something to read them … except clang itself. Make “clang -ast-print” or something like that is useful?