COFF and ELF
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: COFF and ELF

  1. #1
    Join Date
    Jun 2008
    Posts
    7

    COFF and ELF

    I am trying to get info out of the .exe or the .obj files that I am not sure is actually in the output file produced by dumpBin. I am looking at .exe and .obj files produced by Microsoft C++ right now to try to get familiar with COFF, but here is what I really need: I am going to get an .exe or .obj from another group, and those files are being created by the Greenhills Multi C compiler. I'm still trying to find out exactly what it's going to give me, I believe its default format is ELF, but there is an ELF-to-COFF utility (still investigating that). So, I will be using Microsoft Visual Studio 2008 -- either C++ or C# to write a program that extracts "symbols" out of the Greenhills' ELF or COFF file. Maybe I'm not using the right terminology when I say "symbols", because I am not interested in seeing functions, what I need to pull out is actually types. For example, if the user in the Greenhills code has defined a type:

    typedef struct my_own_type
    {
    int nMem1;
    double dMem2;
    char dMem3;
    } myOWNtype;

    I need to yank that info out of COFF file. I need to parse the file to determine if this thing is a typedef, then I will need to collect information about it. I need to be able to collect information about this type, so when I later see an object declared of this type, I will be able to relate it to this type, and know what that object's makeup is.

    Another way to do this would be to parse all the header files and implementation files to do this same thing, but that seems like it would be more tedious.

    Perhaps there is a commercially available tool that already does this?

    Thanks to anyone who can shed some light on this.

  2. #2
    Join Date
    Feb 2002
    Posts
    4,640

    Re: COFF and ELF

    I don't believe that is possible. All "type" information is usually optimized away. Actually, I take that back, if there is some kind of RTTI (Run-Time Type Information) available you might be able to do this, however I'm not familiar with the Greenhills Multi C compiler.

    Viggy

  3. #3
    Join Date
    Jun 2008
    Posts
    7

    Cool Re: COFF and ELF

    Thank you Mr. Viggy ... I'll continue to search for a solution.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center