00001 #include <SectHeader.h> 00002 #include <Iterator.h> 00003 #include <Function.h> 00004 #include <LineInfoFinder.h> 00005 #include <XCoffFile.h> 00006 #include <DataExtender.h> 00007 00008 DataExtender::DataExtender(XCoffFile* xcoff,char* extension) 00009 : XCoffFileGen(xcoff,extension,0,NULL) 00010 { 00011 selectInstrumentationPoints(NULL); 00012 reserveDataForInstrumentation(); 00013 } 00014 00015 void DataExtender::verify(uint32_t written){ 00016 PRINT_INFOR("Verifying the two files are identical"); 00017 } 00018 00019 void DataExtender::reserveDataForInstrumentation() { 00020 00021 dataBufferEntryCount = 0; 00022 00023 uint32_t dataSectionSize = xcoffFile->getDataSectionSize(); 00024 uint64_t dataSectionBeginAddr = xcoffFile->getDataSectionVAddr(); 00025 00026 uint64_t currentFreeAddress = dataSectionBeginAddr + dataSectionSize; 00027 currentFreeAddress = nextAlignAddressWord(currentFreeAddress); 00028 currentFreeAddress += (0x2000*sizeof(uint32_t)); 00029 00030 extendedDataSize = currentFreeAddress - (dataSectionBeginAddr + dataSectionSize); 00031 }