Knowledge (XXG)

Object file

Source ๐Ÿ“

234:, support only an absolute object format. Programs are not relocatable; they need to be assembled or compiled to execute at specific, predefined addresses. The file contains no relocation or linkage information. These files can be loaded into read/write memory, or stored in 280:, the loader allocates various regions of memory to the program. Some of these regions correspond to sections of the object file, and thus are usually known by the same names. Others, such as the stack, only exist at run time. In some cases, 506: 368:
Segments in different object files may be combined by the linker according to rules specified when the segments are defined. Conventions exist for segments shared between object files; for instance, in
111:
A term in automatic programming for the machine language program produced by the machine by translating a source program written by the programmer in a language similar to algebraic notation.
518: 284:
is done by the loader (or linker) to specify the actual memory addresses. However, for many programs or architectures, relocation is not necessary, due to being handled by the
292:. On some systems the segments of the object file can then be copied (paged) into memory and executed, without needing further processing. On these systems, this may be done 268:
Most object file formats are structured as separate sections of data, each section containing a certain type of data. These sections are known as "segments" due to the term "
84:
The metadata that object files may include can be used for linking or debugging; it includes information to resolve symbolic cross-references between different modules,
77:. There are various formats for object files, and the same machine code can be packaged in different object file formats. An object file may also work like a 1189: 192:
format. Some formats can contain machine code for different processors, with the correct one chosen by the operating system when the program is loaded.
861: 1148: 1025: 993: 955: 621: 588: 195:
The design and/or choice of an object file format is a key part of overall system design. It affects the performance of the linker and thus
104:
information. Other metadata may include the date and time of compilation, the compiler name and version, and other identifying information.
553: 410: 199:
turnaround while a program is being developed. If the format is used for executables, the design also affects the time programs take to
813: 696: 656: 476: 1174: 1110: 127:
There are many different object file formats; originally each type of computer had its own unique format, but with the advent of
101: 334: 1179: 1080: 215: 139: 119:
is used to combine the object code into one executable program or library pulling in precompiled system libraries as needed.
93: 743: 349: 149:
Some systems make a distinction between formats which are directly executable and formats which require processing by the
422: 917: 825: 1184: 1125: 933: 841: 687:. The Morgan Kaufmann Series in Software Engineering and Programming (1 ed.). San Francisco, California, USA: 416: 792: 767: 1115: 1018: 405: 289: 680: 817: 779:(NB. Description of the Microsoft REL file format for relocatable objects, also used by Digital Research.) 285: 281: 85: 70: 723: 809: 381: 154: 55: 1011: 613: 1120: 725: 174: 912: 297: 277: 246: 150: 116: 97: 605: 1100: 989: 947: 880:
Montuelle, Jean; Willers, Ian (25โ€“28 September 1979) . Written at CERN, Geneve, Switzerland.
853: 804: 702: 692: 652: 617: 584: 374: 273: 1055: 981: 937: 845: 235: 135: 62:
during the compilation or assembly process. The machine code that is generated is known as
1065: 688: 485: 355: 320: 89: 384:
of debugging information may either be an integral part of the object file format, as in
1105: 967:(1 page) (NB. Describes the history and relationship of IEEE 695 with CUFOM and MUFOM.) 733: 676: 645: 269: 204: 78: 388:, or a semi-independent format which may be used with several object formats, such as 1168: 1130: 1003: 296:, that is, only when the segments are referenced during execution, for example via a 239: 231: 200: 35: 881: 377:
that specify the names of special segments and whether or not they may be combined.
973:
IEEE 695-1990: IEEE Standard for Microprocessor Universal Format for Object Modules
316: 310: 39: 449: 985: 455: 340: 211: 173:
also have different file formats for executable files and object files, such as
63: 59: 1090: 1034: 971: 514: 250: 196: 185: 74: 951: 857: 17: 739: 706: 361: 181: 942: 849: 710: 922: 830: 1070: 257: 51: 47: 43: 177:
for executables and COFF for object files in 32-bit and 64-bit Windows.
784: 759: 170: 132: 1095: 428: 328: 242: 1135: 1075: 1050: 583:(1 ed.). Pune, India: Technical Publications. pp. 3โ€“15. 413:(typically with file extension .HEX, but sometimes also with .OBJ) 393: 389: 189: 1153: 1085: 1060: 977: 903: 385: 143: 128: 1007: 370: 254: 222:
for the manipulation of object files in a variety of formats.
219: 166: 532: 883:
Cross Software Using a Universal Object Module Format, CUFOM
245:
monitor contains a routine to read an absolute object file (
146:, have been defined and used on different kinds of systems. 728: 165:. In this case the files have entirely different formats. 900:
Microprocessor Universal Format for Object Modules, MUFOM
343:(uninitialized static data, both variables and constants) 107:
The term "object program" dates from at least the 1950s:
303:
Types of data supported by typical object file formats:
507:"Universal Binaries and 32-bit/64-bit PowerPC Binaries" 742:, Product Support Services. Application Note SS0288. 260:
are a more recent example of absolute object files.
840:(4). University of Arizona, Tucson, Arizona, USA: 644: 911:Montuelle, Jean; Willers, Ian (September 1982). 346:External definitions and references for linking 109: 27:File containing relocatable format machine code 1019: 451:A primer of programming for digital computers 425:(OMF for Intel 8080/8085, OBJ for Intel 8086) 188:and object files, starting with the original 8: 1000:(NB. Superseeds IEEE 695-1985 (1985-09-09)). 307:Header (descriptive and control information) 276:. When a program is loaded into memory by a 1026: 1012: 1004: 579:Godse, Deepali A.; Godse, Atul P. (2008). 941: 272:", which was previously a common form of 651:(2 ed.). New York, USA: Macmillan. 440: 886:. Euro IFIP, London, UK. CERN-DD/78/20 610:Professional Linux Kernel Architecture 561:. Motorola Semiconductor Products, Inc 533:"FatELF: Universal Binaries for Linux" 184:systems have used the same format for 511:OS X ABI Mach-O File Format Reference 7: 411:Intel hexadecimal object file format 1190:Programming language implementation 606:"Appendix E. The ELF Binary Format" 25: 918:Software: Practice and Experience 826:Software: Practice and Experience 313:("text segment", executable code) 932:(9). CERN, Geneve, Switzerland: 783:Elliott, John C. (2012-06-05) . 647:Assembly language for the IBM-PC 478:IBM OS Linkage Editor and Loader 218:(BFD library) provides a common 958:from the original on 2023-11-28 867:from the original on 2023-11-28 795:from the original on 2020-01-26 770:from the original on 2023-11-25 746:from the original on 2017-09-09 230:Many early computers, or small 818:"A Machine-Independent Linker" 810:Fraser, Christopher "Chris" W. 216:Binary File Descriptor library 1: 735:The Microsoft OBJ File Format 555:MCM6830L7 MIKBUG/MINIBUG ROM 423:Object Module Format (Intel) 46:, as well as other data and 986:10.1109/IEEESTD.1990.101062 934:John Wiley & Sons, Ltd. 842:John Wiley & Sons, Ltd. 760:"Microsoft REL file format" 552:Wiles, Mike; Felix, Andre. 517:2009-02-04 . Archived from 448:Wrubel, Marshal H. (1959). 300:backed by the object file. 73:, and not usually directly 69:The object code is usually 1206: 604:Mauerer, Wolfgang (2010). 417:Object Module Format (ICL) 1144: 1046: 758:Elliott, John C. (2002). 681:"Chapter 3: Object files" 406:OS/360 Object File Format 290:position-independent code 326:Read-only data segment ( 157:call the first format a 138:, some formats, such as 1175:Executable file formats 643:Irvine, Kip R. (1993). 375:different memory models 943:10.1002/spe.4380120909 913:"Letter to the Editor" 906:Working Group, P695lD2 850:10.1002/spe.4380120407 616:. p. Appendix E. 286:memory management unit 113: 1180:Compiler construction 1149:Comparison of formats 614:John Wiley & Sons 382:debugging data format 155:OS/360 and successors 816:(Aprilโ€“May 1982) . 685:Linkers and Loaders 333:initialized static 238:. For example, the 175:Portable Executable 123:Object file formats 100:, and debugging or 1185:Computer libraries 902:(draft document), 488:. 1973. p. 16 298:memory-mapped file 161:and the second an 1162: 1161: 995:978-0-7381-3028-6 785:"PRL file format" 623:978-0-470-34343-2 590:978-81-8431-355-0 454:. New York, USA: 419:(OMF for ICL VME) 274:memory management 136:operating systems 50:, generated by a 16:(Redirected from 1197: 1028: 1021: 1014: 1005: 999: 966: 964: 963: 945: 926: 907: 894: 892: 891: 875: 873: 872: 866: 834: 822: 814:Hanson, David R. 803: 801: 800: 778: 776: 775: 754: 752: 751: 721: 719: 718: 709:. Archived from 663: 662: 650: 640: 634: 633: 631: 630: 601: 595: 594: 576: 570: 569: 567: 566: 560: 549: 543: 542: 540: 539: 529: 523: 522: 503: 497: 496: 494: 493: 483: 473: 467: 466: 464: 463: 445: 321:static variables 236:read-only memory 21: 1205: 1204: 1200: 1199: 1198: 1196: 1195: 1194: 1165: 1164: 1163: 1158: 1140: 1042: 1032: 996: 970: 961: 959: 920: 910: 898: 889: 887: 879: 870: 868: 864: 828: 820: 808: 798: 796: 782: 773: 771: 757: 749: 747: 732: 716: 714: 699: 691:. p. 256. 689:Morgan Kaufmann 677:Levine, John R. 675: 672: 670:Further reading 667: 666: 659: 642: 641: 637: 628: 626: 624: 603: 602: 598: 591: 578: 577: 573: 564: 562: 558: 551: 550: 546: 537: 535: 531: 530: 526: 505: 504: 500: 491: 489: 486:IBM Corporation 481: 475: 474: 470: 461: 459: 447: 446: 442: 437: 402: 356:Dynamic linking 266: 228: 203:, and thus the 153:. For example, 125: 90:stack unwinding 28: 23: 22: 15: 12: 11: 5: 1203: 1201: 1193: 1192: 1187: 1182: 1177: 1167: 1166: 1160: 1159: 1157: 1156: 1151: 1145: 1142: 1141: 1139: 1138: 1133: 1128: 1123: 1118: 1113: 1108: 1103: 1098: 1093: 1088: 1083: 1078: 1073: 1068: 1063: 1058: 1053: 1047: 1044: 1043: 1033: 1031: 1030: 1023: 1016: 1008: 1002: 1001: 994: 980:. 1990-02-05. 968: 908: 896: 877: 806: 780: 755: 730: 697: 671: 668: 665: 664: 657: 635: 622: 596: 589: 581:Microprocessor 571: 544: 524: 521:on 2014-09-04. 498: 468: 439: 438: 436: 433: 432: 431: 426: 420: 414: 408: 401: 398: 366: 365: 359: 353: 347: 344: 338: 324: 314: 308: 270:memory segment 265: 262: 232:microcomputers 227: 226:Absolute files 224: 205:responsiveness 124: 121: 79:shared library 38:that contains 26: 24: 14: 13: 10: 9: 6: 4: 3: 2: 1202: 1191: 1188: 1186: 1183: 1181: 1178: 1176: 1173: 1172: 1170: 1155: 1152: 1150: 1147: 1146: 1143: 1137: 1134: 1132: 1129: 1127: 1124: 1122: 1119: 1117: 1114: 1112: 1109: 1107: 1104: 1102: 1099: 1097: 1094: 1092: 1089: 1087: 1084: 1082: 1079: 1077: 1074: 1072: 1069: 1067: 1064: 1062: 1059: 1057: 1054: 1052: 1049: 1048: 1045: 1040: 1036: 1029: 1024: 1022: 1017: 1015: 1010: 1009: 1006: 997: 991: 987: 983: 979: 975: 974: 969: 957: 953: 949: 944: 939: 935: 931: 927: 924: 919: 914: 909: 905: 901: 897: 885: 884: 878: 863: 859: 855: 851: 847: 843: 839: 835: 832: 827: 819: 815: 811: 807: 805: 794: 790: 786: 781: 769: 765: 761: 756: 745: 741: 737: 736: 731: 729: 726: 724: 713:on 2013-01-25 712: 708: 704: 700: 698:1-55860-496-0 694: 690: 686: 682: 678: 674: 673: 669: 660: 658:0-02-359651-1 654: 649: 648: 639: 636: 625: 619: 615: 611: 607: 600: 597: 592: 586: 582: 575: 572: 557: 556: 548: 545: 534: 528: 525: 520: 516: 512: 508: 502: 499: 487: 480: 479: 472: 469: 458:. p. 222 457: 453: 452: 444: 441: 434: 430: 427: 424: 421: 418: 415: 412: 409: 407: 404: 403: 399: 397: 395: 391: 387: 383: 378: 376: 372: 363: 360: 357: 354: 351: 348: 345: 342: 339: 336: 332: 330: 325: 322: 319:(initialized 318: 315: 312: 309: 306: 305: 304: 301: 299: 295: 291: 287: 283: 279: 275: 271: 263: 261: 259: 256: 252: 248: 244: 241: 240:Motorola 6800 237: 233: 225: 223: 221: 217: 213: 208: 206: 202: 201:begin running 198: 193: 191: 187: 183: 178: 176: 172: 168: 164: 163:object module 160: 156: 152: 147: 145: 141: 137: 134: 130: 122: 120: 118: 112: 108: 105: 103: 99: 95: 92:information, 91: 88:information, 87: 82: 80: 76: 72: 67: 65: 61: 57: 53: 49: 45: 41: 37: 33: 19: 18:Object module 1038: 972: 960:. Retrieved 936:: 883โ€“884 . 929: 916: 899: 895:(1+23 pages) 888:. Retrieved 882: 869:. Retrieved 837: 824: 797:. Retrieved 788: 772:. Retrieved 763: 748:. Retrieved 734: 715:. Retrieved 711:the original 684: 646: 638: 627:. Retrieved 609: 599: 580: 574: 563:. Retrieved 554: 547: 536:. Retrieved 527: 519:the original 510: 501: 490:. Retrieved 477: 471: 460:. Retrieved 450: 443: 379: 367: 327: 317:Data segment 311:Code segment 302: 293: 267: 264:Segmentation 229: 209: 194: 179: 162: 158: 148: 126: 114: 110: 106: 83: 68: 40:machine code 31: 29: 1039:object file 921: [ 844:: 351โ€“366. 829: [ 789:seasip.info 764:seasip.info 456:McGraw-Hill 364:information 358:information 352:information 341:BSS segment 247:SREC Format 212:GNU Project 207:for users. 159:load module 71:relocatable 64:object code 60:source code 32:object file 1169:Categories 1035:Executable 962:2023-11-28 890:2023-11-28 876:(16 pages) 871:2023-11-28 799:2020-01-26 774:2023-11-25 750:2017-08-21 717:2020-01-12 629:2020-08-01 565:2020-07-31 538:2020-08-02 515:Apple Inc. 492:2012-08-06 462:2020-07-31 435:References 373:there are 350:Relocation 282:relocation 251:paper tape 197:programmer 186:executable 131:and other 96:, program 86:relocation 75:executable 952:0038-0644 858:0038-0644 740:Microsoft 679:(2000) . 362:Debugging 335:constants 258:COM files 182:Unix-like 180:Unix and 102:profiling 56:assembler 956:Archived 862:Archived 793:Archived 768:Archived 744:Archived 727:Errata: 707:42413382 400:See also 133:portable 94:comments 52:compiler 48:metadata 44:bytecode 1041:formats 249:) from 171:Windows 98:symbols 1116:OS/360 1096:Mach-O 992:  950:  856:  722:Code: 705:  695:  655:  620:  587:  429:Mach-O 329:rodata 294:lazily 288:or by 278:loader 243:MIKBUG 151:linker 117:linker 1136:XCOFF 1076:ECOFF 1051:a.out 925:] 865:(PDF) 833:] 821:(PDF) 559:(PDF) 482:(PDF) 394:DWARF 390:stabs 190:a.out 58:from 34:is a 1154:.exe 1091:Hunk 1086:GOFF 1061:COFF 1037:and 990:ISBN 978:IEEE 948:ISSN 904:IEEE 854:ISSN 703:OCLC 693:ISBN 653:ISBN 618:ISBN 585:ISBN 386:COFF 380:The 210:The 169:and 144:COFF 142:and 129:Unix 36:file 1126:PEF 1111:OMF 1081:ELF 1071:COM 1066:CMD 1056:AIF 982:doi 938:doi 846:doi 392:or 371:DOS 255:DOS 220:API 214:'s 167:DOS 140:ELF 54:or 42:or 30:An 1171:: 1121:PE 1106:NE 1101:MZ 988:. 976:. 954:. 946:. 930:12 928:. 915:. 860:. 852:. 838:12 836:. 823:. 812:; 791:. 787:. 766:. 762:. 738:. 701:. 683:. 612:. 608:. 513:. 509:. 484:. 396:. 253:. 115:A 81:. 66:. 1131:X 1027:e 1020:t 1013:v 998:. 984:: 965:. 940:: 923:d 893:. 874:. 848:: 831:d 802:. 777:. 753:. 720:. 661:. 632:. 593:. 568:. 541:. 495:. 465:. 337:) 331:, 323:) 20:)

Index

Object module
file
machine code
bytecode
metadata
compiler
assembler
source code
object code
relocatable
executable
shared library
relocation
stack unwinding
comments
symbols
profiling
linker
Unix
portable
operating systems
ELF
COFF
linker
OS/360 and successors
DOS
Windows
Portable Executable
Unix-like
executable

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

โ†‘