regarding symbol table

John (Eljay) Love-Jensen
Thu Apr 23 11:25:00 GMT 2009

Hi ranjith kumar,

> 1) Given an executable file(say a.out) is it possible from which files
> that executable is produced?

No, not as far as I am aware.

You could add static volatile strings in your source code, which would
indicate their origins:

static char* volatile whence = __FILE__;

Then you could a utility like strings (/usr/bin/strings) to find them:

strings a.out

> Given the executable file only, can we know any way that MYTYPE is a
> datatye defined in the .c file?

No, not as far as I am aware.  (Short of disassembling the source code and
reverse engineering it.)

That's what the source code and headers are for.


More information about the Gcc-help mailing list