coff

In COFF file format, what is the significance of relocation info section

Hi, I am reading about COFF file formats, which is commonly used to create an executable file format (it has some variants also). While reading, I came across the relocation section of the format. How is this relocation section used to create an executable file. It would be very useful if you point me to some links which will help me...

in Java: programmatically determining addresses of C/C++ variables given a COFF/ELF/DWARF executable

This is a situation I run into now and then: For an embedded system which does not use virtual addressing, I have an executable file that was compiled from C or C++ code with debugging information included. It's usually in COFF or ELF/DWARF (I get those two mixed up) format. At runtime, on a PC, I would like to determine the address of...

What's the difference between the OMF and COFF format?

Recently I've been maintaining a legacy project written in VC++ 6.0. The code uses so many unique characteristics of this compiler that porting it to a more recent standard compiler has proved to be an herculean task. Among the thousands lines of code in the project, there are four assembler files. For some reason I don't understand, no...

.NET library to access PE header

In order to automate some tasks I'm looking for a library which can let me read and manipulate (add/rename/remove sections,...) a PE header from a .NET application. If possible, I'd rather use something that can be redistributed without source code and I'm open to commercial solutions as long as they're royalty-free and don't require lic...

Invalid COFF header - .NET Assemblies

I compiled an ASP .NET MVC project and received all sorts of weird errors. After investigation I found that when I looked at the assembly with Reflector, it showed me an error ‘Invalid COFF header’. What can the possible cause be as the assemblies are essentially corrupt and do not work at all. Any ideas what could cause this? ...

How do I get source file information with dumpbin /symbols when compiling with VS 2005?

I have a tool which uses the output of dumpbin /symbols to do some dependency analysis with our C/C++ libraries. When we compiled the libs with VS 6.0, the dumpbin COFF SYMBOL TABLE contained entries like 000 00000008 DEBUG notype Filename | .file x:\mydir\mysource.c allowing me to get the relationship between sources a...

What is the COMDAT section used for?

I see the /Gy option and am wondering why I would use it? http://msdn.microsoft.com/en-us/library/xsa71f43.aspx ...

COFF on Linux or ELF on Windows

Is it possible to run the COFF executable files on UNIX or the ELF executable files on Windows? And what would be the steps to be able to run either file type on Windows and UNIX. I'm just curious. ...

PE Header Requirements

What are the requirements of a PE file (PE/COFF)? What fields should be set, which value, at a bare minimum for enabling it to "run" on Windows (i.e. executing "ret" instruction and then close, without error). The library I am building first is the linker: Now, the problem I have is the PE file (PE/COFF). I don't know what is "required"...

Has anyone been able to create a hybrid of PE COFF and ELF?

I mean could a single binary file run in both Win32 and Linux i386 ? ...

What COFF (windows .obj object file) viewers are available?

I am only aware of 2: dumpbin which is included with Visual Studio PEView from http://www.magma.ca/~wjr/. ...

Why is my PE file invalid?

I already asked a similar question, "PE Header requirements", but I'm not really satisfied with it's answer. I am building an assembler/linker, in Java SE 1.6. I have read about 5 different documentations/specifications about the PE/COFF header and file format, but I'm stuck at a problem: My generated file is not valid, says Windows: "...

the executed section

How can I retrieve in exe file point where IP is pointing to on the beginning ?? Is it pointing always on the start of .text segment ? ...

Disassemble Microsoft Visual Studio 2003 compiler output

I'm seeing what I think is strange behaviour from object files output by the Microsoft Visual Studio 2003 tools. The file utility tells me: asmfile.obj: 80386 COFF executable not stripped - version 30821 For objects created by the assembler, but for objects coming from C files, I get just: cfile.obj: data Using Microsoft's dumpbin...

Question about COFF Externs

The Microsoft PE / COFF SPEC (v8, section 5.4.4) says that when a symbol has: A storage class of IMAGE_SYM_CLASS_EXTERNAL And a section number of 0 (IMAGE_SYM_UNDEFINED) It's "value" field (in the symbol table) "indicates the size". This confuses me. In particular, I'm wondering "indicates the size of what?". Generally, IMAGE_SYM_C...

Microchip PIC C18 Programming File Format .COFF vs .HEX

I am developing code in the MPLAB IDE and I was wondering if it is better to program a chip using the .COFF or .HEX file generated by the compiler. I'm not sure what the difference is between the two and I am assuming they will both perform the same job. ...

What is the __NULL_IMPORT_DESCRIPTOR good for (MSVC map file)?

I have a map file generated with microsoft visual studio. It contains a relatively big area named __NULL_IMPORT_DESCRIPTOR. What is this good for? It has something to do with linked dlls but I cannot figure out the exact purpose of it. ...