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

Merging PE Sections

What are the disadvantages of merging compatible PE file sections?
user541686
  • 205,094
  • 128
  • 528
  • 886
1
vote
1 answer

Detect C++ inline symbols in COFF object file

I would like to generate a .def file for building a DLL with the MSVC compiler. I used LLVM to search through the compiled .obj files to find all definitions of C++ functions or variables. I would like to distinguish between normal definitions and…
tly
  • 1,202
  • 14
  • 17
1
vote
1 answer

VA and memory addresses

This should be a simple question: I know that VA = RVA + imagebase for a PE, now I'm trying to locate in a disassembler a string and happens to be located at 0042720E in the .text section. The imagebase is 400000 and 2720E is the RVA, it is okay…
Marco A.
  • 43,032
  • 26
  • 132
  • 246
1
vote
3 answers

How can I make GCC generate ELF object files?

I need to use the TCC compiler to link object files generated by GCC. However, GCC in MinGW outputs object files in COFF format, and TCC only supports the ELF format. How can I make GCC generate ELF object files? $ cat test.c int main(void) { …
August Karlstrom
  • 10,773
  • 7
  • 38
  • 60
1
vote
1 answer

AddressOfEntryPoint is beyond the end of the file

I'm trying to understand what the AddressOfEntryPoint in the COFF header. I have a "nothing" .NET exe: class Program { public static void Main() { } } (I've compiled it as an x86 application) The values I get for the standard fields in…
BanksySan
  • 27,362
  • 33
  • 117
  • 216
1
vote
1 answer

How to load COFF mesh in cgal?

I want to load a coff file (a mesh with color) using CGAL::read_OFF(). and next attempt would be combining these info into a mesh variable (something similar to polygon_soup_to_polygon_mesh function, but not sure about it, because this command also…
A. Fasih
  • 73
  • 1
  • 10
1
vote
1 answer

LLVM: add linker directives to LLVM IR

How can I add linker directives found in a COFF (MSVC object file) with LLVM using LLVM IR? Or is there another tool that can add these directives?
xaav
  • 7,876
  • 9
  • 30
  • 47
1
vote
0 answers

Can microsoft compiler cl.exe compile to OMF object type instead COFF?

I want to link object file created by cl.exe with another object file which is in format OMF using third party linker. That third party linker does not accept COFF format. I want to know if cl can make objects in OMF format?
Wafeeq
  • 869
  • 1
  • 16
  • 34
1
vote
1 answer

"Undefined reference" error when using assembly to embed data, using mingw-w64 compiling for windows (COFF instead of ELF)

In a different Stackoverflow Q/A there was a post that showed how to embed arbitrary data in assembly and reference it in C++. This works fine in Linux, but when compiling for Windows (using mingw-w64), the assembly has to be different because the…
Stephen S.
  • 33
  • 3
1
vote
1 answer

Dumpbin output meaning below .dll import part

Here is a part of what I got when run dumpbin .exe file. Section contains the following imports: KERNEL32.dll 5A71E8 Import Address Table 620468 Import Name Table 0 time date stamp …
chickensoup
  • 334
  • 1
  • 17
1
vote
1 answer

Linking object files of differing types

I am trying to link object files which had originally been created by two different assemblers. We have some legacy assembly code that was compiled into object files using an old MRI assembler for the 68332 processor. We are developing a new…
Michael Bauer
  • 183
  • 4
  • 15
1
vote
1 answer

For package.loadlib does lua require the dll to be COFF format or ELF format?

I'm trying to load a dll into my lua script and call the function. When I create the dll using GCC (under cygwin) and lua (5.2.4) I'm able to load the library & execute it without a problem. However, when I create run the same script from SciTE,…
Keshavan
  • 27
  • 2
1
vote
1 answer

Linker error “contains invalid OMF record” 2

I'm working with Embarcadero XE8 C++ builder 32 bit. I was adding a library to my program for solving the Unresolved external error. When I added the library I got the error as in the title. So I searched the web and found this topic on…
Bart
  • 717
  • 1
  • 9
  • 28
1
vote
1 answer

Why I didn't get the "PE\0\0"?

From PE specification: At location 0x3c, the stub has the file offset to the PE signature. This information enables Windows to properly execute the image file, even though it has an MS DOS stub. This file offset is placed at location 0x3c…
Andrey Bushman
  • 11,712
  • 17
  • 87
  • 182
1
vote
4 answers

Wondering 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) which "indicates the size". This…
Scott Wisniewski
  • 24,561
  • 8
  • 60
  • 89