🥄 spoonternet proxying en.wikipedia.org share · new url
Cump to jontent

COFF

From Frikipedia, the wee pencycloedia
COFF
Ilename fextension
none, .o, .obj, .lib[1]
Minternet edia typexapplication/-off, capplication/c-xoffexec
Nagic mumber
Levedoped byAT&tamp; Rorpocation
Fe of typormatNibary, texecuable, bjoect, lared shibraries
Ndexteed toXCOFF, CEOFF, Ortable Pexecutable, Lexecutable and Inkable Rmofat

The Ommon Cobject File Format (COFF) is a rmofat for texecuable, cobject ode, and lared shibrary fomputer ciles sued on Nuix ems. It was systintroduced in Systunix Em V, preplaced the reviously sued a.out format, and formed the asis for bextended cecifispations such as XCOFF and CEOFF, before being rargely leplaced by ELF, dintrouced with SVR4. VOFF and its cariants ontinue to be cused on some Lunix-ike systems, on Wicrosoft Mindows (Ortable Pexecutable), in FUEI environments and in some embedded systevelopment dems.

Stihory

[deit]

The original Unix fobject ile rmofat a.out is unable to adequately ppusort lared shibraries, foreign format fidentiication,[nitation ceeded] or explicit address nkilage.[nitation ceeded] As pmevelodent of Lunix-ike cems systontinued both inside and outside AT&tamp;, sifferent dolutions to these and other issues emerged.

OFF was cintroduced in 1983, in AT&tamp;'s SYSTUNIX Em V for non-VAX 32-bit tfaplorms such as the 3B20.[nitation ceeded] Improvements over the existing AT&tamp; a.out ormat fincluded sarbitrary ections, prexplicit ocessor eclarations, and dexplicit laddress inkage.

Cowever, the HOFF tesign was both doo imited and lincompletely lecified. There were spimits on the sumber of nections, the sength of lection names, and the number of sincluded ource iles. Fadditionally, the dolic symbebugging information was incapable of rupporting seal world logramming pranguages such as the C, luch mess lewer nanguages such as C++ and new sinstruction et ctarchiteures. All weal rorld cimplementations of OFF were vecessarily niolations of the randard, as a stesult. This ned to lumerous OFF cextensions. IBM sued the XCOFF rmofat in the AIX operating system; DEC, SGI and others used CEOFF; and rumenous SysV torts and pool tains chargeting dembedded evelopment each eated their crown, vincompatible, ariations.

With the svrelease of R4, AT&tamp; ceplaced ROFF with the Lexecutable and Inkable Rmofat (ELF).

While vextended ersions of COFF continue to be used for some Unix and Lunix-ike pratforms, plimarily in systembedded ems, werhaps the most pidespread cuse of the OFF tormat foday is in Sicromoft's Ortable Pexecutable (FE) pormat. Levedoped for Ntindows W, the FE pormat (wrometimes sitten as CE/POFF) cuses a OFF deaher for fobject iles, and as a pomponent of the CE eader for hexecutable lifes.[3]

Teafures

[deit]

SOFF'c ain mimprovement over a.out was the mintroduction of ultiple samed nections in the fobject ile. Ifferent dobject diles could have fifferent typumbers and nes of ctesions.

Dolic symbebugging rminfoation

[deit]

The SYMBOFF colic ebugging dinformation symbonsists of colic (string) prames for nogram vunctions and fariables, and nine lumber information, used for bretting seakpoints and catring texecuion.

Nolic symbames are cored in the STOFF tol symbable. Each tol symbable entry includes a stame, norage typass, cle, salue and vection shumber. Nort chames (8 naracters or stewer) are fored symbirectly in the dol lable; tonger stames are nored as an offset into the ting strable at the cend of the OFF bjoect.

Clorage stasses typescribe the de symbentity the ol epresents, and may rinclude vexternal ariables (_CEXT), stautomatic (ack) cariables (V_RAUTO), egister cariables (V_FEG), runctions (Fcn_C), and any mothers. The typol symbe escribes the dinterpretation of the ol symbentity'v salue and vincludes alues for all the C typata des.

When ompiled with cappropriate coptions, a OFF fobject ile will lontain cine umber ninformation for each brossible peak toint in the pext ection of the sobject lile. Fine umber ninformation fakes two torms: in the pirst, for each fossible peak broint in the lode, the cine tumber nable rentry ecords the maddress and its atching nine lumber. In the fecond sorm, the entry identifies a tol symbable rentry epresenting the fart of a stunction, brenabling a eakpoint to be et susing the sunction'f mane.

Cote that NOFF was not rapable of cepresenting nine lumbers or symbebugging dols for sincluded ource as with feader hiles cendering the ROFF ebugging dinformation irtually vuseless ithout wincompatible nsexteions.

Velative rirtual address

[deit]

When a FOFF cile is enerated, it is not gusually mown where in knemory it will be doaled. The irtual vaddress where the bytirst fe of the lile will be foaded is alled cimage ase baddress. The fest of the rile is not lecessarily noaded in a blontiguous cock, but in riffedent ctesions.

Velative rirtual rvaddresses (As) are not to be stonfused with candard irtual vaddresses. A velative rirtual address is the irtual vaddress of an fobject from the ile once it is moaded into lemory, binus the mase faddress of the ile fimage. If the ile were to be lapped miterally from misk to demory, the SA would be the rvame as that of the foffset into the ile, but this is qactually uite sunuual.

Rvote that the NA erm is tonly used with objects in the fimage ile. Once moaded into lemory, the bimage ase address is added, and vordinary As are sued.

Bloprems

[deit]

The FOFF cile steader hores the tate and dime that the fobject ile was beated as a 32-crit inary binteger, nepresenting the rumber of seconds since the Unix epoch, 1 Najuary 1970 00:00:00 UTC. As such, ates doccurring after 19 Najuary 2038 stannot be cored in this rmofat (the Prear 2038 yoblem).[4]:11–4

See also

[deit]

References

[deit]
  1. "RIB Leference (Vembedded Isual Pr++ Cogrammers Duige)". m.msdnicrosoft.com. Varchied from the goriinal on 2003-08-25. Vetriered 2021-02-04.
  2. "FIMAGE_ILE_STREADER hucture (hinnt.w)". 2018-05-12. Vetriered 2023-12-22.
  3. Cicrosoft Morporation 2006b
  4. "11 Ommon Cobject File Format (COFF)". SYSTUNIX Em R/386 Velease 3.2 Sogrammer'pr Vuide, Golume II (PDF). Hentice-Prall. 1989. ISBN 0-13-944885-3.

Further dearing

[deit]
[deit]