• R/O
  • SSH
  • HTTPS

peframework: Commit


Commit MetaInfo

Revision23 (tree)
Time2018-08-24 05:37:27
Authorquiret

Log Message

- beautification: removal of NULL in favor of C++11 nullptr

Change Summary

Incremental Difference

--- src/peloader.basereloc.cpp (revision 22)
+++ src/peloader.basereloc.cpp (revision 23)
@@ -172,4 +172,30 @@
172172
173173 this->AddRelocation( rva, relocType );
174174 }
175+}
176+
177+bool PEFile::WriteModulePointer( PESection *writeSect, std::uint32_t sectOff, std::uint32_t targetRVA )
178+{
179+ std::uint64_t vaPointer = ( this->sections.GetImageBase() + targetRVA );
180+
181+ writeSect->stream.Seek( sectOff );
182+
183+ bool success;
184+ bool is64bit = this->isExtendedFormat;
185+
186+ if ( is64bit )
187+ {
188+ success = writeSect->stream.WriteUInt64( vaPointer );
189+ }
190+ else
191+ {
192+ success = writeSect->stream.WriteUInt32( (std::uint32_t)( vaPointer ) );
193+ }
194+
195+ if ( success )
196+ {
197+ this->OnWriteAbsoluteVA( writeSect, sectOff, is64bit );
198+ }
199+
200+ return success;
175201 }
\ No newline at end of file
--- src/peloader.cpp (revision 22)
+++ src/peloader.cpp (revision 23)
@@ -163,7 +163,7 @@
163163 return chars;
164164 }
165165
166-PEFile::PESection::PESection( void ) : stream( NULL, 0, streamAllocMan )
166+PEFile::PESection::PESection( void ) : stream( nullptr, 0, streamAllocMan )
167167 {
168168 this->virtualSize = 0;
169169 this->virtualAddr = 0;
@@ -192,7 +192,7 @@
192192 this->chars.sect_mem_read = true;
193193 this->chars.sect_mem_write = false;
194194 this->isFinal = false;
195- this->ownerImage = NULL;
195+ this->ownerImage = nullptr;
196196 }
197197
198198 PEFile::PESection::~PESection( void )
@@ -202,7 +202,7 @@
202202 {
203203 LIST_FOREACH_BEGIN( PESectionAllocation, this->dataAllocList.root, sectionNode )
204204
205- item->theSection = NULL;
205+ item->theSection = nullptr;
206206 item->sectOffset = 0;
207207 item->dataSize = 0;
208208
@@ -227,7 +227,7 @@
227227 {
228228 LIST_FOREACH_BEGIN( PEPlacedOffset, this->RVAreferalList.root, targetNode )
229229
230- item->targetSect = NULL;
230+ item->targetSect = nullptr;
231231 item->dataOffset = 0;
232232 item->offsetIntoSect = 0;
233233
@@ -244,7 +244,7 @@
244244 {
245245 // This method is called if the section should be placed into a specific position into
246246 // a PE binary.
247- assert( this->ownerImage == NULL );
247+ assert( this->ownerImage == nullptr );
248248
249249 this->virtualAddr = virtAddr;
250250 this->virtualSize = virtSize;
@@ -277,7 +277,7 @@
277277 // Update meta-data.
278278 std::uint32_t alloc_off = allocBlock.sectionBlock.slice.GetSliceStartPoint();
279279
280- assert( allocBlock.theSection == NULL );
280+ assert( allocBlock.theSection == nullptr );
281281
282282 // We should at least serve the space on the executable section if we allocated there, even if
283283 // we do not initialize it.
@@ -355,10 +355,10 @@
355355 void PEFile::PESection::SetPlacedMemoryInline( PESectionAllocation& blockMeta, std::uint32_t allocOff, std::uint32_t allocSize )
356356 {
357357 assert( this->isFinal == true );
358- assert( this->ownerImage != NULL );
358+ assert( this->ownerImage != nullptr );
359359
360360 // We keep the block allocation structure invalid.
361- assert( blockMeta.theSection == NULL );
361+ assert( blockMeta.theSection == nullptr );
362362
363363 // Verify that this allocation really is inside the section.
364364 {
@@ -459,7 +459,7 @@
459459
460460 std::uint32_t PEFile::PESection::ResolveRVA( std::uint32_t sectOffset ) const
461461 {
462- assert( this->ownerImage != NULL );
462+ assert( this->ownerImage != nullptr );
463463
464464 return ( this->virtualAddr + sectOffset );
465465 }
@@ -745,7 +745,7 @@
745745 // Destroy all sections that still reside in us.
746746 LIST_FOREACH_BEGIN( PESection, this->sectionList.root, sectionNode )
747747
748- item->ownerImage = NULL;
748+ item->ownerImage = nullptr;
749749
750750 delete item;
751751
@@ -766,7 +766,7 @@
766766
767767 PEFile::PESection* PEFile::PESectionMan::AddSection( PESection&& theSection )
768768 {
769- assert( theSection.ownerImage == NULL );
769+ assert( theSection.ownerImage == nullptr );
770770
771771 // Before proceeding we must have finalized the section.
772772 // A final section must have a valid virtualSize region of all its allocations.
@@ -790,7 +790,7 @@
790790 if ( !foundSpace )
791791 {
792792 // In very critical scenarios the executable may be full!
793- return NULL;
793+ return nullptr;
794794 }
795795
796796 // We need to move the section into memory we control.
@@ -812,7 +812,7 @@
812812
813813 PEFile::PESection* PEFile::PESectionMan::PlaceSection( PESection&& theSection )
814814 {
815- assert( theSection.ownerImage == NULL );
815+ assert( theSection.ownerImage == nullptr );
816816
817817 // The section must be final because it requires a given offset and size.
818818 assert( theSection.isFinal == true );
@@ -832,7 +832,7 @@
832832 if ( !obtSpace )
833833 {
834834 // If this is triggered then most likely there is an invalid PE section configuration.
835- return NULL;
835+ return nullptr;
836836 }
837837
838838 // Now put the section into our space.
@@ -858,7 +858,7 @@
858858
859859 LIST_REMOVE( section->sectionNode );
860860
861- section->ownerImage = NULL;
861+ section->ownerImage = nullptr;
862862
863863 this->numSections--;
864864
@@ -919,7 +919,7 @@
919919 fileSpaceMan->ClearData();
920920
921921 // Reset buffer variables.
922- memPtr = NULL;
922+ memPtr = nullptr;
923923 streamSize = 0;
924924 }
925925 else
@@ -976,7 +976,7 @@
976976 }
977977
978978 // Get the buffer properties.
979- void *streamBuf = NULL;
979+ void *streamBuf = nullptr;
980980 std::uint32_t streamSize = 0;
981981
982982 eStorageType storageType = this->storageType;
@@ -989,7 +989,7 @@
989989
990990 PESection *accSect = this->sectRef.GetSection();
991991
992- assert( accSect != NULL );
992+ assert( accSect != nullptr );
993993
994994 streamBuf = ( (char*)accSect->stream.Data() + this->sectRef.ResolveInternalOffset( 0 ) );
995995 streamSize = this->sectRef.GetDataSize();
@@ -1022,7 +1022,7 @@
10221022
10231023 LIST_FOREACH_END
10241024
1025- return NULL;
1025+ return nullptr;
10261026 }
10271027
10281028 PEFile::PESection* PEFile::FindFirstAllocatableSection( void )
@@ -1034,7 +1034,7 @@
10341034
10351035 LIST_FOREACH_END
10361036
1037- return NULL;
1037+ return nullptr;
10381038 }
10391039
10401040 PEFile::PESection* PEFile::FindSectionByRVA( std::uint32_t rva, std::uint32_t *sectIndexOut, std::uint32_t *sectOffOut )
@@ -1050,7 +1050,7 @@
10501050 }
10511051
10521052 // Nothing found.
1053- return NULL;
1053+ return nullptr;
10541054 }
10551055
10561056 bool PEFile::RemoveSection( PESection *section )
@@ -1129,4 +1129,4 @@
11291129 bool PEFile::IsDynamicLinkLibrary( void ) const
11301130 {
11311131 return ( this->pe_finfo.isDLL );
1132-}
1132+}
--- src/peloader.exports.cpp (revision 22)
+++ src/peloader.exports.cpp (revision 23)
@@ -95,5 +95,5 @@
9595 }
9696 }
9797
98- return NULL;
98+ return nullptr;
9999 }
\ No newline at end of file
--- src/peloader.resource.cpp (revision 22)
+++ src/peloader.resource.cpp (revision 23)
@@ -25,7 +25,7 @@
2525 }
2626 }
2727
28- return NULL;
28+ return nullptr;
2929 }
3030
3131 std::wstring PEFile::PEResourceItem::GetName( void ) const
--- src/peloader.write.cpp (revision 22)
+++ src/peloader.write.cpp (revision 23)
@@ -82,7 +82,7 @@
8282 const auto& foundIter = map.find( key );
8383
8484 if ( foundIter == map.end() )
85- return (decltype(&foundIter->second))NULL;
85+ return (decltype(&foundIter->second))nullptr;
8686
8787 return &foundIter->second;
8888 }
@@ -518,7 +518,7 @@
518518
519519 if ( funcInfo.isForwarder )
520520 {
521- assert( finfo != NULL );
521+ assert( finfo != nullptr );
522522
523523 dataTabOffAlloc.RegisterTargetRVA( dataTabItemOff, expDirAlloc, finfo->forwarder_off );
524524 }
@@ -698,7 +698,7 @@
698698 // Create a memory copy of it.
699699 item_allocInfo *memChildAlloc = new item_allocInfo( std::move( childAlloc ) );
700700
701- assert( memChildAlloc != NULL );
701+ assert( memChildAlloc != nullptr );
702702
703703 try
704704 {
@@ -726,7 +726,7 @@
726726 // Create a memory item.
727727 item_allocInfo *memChildAlloc = new item_allocInfo( std::move( childAlloc ) );
728728
729- assert( memChildAlloc != NULL );
729+ assert( memChildAlloc != nullptr );
730730
731731 try
732732 {
--- src/peloader.read.cpp (revision 22)
+++ src/peloader.read.cpp (revision 23)
@@ -39,7 +39,7 @@
3939 {
4040 PESection *fileDataSect;
4141
42- bool gotLocation = sections.GetPEDataLocation( rva, NULL, &fileDataSect );
42+ bool gotLocation = sections.GetPEDataLocation( rva, nullptr, &fileDataSect );
4343
4444 if ( !gotLocation )
4545 {
@@ -234,21 +234,21 @@
234234
235235 // We need the program data aswell.
236236 // Assumption is that the data directly follows the header and ends in the new data ptr.
237- {
238- std::int32_t lfa_offset_data = dosHeader.e_lfanew;
239-
240- if ( lfa_offset_data < 0 )
241- {
242- throw peframework_exception(
243- ePEExceptCode::CORRUPT_PE_STRUCTURE,
244- "invalid MSDOS e_lfanew offset (negative)"
245- );
246- }
237+ {
238+ std::int32_t lfa_offset_data = dosHeader.e_lfanew;
247239
240+ if ( lfa_offset_data < 0 )
241+ {
242+ throw peframework_exception(
243+ ePEExceptCode::CORRUPT_PE_STRUCTURE,
244+ "invalid MSDOS e_lfanew offset (negative)"
245+ );
246+ }
247+
248248 std::uint32_t newDataOffset = (std::uint32_t)dosHeader.e_lfanew;
249-
250- // Only copy a possible stub if it exists.
251- if ( newDataOffset >= sizeof( dosHeader ) )
249+
250+ // Only copy a possible stub if it exists.
251+ if ( newDataOffset >= sizeof( dosHeader ) )
252252 {
253253 std::uint32_t sizeOfStubData = ( newDataOffset - sizeof( dosHeader ) );
254254
@@ -265,7 +265,7 @@
265265 }
266266 }
267267
268- dos.progData = std::move( progData );
268+ dos.progData = std::move( progData );
269269 }
270270 }
271271
@@ -746,7 +746,7 @@
746746 peStream->Seek( sectHeaderOff );
747747
748748 // Remember this section.
749- bool regSuccess = ( sections.PlaceSection( std::move( section ) ) != NULL );
749+ bool regSuccess = ( sections.PlaceSection( std::move( section ) ) != nullptr );
750750
751751 if ( !regSuccess )
752752 {
@@ -1334,7 +1334,7 @@
13341334
13351335 // Since the runtime function entry stores RVAs, we want to remember them
13361336 // relocation independent.
1337- PESection *beginAddrSect = NULL;
1337+ PESection *beginAddrSect = nullptr;
13381338 std::uint32_t beginAddrSectOff = 0;
13391339
13401340 if ( std::uint32_t BeginAddress = func.BeginAddress )
@@ -1349,7 +1349,7 @@
13491349 );
13501350 }
13511351 }
1352- PESection *endAddrSect = NULL;
1352+ PESection *endAddrSect = nullptr;
13531353 std::uint32_t endAddrSectOff = 0;
13541354
13551355 if ( std::uint32_t EndAddress = func.EndAddress )
@@ -1364,7 +1364,7 @@
13641364 );
13651365 }
13661366 }
1367- PESection *unwindInfoSect = NULL;
1367+ PESection *unwindInfoSect = nullptr;
13681368 std::uint32_t unwindInfoSectOff = 0;
13691369
13701370 if ( std::uint32_t UnwindInfoAddress = func.UnwindInfoAddress )
@@ -2057,4 +2057,4 @@
20572057 this->isExtendedFormat = isExtendedFormat; // important for casting certain offsets.
20582058
20592059 // Next thing we would need is writing support.
2060-}
2060+}
--- src/peloader.imports.cpp (revision 22)
+++ src/peloader.imports.cpp (revision 23)
@@ -16,7 +16,7 @@
1616 }
1717 }
1818
19- return NULL;
19+ return nullptr;
2020 }
2121
2222 PEFile::PEImportDesc& PEFile::EstablishImportDescriptor( const char *moduleName )
@@ -37,7 +37,7 @@
3737 const PEFile::PEImportDesc::importFunc* PEFile::PEImportDesc::FindImportEntry( std::uint16_t ordinal_hint, const char *name, bool isOrdinalImport, std::uint32_t *indexOut ) const
3838 {
3939 std::uint32_t index = 0;
40- const PEImportDesc::importFunc *funcOut = NULL;
40+ const PEImportDesc::importFunc *funcOut = nullptr;
4141
4242 for ( const PEImportDesc::importFunc& impFunc : this->funcs )
4343 {
--- include/peloader.h (revision 22)
+++ include/peloader.h (revision 23)
@@ -138,8 +138,8 @@
138138 : shortName( std::move( right.shortName ) ), virtualSize( std::move( right.virtualSize ) ),
139139 virtualAddr( std::move( right.virtualAddr ) ), relocations( std::move( right.relocations ) ),
140140 linenumbers( std::move( right.linenumbers ) ), chars( std::move( right.chars ) ),
141- isFinal( std::move( right.isFinal ) ),
142- placedOffsets( std::move( right.placedOffsets ) ), RVAreferalList( std::move( right.RVAreferalList ) ),
141+ isFinal( std::move( right.isFinal ) ),
142+ placedOffsets( std::move( right.placedOffsets ) ), RVAreferalList( std::move( right.RVAreferalList ) ),
143143 dataAlloc( std::move( right.dataAlloc ) ),
144144 dataRefList( std::move( right.dataRefList ) ), dataAllocList( std::move( right.dataAllocList ) ),
145145 streamAllocMan( std::move( right.streamAllocMan ) ), stream( std::move( right.stream ) )
@@ -164,7 +164,7 @@
164164 {
165165 this->sectionNode.moveFrom( std::move( right.sectionNode ) );
166166
167- right.ownerImage = NULL;
167+ right.ownerImage = nullptr;
168168 }
169169
170170 this->ownerImage = ownerImage;
@@ -176,7 +176,7 @@
176176 {
177177 LIST_REMOVE( this->sectionNode );
178178
179- this->ownerImage = NULL;
179+ this->ownerImage = nullptr;
180180 }
181181 }
182182
@@ -313,7 +313,7 @@
313313 {
314314 friend struct PESection;
315315
316- inline PESectionReference( PESection *theSect = NULL )
316+ inline PESectionReference( PESection *theSect = nullptr )
317317 {
318318 this->theSect = theSect;
319319
@@ -338,7 +338,7 @@
338338 this->sectionNode.moveFrom( std::move( right.sectionNode ) );
339339
340340 // We turn the moved-from object invalid.
341- right.theSect = NULL;
341+ right.theSect = nullptr;
342342 }
343343 }
344344
@@ -348,7 +348,7 @@
348348 {
349349 LIST_REMOVE( this->sectionNode );
350350
351- this->theSect = NULL;
351+ this->theSect = nullptr;
352352 }
353353 }
354354
@@ -371,7 +371,7 @@
371371 // Called when unlinking from list in internal process.
372372 virtual void clearLink( void )
373373 {
374- this->theSect = NULL;
374+ this->theSect = nullptr;
375375 }
376376
377377 PESection *theSect;
@@ -415,7 +415,7 @@
415415
416416 inline std::uint32_t GetSectionOffset( void ) const
417417 {
418- if ( this->theSect == NULL )
418+ if ( this->theSect == nullptr )
419419 {
420420 return 0;
421421 }
@@ -425,7 +425,7 @@
425425
426426 inline std::uint32_t GetRVA( void ) const
427427 {
428- if ( this->theSect == NULL )
428+ if ( this->theSect == nullptr )
429429 {
430430 // Zero RVA is valid.
431431 return 0;
@@ -436,7 +436,7 @@
436436
437437 inline std::uint32_t GetDataSize( void ) const
438438 {
439- if ( this->theSect == NULL )
439+ if ( this->theSect == nullptr )
440440 {
441441 return 0;
442442 }
@@ -485,7 +485,7 @@
485485 {
486486 this->targetNode.moveFrom( std::move( right.targetNode ) );
487487
488- right.targetSect = NULL;
488+ right.targetSect = nullptr;
489489 }
490490 }
491491
@@ -535,7 +535,7 @@
535535
536536 inline PESectionAllocation( void )
537537 {
538- this->theSection = NULL;
538+ this->theSection = nullptr;
539539 this->sectOffset = 0;
540540 this->dataSize = 0;
541541 }
@@ -563,7 +563,7 @@
563563 }
564564
565565 // Invalidate the old section.
566- right.theSection = NULL;
566+ right.theSection = nullptr;
567567 }
568568 inline PESectionAllocation( const PESectionAllocation& right ) = delete;
569569
@@ -582,7 +582,7 @@
582582 // General list remove.
583583 LIST_REMOVE( this->sectionNode );
584584
585- this->theSection = NULL;
585+ this->theSection = nullptr;
586586 }
587587 }
588588
@@ -629,7 +629,7 @@
629629
630630 inline std::uint32_t ResolveInternalOffset( std::uint32_t offsetInto ) const
631631 {
632- if ( this->theSection == NULL )
632+ if ( this->theSection == nullptr )
633633 {
634634 throw peframework_exception(
635635 ePEExceptCode::RUNTIME_ERROR,
@@ -644,7 +644,7 @@
644644 {
645645 PESection *theSection = this->theSection;
646646
647- if ( theSection == NULL )
647+ if ( theSection == nullptr )
648648 {
649649 throw peframework_exception(
650650 ePEExceptCode::RUNTIME_ERROR,
@@ -657,7 +657,7 @@
657657
658658 inline bool IsAllocated( void ) const
659659 {
660- return ( theSection != NULL );
660+ return ( theSection != nullptr );
661661 }
662662
663663 inline PESectionAllocation CloneOnlyFinal( void ) const
@@ -664,7 +664,7 @@
664664 {
665665 PESection *allocSect = this->theSection;
666666
667- if ( allocSect == NULL )
667+ if ( allocSect == nullptr )
668668 {
669669 return PESectionAllocation();
670670 }
@@ -724,7 +724,7 @@
724724
725725 inline std::uint32_t GetVirtualAddress( void ) const
726726 {
727- if ( this->ownerImage == NULL )
727+ if ( this->ownerImage == nullptr )
728728 {
729729 throw peframework_exception(
730730 ePEExceptCode::RUNTIME_ERROR,
@@ -861,7 +861,7 @@
861861 {
862862 inline PEDataStream( void )
863863 {
864- this->accessSection = NULL;
864+ this->accessSection = nullptr;
865865 this->dataOffset = 0;
866866 this->seek_off = 0;
867867 }
@@ -1017,7 +1017,7 @@
10171017
10181018 // Function to get the section and the offset into it for a RVA.
10191019 template <typename sectLocationProviderType>
1020- inline bool GetPEDataLocationGeneric( const sectLocationProviderType& sectLocProv, std::uint32_t rvirtAddr, std::uint32_t rvirtSize, std::uint32_t *allocOffOut, PESection **allocSectOut = NULL, std::uint32_t *sectIndexOut = NULL ) const
1020+ inline bool GetPEDataLocationGeneric( const sectLocationProviderType& sectLocProv, std::uint32_t rvirtAddr, std::uint32_t rvirtSize, std::uint32_t *allocOffOut, PESection **allocSectOut = nullptr, std::uint32_t *sectIndexOut = nullptr ) const
10211021 {
10221022 typedef sliceOfData <std::uint32_t> memSlice_t;
10231023
@@ -1083,7 +1083,7 @@
10831083 };
10841084
10851085 public:
1086- inline bool GetPEDataLocation( std::uint32_t rvirtAddr, std::uint32_t *allocOffOut, PESection **allocSectOut = NULL, std::uint32_t *sectIndexOut = NULL ) const
1086+ inline bool GetPEDataLocation( std::uint32_t rvirtAddr, std::uint32_t *allocOffOut, PESection **allocSectOut = nullptr, std::uint32_t *sectIndexOut = nullptr ) const
10871087 {
10881088 mainSectLocProv locProv;
10891089
@@ -1090,7 +1090,7 @@
10901090 return GetPEDataLocationGeneric( locProv, rvirtAddr, 1, allocOffOut, allocSectOut, sectIndexOut );
10911091 }
10921092
1093- inline bool GetPEDataLocationEx( std::uint32_t rvirtAddr, std::uint32_t rvirtSize, std::uint32_t *allocOffOut, PESection **allocSectOut = NULL, std::uint32_t *sectIndexOut = NULL ) const
1093+ inline bool GetPEDataLocationEx( std::uint32_t rvirtAddr, std::uint32_t rvirtSize, std::uint32_t *allocOffOut, PESection **allocSectOut = nullptr, std::uint32_t *sectIndexOut = nullptr ) const
10941094 {
10951095 mainSectLocProv locProv;
10961096
@@ -1102,7 +1102,7 @@
11021102 inline bool GetPEDataStreamGeneric(
11031103 const sectLocationProviderType& sectLocProv,
11041104 std::uint32_t rvirtAddr, PEDataStream& streamOut,
1105- PESection **allocSectOut = NULL
1105+ PESection **allocSectOut = nullptr
11061106 )
11071107 {
11081108 // We return a stream into a section.
@@ -1126,7 +1126,7 @@
11261126
11271127 inline bool GetPEDataStream(
11281128 std::uint32_t rvirtAddr, PEDataStream& streamOut,
1129- PESection **allocSectOut = NULL
1129+ PESection **allocSectOut = nullptr
11301130 )
11311131 {
11321132 mainSectLocProv locProv;
@@ -1379,7 +1379,7 @@
13791379 PESection* PlaceSection( PESection&& theSection );
13801380 PESection* FindFirstSectionByName( const char *name );
13811381 PESection* FindFirstAllocatableSection( void );
1382- PESection* FindSectionByRVA( std::uint32_t rva, std::uint32_t *sectIndexOut = NULL, std::uint32_t *sectOffOut = NULL );
1382+ PESection* FindSectionByRVA( std::uint32_t rva, std::uint32_t *sectIndexOut = nullptr, std::uint32_t *sectOffOut = nullptr );
13831383 bool RemoveSection( PESection *section );
13841384
13851385 std::uint32_t GetSectionCount( void ) const { return this->sections.GetSectionCount(); }
@@ -1528,7 +1528,7 @@
15281528 typedef std::vector <importFunc> functions_t;
15291529
15301530 // Query API.
1531- const importFunc* FindImportEntry( std::uint16_t ordinal_hint, const char *name, bool isOrdinalImport, std::uint32_t *indexOut = NULL ) const;
1531+ const importFunc* FindImportEntry( std::uint16_t ordinal_hint, const char *name, bool isOrdinalImport, std::uint32_t *indexOut = nullptr ) const;
15321532
15331533 // Helper API.
15341534 static functions_t ReadPEImportFunctions( PESectionMan& sections, std::uint32_t rva, PESectionAllocation& allocEntry, bool isExtendedFormat );
@@ -1981,6 +1981,9 @@
19811981
19821982 void OnWriteAbsoluteVA( PESection *writeSect, std::uint32_t sectOff, bool is64Bit );
19831983
1984+ // Data writing helpers.
1985+ bool WriteModulePointer( PESection *writeSect, std::uint32_t sectOff, std::uint32_t targetRVA );
1986+
19841987 // Import API.
19851988 PEImportDesc* FindImportDescriptor( const char *moduleName );
19861989 PEImportDesc& EstablishImportDescriptor( const char *moduleName );
@@ -2002,4 +2005,4 @@
20022005 void CommitDataDirectories( void );
20032006 };
20042007
2005-#endif //_PELOADER_CORE_
2008+#endif //_PELOADER_CORE_
--- include/pestream.h (revision 22)
+++ include/pestream.h (revision 23)
@@ -1,6 +1,7 @@
11 #ifndef _PEFRAMEWORK_STREAM_
22 #define _PEFRAMEWORK_STREAM_
33
4+// For size_t.
45 #include <cstddef>
56
67 #include <sdk/MacroUtils.h>
--- include/peframework.h (revision 22)
+++ include/peframework.h (revision 23)
@@ -4,7 +4,6 @@
44 #define _PEFRAMEWORK_MAIN_INCLUDE_
55
66 // Basic dependencies.
7-#include <cstddef>
87 #include <sdk/MacroUtils.h>
98
109 // Exception info needs first.
Show on old repository browser