Beispiel #1
0
 public ElfObjectLinker(ElfLoader loader, IProcessorArchitecture arch, byte[] rawImage)
 {
     if (rawImage == null)
         throw new ArgumentNullException("rawImage");
     this.loader = loader;
     this.arch = arch;
     this.rawImage = rawImage;
 }
Beispiel #2
0
 public override Program Load(Address addrLoad)
 {
     LoadElfIdentification();
     this.innerLoader = CreateLoader();
     if (addrLoad == null)
         addrLoad = innerLoader.DefaultAddress;
     var platform = innerLoader.LoadPlatform(osAbi, innerLoader.Architecture);
     int cHeaders = innerLoader.LoadProgramHeaderTable();
     innerLoader.LoadSectionHeaders();
     innerLoader.LoadSymbols();
     //innerLoader.Dump();           // This spews a lot into the unit test output.
     if (cHeaders > 0)
     {
         return innerLoader.LoadImage(platform, RawImage);
     }
     else
     {
         var linker = innerLoader.CreateLinker();
         return linker.LinkObject(platform, addrLoad, RawImage);
     }
 }
 public DynamicSectionRenderer64(ElfLoader loader, ElfSection shdr)
 {
     this.loader = loader;
     this.shdr   = shdr;
 }
Beispiel #4
0
 public ElfObjectLinker(ElfLoader loader, IProcessorArchitecture arch, byte[] rawImage)
 {
     this.loader   = loader;
     this.arch     = arch;
     this.rawImage = rawImage ?? throw new ArgumentNullException("rawImage");
 }