StupidOS/docs/COFF.txt

83 lines
3.1 KiB
Plaintext
Raw Normal View History

2024-04-24 06:06:36 +00:00
File: Common Object File Format (COFF)
2024-03-21 12:18:23 +00:00
2024-04-24 06:06:36 +00:00
About: COFF File Structure
(start code)
2024-03-21 12:18:23 +00:00
+-----------------------+
| |
| File Header |
| |
+-----------------------+----
| | \
| Optional File Header | | Only for executable file
| (a.out header) | /
+-----------------------+----
| | \
| Section Header 1 | |
| | |
+-----------------------+ |
. . | Section Headers
. . |
+-----------------------+ |
| | |
| Section Header n | |
| | /
+-----------------------+----
| | \
| Section 1 Raw Data | |
| | |
+-----------------------+ |
. . | Raw data
. . | (Executable Code and Initialized Data)
+-----------------------+ |
| | |
| Section n Raw Data | |
| | /
+-----------------------+----
| | \
| Section 1 Relocation | |
| Information | |
+-----------------------+ |
. . | Relocation
. . | Information
+-----------------------+ |
| | |
| Section n Relocation | |
| Information | /
+-----------------------+----
| |
| Symbol Table |
| |
+-----------------------+
| |
| String Table |
| |
+-----------------------+
2024-04-24 06:06:36 +00:00
(end)
2024-03-21 12:18:23 +00:00
2024-04-24 06:06:36 +00:00
About: File Header
2024-03-21 12:18:23 +00:00
| Type | Description |
|----------+---------------------------------|
| uint16_t | Version ID (~0x014c~ for i386) |
| uint16_t | Number of section headers |
| uint32_t | Timestamp |
| uint32_t | Symtab address |
| uint32_t | Number of entries in the symtab |
| uint16_t | Optional header size |
| uint16_t | Flags |
2024-06-10 06:43:35 +00:00
About: Optional Header
About: Section Header
About: Usefull links
- <https://wiki.osdev.org/COFF>
- <http://www.delorie.com/djgpp/doc/coff/filhdr.html>
- <Official Microsoft COFF Specification (2016) at https://web.archive.org/web/20230703150217/https%3A%2F%2Fdownload.microsoft.com%2Fdownload%2F9%2Fc%2F5%2F9c5b2167-8017-4bae-9fde-d599bac8184a%2Fpecoff_v83.docx>
2024-06-10 08:05:10 +00:00
- <UNIX System V/386 Release 3.2 Programmer's Guide, Volume II at http://bitsavers.org/pdf/att/unix/System_V_386_Release_3.2/UNIX_System_V_386_Release_3.2_Programmers_Guide_Vol2_1989.pdf>