ApplicationReportSPRAAO8–April2009CommonObjectFileFormat.....................................................................................................................................................ABSTRACTTheassemblerandlinkstepcreateobjectfilesincommonobjectfileformat(COFF).COFFisanimplementationofanobjectfileformatofthesamenamethatwasdevelopedbyAT&TforuseonUNIX-basedsystems.Thisformatencouragesmodularprogrammingandprovidespowerfulandflexiblemethodsformanagingcodesegmentsandtargetsystemmemory.ThisappendixcontainstechnicaldetailsabouttheTexasInstrumentsCOFFobjectfilestructure.MuchofthisinformationpertainstothesymbolicdebugginginformationthatisproducedbytheCcompiler.ThepurposeofthisapplicationnoteistoprovidesupplementaryinformationontheinternalformatofCOFFobjectfiles.Topic..................................................................................................Page1COFFFileStructure....................................................................22FileHeaderStructure..................................................................43OptionalFileHeaderFormat........................................................54SectionHeaderStructure.............................................................55StructuringRelocationInformation...............................................76SymbolTableStructureandContent...........................................11SPRAAO8–April2009CommonObjectFileFormat1SubmitDocumentationFeedback1COFFFileStructureFile�headerOptional�file�headerSection�1�headerSectionnheaderSection�1raw�dataSectionnraw�dataSection�1relocation�informationSectionnrelocation�informationSymbol�tableString�tableSection�headersRaw�data(executable�code�andinitialized�data)RelocationinformationCOFFFileStructurewww.ti.comTheelementsofaCOFFobjectfiledescribethefile'ssectionsandsymbolicdebugginginformation.Theseelementsinclude:•Afileheader•Optionalheaderinformation•Atableofsectionheaders•Rawdataforeachinitializedsection•Relocatio...