File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ class ProfiledBinary {
199199  //  The runtime base address that the first executable segment is loaded at.
200200  uint64_t  BaseAddress = 0 ;
201201  //  The runtime base address that the first loadabe segment is loaded at.
202-   uint64_t  FirstLoadableAddress =  0 ;
202+   std::optional< uint64_t >  FirstLoadableAddress;
203203  //  The preferred load address of each executable segment.
204204  std::vector<uint64_t > PreferredTextSegmentAddresses;
205205  //  The file offset of each executable segment.
@@ -381,7 +381,10 @@ class ProfiledBinary {
381381    return  PreferredTextSegmentAddresses[0 ];
382382  }
383383  //  Return the preferred load address for the first loadable segment.
384-   uint64_t  getFirstLoadableAddress () const  { return  FirstLoadableAddress; }
384+   uint64_t  getFirstLoadableAddress () const  {
385+     assert (FirstLoadableAddress && " FirstLoadableAddress must be set."  );
386+     return  *FirstLoadableAddress;
387+   }
385388  //  Return the file offset for the first executable segment.
386389  uint64_t  getTextSegmentOffset () const  { return  TextSegmentOffsets[0 ]; }
387390  const  std::vector<uint64_t > &getPreferredTextSegmentAddresses () const  {
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments