I would like to be able to check the format of an object file from within my C code so that I can use different functions for reading the file based on whether it is COFF or ELF format.
Is this possible, and if so, how would I do it?
This is in Linux btw if that makes any difference.