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
1
vote
2 answers

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 ?
oneat
  • 10,778
  • 16
  • 52
  • 70
1
vote
1 answer

Unable to use C's .OBJ files compiled by cl.exe in Delphi XE4 Win64 platform

I want to translate 7Zip's SDK to Delphi/Pascal's unit file. First, I try compile the C files using BCC32.exe for Win32 platform: bcc32.exe -c -D_LZMA_PROB32 -D_WIN32 -v -y Threads.c LzFind.c LzFindMt.c LzmaDec.c LzmaEnc.c It produces few .OBJ…
Chau Chee Yang
  • 18,422
  • 16
  • 68
  • 132
1
vote
3 answers

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…
Pindatjuh
  • 10,550
  • 1
  • 41
  • 68
1
vote
0 answers

IMAGE_REL_AMD64_SECTION zero or one based?

Per the Microsoft PE/COFF document, relocation type IMAGE_REL_AMD64_SECTION means "The 16-bit section index of the section that contains the target. This is used to support debugging information." Normally this would be assumed to be 0-based, but a…
rwallace
  • 31,405
  • 40
  • 123
  • 242
1
vote
1 answer

What is the format for debug info in Windows obj files?

I'm messing around with compilers, .obj files, assembly, etc. The .obj file contains info that eventually ends up in the PDB, but I can't find any reference to the format that's used within the debug sections of the .obj file. (I have, however,…
Matt Fichman
  • 5,458
  • 4
  • 39
  • 59
1
vote
1 answer

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 …
1
vote
1 answer

ECOFF & MIPS PECOFF same

I am trying to understand different Object file formats and was able to get the required information for COFF, XCOFF and other file formats. However i couldnt find much information on net for ECOFF. I think, ECOFF is MIPS version of PECOFF. Not…
kris123456
  • 501
  • 1
  • 5
  • 15
0
votes
1 answer

Extracting a single procedure from an object file?

I have a 64-bit COFF object file (no source code or debug info) from which I need to extract a single procedure. The procedure is relatively short, and its only dependencies are: One global variable. A couple of imported procedure. I have already…
user541686
  • 205,094
  • 128
  • 528
  • 886
0
votes
0 answers

Can a statically linked Linux lib be converted to COFF and be linked by MinGW, to run on a Linux system?

There is a windows application that I have the source to. It compiles under MinGW, links fine against wine, and executes, on a Linux system. However, I would like it to call into a Linux library. Since the Linux lib is statically linked, I thought I…
user41010
  • 91
  • 8
0
votes
1 answer

How does Windows find where to dynamically link functions at load

I've been trying to learn about the PE file structure, and I compiled the following short program to examine the output: #include int get_5() { return 5; } int main() { int five = get_5(); fputc(five, stdout); return…
user2649681
  • 750
  • 1
  • 6
  • 23
0
votes
1 answer

COFF x86_64 relocation types

I am working on linker development for an open source project. The target architecture is AMD_X86_X64. In AMD_X86_X64 specification The relocation types' calculations for ELF are declared for example, R_X86_64_64 the calculation is S + A. How to do…
0
votes
0 answers

Locating functions with IDIA SDK - strange results

I am trying to locate a specific function in a .pdb file. Originally I compiled a simple "hello, world" program, and analyzed the name of the functions using the IDiaSymbol::get_name method, but I couldn't locate my function. After this, I tried…
0
votes
2 answers

__forceinline generates a function symbol - why ? how to make it not do so?

This code in some header 'a.h' that is multiply included: __forceinline void f(void){} Produces a function symbol in every object file that includes 'a.h' - a test object is: #include "a.h" void f1(void) { f(); } Compiling this…
JVD
  • 645
  • 1
  • 7
  • 17
0
votes
1 answer

How can I create .o and .a files in ELF format for Windows for the use with C++Builder 10.3.3?

I'm working with Embarcadero C++Builder 10.3.3, and would like to use OpenCV with it. However, the precompiled OpenCV pack is precompiled with Visual Studio, which uses the COFF format. However, the C++Builder 64-bit compiler uses the ELF format…
SciDoc
  • 1
  • 2
0
votes
1 answer

libbfd: Write COFF object with AMD64 machine type

Im using libbfd to write out the contents of a coff object file for windows that contains x86-64 code. Writing symbols, sections and relocations works, but the resulting file does not have the machine type set in the coff header. I manually write…
tly
  • 1,202
  • 14
  • 17