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
0
votes
0 answers

How to convert COFF to OMF?

I have a third party program that has a runtime interface that I can add to my programs. In the directory for the runtime interface is a .lib file and a .hpp file. I have a Borland compiler so I need to convert the files but I am not sure which ones…
FWE1
  • 11
  • 2
0
votes
1 answer

Best way to find code and data sections in COFF object files?

I want to find the CODE and Initialized DATA sections in COFF Object files. The sections that I want to find are called .text$mn and .data in output generated from two versions of Microsoft "c" compilers. I have no idea how consistent this is across…
polcott
  • 143
  • 1
  • 13
0
votes
3 answers

Convert OMF16 to OBJ32

Is there a way to convert from OMF 16 bit object file format to COFF 32 bit object file format?
stdiox
  • 1
0
votes
1 answer

How to create COFF executable (not library) for windows 7

I'm trying to create helloworld C program for windows. I need target executable to be COFF file for some security-related project. Do I use cl.exe? Do I use fasm? Edit: not necessirily compile on windows, anything goes as long as I can run binary …
mizari
  • 1
  • 1
0
votes
0 answers

How to compile an assembly file as a COFF file for AARCH64

I have a simple assembly program for the architecture AARCH64(ARM64). I can use the cross compiler toolchain aarch64-none-elf to compile it as an ELF file. How can I compile it as a COFF file? What kind of toolchain do I need?
0
votes
1 answer

Visual Studio LNK1107: invalid or corrupt file - .obj (COFF) from Flat Assembler

I am trying to compile somebody's program that is partly written in assembler and partly in C language. The program is available in compiled version, however I need to change it a bit. The source code of the program consists of one .c file and one…
PaweX3
  • 65
  • 1
  • 7
0
votes
1 answer

Are the names of COFF Data Directories fixed?

I have a PE file (notepad), the NumberOfRvaAndSize value in the COFF header is 0x10, and there are 16 DataDirectory entries as expected. The documentation says that this value can change (though I've never seen it), which would mean there were…
BanksySan
  • 27,362
  • 33
  • 117
  • 216
0
votes
0 answers

BaseOfCode present in PE+ executable

The MS documentation says that the BaseOfCode value is only present in PE files, not in PE+. Looking at notepad.exe with dotPeek and with PE Viewer seems to indicate that the BaseOfCode is present and consumed. 0 1 2 3 4 5 6 7 8 9 A B …
BanksySan
  • 27,362
  • 33
  • 117
  • 216
0
votes
1 answer

COFF byte ordering in PE formatted executable

I have a hexdump of a Windows binary and identified the COFF header in this executable by looking at the COFF offset: 0000080: 4550 0000 014c 0003 6ec8 3add 0000 0000 0000090: 0000 0000 00e0 010f 010b 0301 2000 0000 We can further verify this is…
James Taylor
  • 6,158
  • 8
  • 48
  • 74
0
votes
0 answers

COleDispatchDriver::Invoke in MFC app causing 61706 "Insufficient Memory" Exception using VS2013?

I have an MFC C++ application running on Win7 rebuilt with VS2013. It uses a custom OCX control. On about the 4th call to the OCX the COleDispatchDriver::InvokeHelper method calls Invoke which results an exception 61706 "Insufficient Memory". …
JonN
  • 2,498
  • 5
  • 33
  • 49
0
votes
0 answers

Changing obj code section

I am trying to change the code section after compiling but before linking (after obj is created but before it is linked to an exe). I am able to locate the code section and add any number of NOPs to its end and the exe works fine; however, if I add…
Mike LS
  • 1
  • 1
0
votes
1 answer

How to calculate or specify COFF Symbol Table's "value" from general function symbol?

I'm developing nasm like assembler, now l'm coding a process generating COFF formatted files. My problem is very specific, I'm suffered from the field named value on COFF Symbol Table. I couldn't find the way to calculate or specify it. I read…
hiropon
  • 1,675
  • 2
  • 18
  • 41
0
votes
0 answers

How to generate Proteus compatible debug files using gcc-arm-none-eabi toolchain

I am developing a new project using LPC2138, an ARM7TDMI based micro-controller. I have already developed code for this micro-controller in Keil IDE. My intention here is to experiment with ARM code development using GNU toolchain in a Linux host…
0
votes
1 answer

How to create C# executable without Exe-Container

Can I produce a executable for linux using the language C# that does not use microsoft windows exe file format? I know that mono can read the IL instructions out of a windows executable, but I am curious if this is also possible using an unix elf…
feedc0de
  • 3,646
  • 8
  • 30
  • 55
0
votes
1 answer

Getting symbol of a section

SECTION HEADER #5 .text name 0 physical address 0 virtual address 24 size of raw data 1B78 file pointer to raw data (00001B78 to 00001B9B) 1B9C file pointer to relocation table 0 file pointer to line numbers …
Neet33
  • 241
  • 1
  • 5
  • 17