Knowledge (XXG)

COFF

Source 📝

25: 496:
When compiled with appropriate options, a COFF object file will contain line number information for each possible break point in the text section of the object file. Line number information takes two forms: in the first, for each possible break point in the code, the line number table entry records
488:
Storage classes describe the type entity the symbol represents, and may include external variables (C_EXT), automatic (stack) variables (C_AUTO), register variables (C_REG), functions (C_FCN), and many others. The symbol type describes the interpretation of the symbol entity's value and includes
532:
of an object from the file once it is loaded into memory, minus the base address of the file image. If the file were to be mapped literally from disk to memory, the RVA would be the same as that of the offset into the file, but this is actually quite unusual.
500:
Note that COFF was not capable of representing line numbers or debugging symbols for included source as with header files rendering the COFF debugging information virtually useless without incompatible extensions.
497:
the address and its matching line number. In the second form, the entry identifies a symbol table entry representing the start of a function, enabling a breakpoint to be set using the function's name.
376:
However, the COFF design was both too limited and incompletely specified: there was a limit on the maximum number of sections, a limit on the length of section names, included source files, and the
732: 481:
entry includes a name, storage class, type, value and section number. Short names (8 characters or fewer) are stored directly in the symbol table; longer names are stored as an
761: 647: 388:, or new processors. All real world implementations of COFF were necessarily violations of the standard as a result. This led to numerous COFF extensions. 585: 536:
Note that the RVA term is only used with objects in the image file. Once loaded into memory, the image base address is added, and ordinary VAs are used.
544:
The COFF file header stores the date and time that the object file was created as a 32-bit binary integer, representing the number of seconds since the
458:
was the introduction of multiple named sections in the object file. Different object files could have different numbers and types of sections.
916: 793: 565: 321: 728: 683: 698: 664: 108: 942: 878: 848: 420: 301: 245: 46: 401: 614: 893: 708: 552:. Dates occurring after 19 January 2038 cannot be stored in this format, resulting in an instance of the 549: 89: 35: 883: 786: 482: 467: 61: 765: 490: 381: 593: 352: 68: 470:) names for program functions and variables, and line number information, used for setting breakpoints and 426:
While extended versions of COFF continue to be used for some Unix and Unix-like platforms, primarily in
42: 416:
ports and tool chains targeting embedded development each created their own, incompatible, variations.
75: 779: 397: 888: 435: 373:
format included arbitrary sections, explicit processor declarations, and explicit address linkage.
366: 337: 333: 317: 241: 201: 471: 377: 127: 57: 868: 694: 660: 553: 509:
When a COFF file is generated, it is not usually known where in memory it will be loaded. The
313: 823: 524:
Relative virtual addresses (RVAs) are not to be confused with standard virtual addresses. A
405: 362: 274: 223: 833: 529: 510: 427: 517:. The rest of the file is not necessarily loaded in a contiguous block, but in different 873: 936: 898: 771: 656: 355: 305: 285: 277: 514: 478: 82: 806: 740: 443: 340:, foreign format identification, or explicit address linkage. As development of 270: 262: 219: 211: 171: 160: 24: 858: 802: 545: 439: 266: 215: 150: 431: 341: 309: 714: 838: 345: 189: 442:, the PE format (sometimes written as PE/COFF) uses a COFF header for 863: 380:
information was incapable of supporting real world languages such as
385: 903: 843: 818: 409: 393: 297: 293: 289: 237: 233: 180: 430:, perhaps the most widespread use of the COFF format today is in 292:
format, and formed the basis for extended specifications such as
921: 853: 513:
where the first byte of the file will be loaded is called image
413: 281: 775: 762:
An In-Depth Look into the Win32 Portable Executable File Format
466:
The COFF symbolic debugging information consists of symbolic (
389: 359: 18: 446:, and as a component of the PE header for executable files. 649:
UNIX System V/386 Release 3.2 Programmer's Guide, Volume II
477:
Symbolic names are stored in the COFF symbol table. Each
348:, different solutions to these and other issues emerged. 586:"LIB Reference (Embedded Visual C++ Programmers Guide)" 324:
environments and in some embedded development systems.
634: 419:
With the release of SVR4, AT&T replaced COFF with
485:
into the string table at the end of the COFF object.
308:. COFF and its variants continue to be used on some 229: 207: 197: 185: 176: 167: 159: 149: 126: 49:. Unsourced material may be challenged and removed. 787: 8: 121: 729:"A Brief History of TI Object File Formats" 794: 780: 772: 369:. Improvements over the existing AT&T 344:systems continued both inside and outside 155:application/x-coff, application/x-coffexec 548:, 1 January 1970 00:00:00  109:Learn how and when to remove this message 713:(Revision 4.1 ed.), archived from 646:"11 Common Object File Format (COFF)". 615:"IMAGE_FILE_HEADER structure (winnt.h)" 577: 120: 566:Comparison of executable file formats 332:The original Unix object file format 7: 47:adding citations to reliable sources 300:, before being largely replaced by 14: 384:, much less newer languages like 735:from the original on 2023-11-26. 710:Common Object File Format (COFF) 351:COFF was introduced in 1983, in 336:is unable to adequately support 23: 707:Microsoft Corporation (2006b), 288:, replaced the previously used 34:needs additional citations for 462:Symbolic debugging information 284:systems. It was introduced in 246:Executable and Linkable Format 1: 454:COFF's main improvement over 691:Understanding and Using COFF 741:"Common Object File Format" 693:, O'Reilly and Associates, 635:Microsoft Corporation 2006b 438:(PE) format. Developed for 959: 912: 814: 689:Gircys, Gintaras (1988), 255:Common Object File Format 526:relative virtual address 505:Relative virtual address 151:Internet media type 943:Executable file formats 766:PE format documentation 365:platforms such as the 16:Executable file format 917:Comparison of formats 202:AT&T Corporation 43:improve this article 489:values for all the 436:Portable Executable 318:Portable Executable 242:Portable Executable 123: 590:msdn.microsoft.com 378:symbolic debugging 304:, introduced with 128:Filename extension 930: 929: 748:Texas Instruments 554:year 2038 problem 314:Microsoft Windows 251: 250: 198:Developed by 119: 118: 111: 93: 950: 796: 789: 782: 773: 751: 745: 736: 724: 723: 722: 703: 671: 670: 654: 643: 637: 632: 626: 625: 623: 622: 611: 605: 604: 602: 601: 592:. Archived from 582: 428:embedded systems 408:and others used 338:shared libraries 230:Extended to 224:shared libraries 187: 178: 169: 144: 140: 136: 124: 114: 107: 103: 100: 94: 92: 51: 27: 19: 958: 957: 953: 952: 951: 949: 948: 947: 933: 932: 931: 926: 908: 810: 800: 758: 743: 739: 727: 720: 718: 706: 701: 688: 680: 678:Further reading 675: 674: 667: 652: 645: 644: 640: 633: 629: 620: 618: 613: 612: 608: 599: 597: 584: 583: 579: 574: 562: 542: 530:virtual address 511:virtual address 507: 464: 452: 412:; and numerous 330: 145: 142: 138: 134: 115: 104: 98: 95: 52: 50: 40: 28: 17: 12: 11: 5: 956: 954: 946: 945: 935: 934: 928: 927: 925: 924: 919: 913: 910: 909: 907: 906: 901: 896: 891: 886: 881: 876: 871: 866: 861: 856: 851: 846: 841: 836: 831: 826: 821: 815: 812: 811: 801: 799: 798: 791: 784: 776: 770: 769: 757: 756:External links 754: 753: 752: 737: 725: 704: 699: 686: 684:MIPS COFF Spec 679: 676: 673: 672: 665: 638: 627: 606: 576: 575: 573: 570: 569: 568: 561: 558: 541: 538: 506: 503: 463: 460: 451: 448: 329: 326: 278:computer files 275:shared library 249: 248: 231: 227: 226: 209: 208:Type of format 205: 204: 199: 195: 194: 193: 192: 183: 174: 163: 157: 156: 153: 147: 146: 132: 130: 117: 116: 31: 29: 22: 15: 13: 10: 9: 6: 4: 3: 2: 955: 944: 941: 940: 938: 923: 920: 918: 915: 914: 911: 905: 902: 900: 897: 895: 892: 890: 887: 885: 882: 880: 877: 875: 872: 870: 867: 865: 862: 860: 857: 855: 852: 850: 847: 845: 842: 840: 837: 835: 832: 830: 827: 825: 822: 820: 817: 816: 813: 808: 804: 797: 792: 790: 785: 783: 778: 777: 774: 767: 763: 760: 759: 755: 749: 742: 738: 734: 730: 726: 717:on 2006-12-16 716: 712: 711: 705: 702: 700:0-937175-31-5 696: 692: 687: 685: 682: 681: 677: 668: 666:0-13-944885-3 662: 658: 657:Prentice-Hall 651: 650: 642: 639: 636: 631: 628: 616: 610: 607: 596:on 2003-08-25 595: 591: 587: 581: 578: 571: 567: 564: 563: 559: 557: 555: 551: 547: 539: 537: 534: 531: 527: 522: 520: 516: 512: 504: 502: 498: 494: 492: 486: 484: 480: 475: 473: 469: 461: 459: 457: 449: 447: 445: 441: 437: 433: 429: 424: 422: 417: 415: 411: 407: 403: 399: 395: 391: 387: 383: 379: 374: 372: 368: 364: 361: 357: 356:UNIX System V 354: 349: 347: 343: 339: 335: 327: 325: 323: 319: 315: 311: 307: 303: 299: 295: 291: 287: 286:Unix System V 283: 279: 276: 272: 268: 264: 260: 256: 247: 243: 239: 235: 232: 228: 225: 221: 217: 213: 210: 206: 203: 200: 196: 191: 184: 182: 175: 173: 166: 165: 164: 162: 158: 154: 152: 148: 131: 129: 125: 113: 110: 102: 91: 88: 84: 81: 77: 74: 70: 67: 63: 60: –  59: 55: 54:Find sources: 48: 44: 38: 37: 32:This article 30: 26: 21: 20: 828: 768:at Microsoft 747: 719:, retrieved 715:the original 709: 690: 648: 641: 630: 619:. Retrieved 617:. 2018-05-12 609: 598:. Retrieved 594:the original 589: 580: 543: 535: 525: 523: 518: 515:base address 508: 499: 495: 493:data types. 487: 479:symbol table 476: 465: 455: 453: 444:object files 425: 418: 375: 370: 350: 331: 312:systems, on 258: 254: 252: 161:Magic number 105: 96: 86: 79: 72: 65: 53: 41:Please help 36:verification 33: 807:object file 474:execution. 271:object code 803:Executable 721:2007-06-02 621:2023-12-22 600:2021-02-04 572:References 546:Unix epoch 440:Windows NT 396:format in 353:AT&T's 267:executable 216:executable 99:March 2010 69:newspapers 432:Microsoft 392:used the 342:Unix-like 310:Unix-like 937:Category 733:Archived 659:. 1989. 560:See also 540:Problems 519:sections 450:Features 358:for non- 346:AT&T 280:used on 261:) is a 809:formats 528:is the 472:tracing 328:History 190:Itanium 83:scholar 884:OS/360 864:Mach-O 697:  663:  483:offset 468:string 363:32-bit 320:), in 273:, and 263:format 220:object 212:Binary 133:none, 85:  78:  71:  64:  58:"COFF" 56:  904:XCOFF 844:ECOFF 819:a.out 744:(PDF) 653:(PDF) 456:a.out 410:ECOFF 394:XCOFF 371:a.out 334:a.out 298:ECOFF 294:XCOFF 290:a.out 238:ECOFF 234:XCOFF 186:00 02 181:AMD64 177:64 86 168:4C 01 90:JSTOR 76:books 922:.exe 859:Hunk 854:GOFF 829:COFF 805:and 764:and 695:ISBN 661:ISBN 414:SysV 367:3B20 322:UEFI 306:SVR4 296:and 282:Unix 265:for 259:COFF 253:The 188:for 179:for 172:i386 170:for 143:.lib 139:.obj 122:COFF 62:news 894:PEF 879:OMF 849:ELF 839:COM 834:CMD 824:AIF 550:UTC 434:'s 421:ELF 406:SGI 402:DEC 398:AIX 390:IBM 386:C++ 360:VAX 302:ELF 45:by 939:: 889:PE 874:NE 869:MZ 746:. 731:. 655:. 588:. 556:. 521:. 423:. 404:, 400:; 269:, 244:, 240:, 236:, 222:, 218:, 214:, 141:, 137:, 135:.o 899:X 795:e 788:t 781:v 750:. 669:. 624:. 603:. 491:C 382:C 316:( 257:( 112:) 106:( 101:) 97:( 87:· 80:· 73:· 66:· 39:.

Index


verification
improve this article
adding citations to reliable sources
"COFF"
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message
Filename extension
Internet media type
Magic number
i386
AMD64
Itanium
AT&T Corporation
Binary
executable
object
shared libraries
XCOFF
ECOFF
Portable Executable
Executable and Linkable Format
format
executable
object code
shared library

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.