Questions tagged [coff]

COFF (Common Object File Format) is a file format for files containing machine code.

COFF is a file format originally used by early Unix systems for program objects and shared libraries. COFF has been largely superseded by ELF on modern unix-like systems.

COFF is in use in the Windows family of operating systems, in the form of the Windows™ Portable Executable format. It is also used in some embedded development environments.

101 questions
41
votes
2 answers

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
Scott J
  • 3,402
  • 4
  • 22
  • 14
24
votes
1 answer

Usage differences between. a.out, .ELF, .EXE, and .COFF

Don't get me wrong by looking at the question title - I know what they are (format for portable executable files). But my interest scope is slightly different MY CONFUSION I am involved in re-hosting/retargeting applications that are originally from…
ha9u63a7
  • 6,233
  • 16
  • 73
  • 108
19
votes
4 answers

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.
PJT
  • 3,439
  • 5
  • 29
  • 40
13
votes
1 answer

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…
Sambatyon
  • 3,316
  • 10
  • 48
  • 65
13
votes
3 answers

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://wjradburn.com/software/
wozname
  • 213
  • 3
  • 10
12
votes
3 answers

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 ?
est
  • 11,429
  • 14
  • 70
  • 118
7
votes
1 answer

How do relocations work in COFF object (not image) files

What steps exactly are taken by the linker while resolving relocations in an object file before creating the final image? More specifically, how does the linker treat the value which is already stored at the relocation site? Does it always add it to…
7
votes
2 answers

Linker error "contains invalid OMF record"

In C++ Builder when I compile I get [ilink32 Error] Error: 'C:\PATH\TO\A\LIB\INCLUDED\IN\THE\PROJECT\ALIBRARY.LIB' contains invalid OMF record, type 0x21 (possibly COFF) When I convert .lib with utilities coff2omf, new lib looses significant…
Yaroslav Vozyka
  • 71
  • 1
  • 1
  • 2
7
votes
3 answers

How do I check if an object file is in COFF or ELF format from within C?

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…
Chris
  • 402
  • 1
  • 5
  • 18
6
votes
1 answer

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.
jdehaan
  • 19,700
  • 6
  • 57
  • 97
6
votes
1 answer

How do I assemble GAS assembly and link it with the Open Watcom C library?

I am trying to produce 16-bit DOS executables, but using the gcc compiler. So I am using the ancient gcc-4.3 ia16 port. I made a Docker image of my build: https://registry.hub.docker.com/u/ysangkok/ia16-gcc-rask Here's what I am trying: host $ mkdir…
Janus Troelsen
  • 20,267
  • 14
  • 135
  • 196
5
votes
3 answers

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

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…
udpsunil
  • 1,375
  • 2
  • 16
  • 29
5
votes
2 answers

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…
Jason S
  • 184,598
  • 164
  • 608
  • 970
5
votes
0 answers

Loading symbols for hotpatched code from .pdb or .obj

I'm currently working on a tool that allows me to change C++-code on the fly. Changed files are compiled in the background, loaded from the .obj, relocated & linked, and patched into the running process. This works fine so far. However, I have been…
5
votes
2 answers

What's the difference between the import table, import adress table, and import name table?

When disassembling/dumping exe I get three tables in the .idata import section: import table (IT) import adress table (IAT) import name table (INT) I understand what the IAT and INT are, but what is IT more exactly? Could someone provide…
1
2 3 4 5 6 7