Esempio n. 1
0
 internal unsafe RuntimeElfSection(string name, ElfSectionHeader *header, Addr physAddr)
 {
     _Name  = name;
     Header = header;
     _Data  = new MemoryAllocation(physAddr, (int)header->Size)
     {
         Disposable = false,
     };
 }
Esempio n. 2
0
 public uint GetSectionPhysAddr(ElfSectionHeader *section)
 {
     if (PhyOffset > 0)
     {
         return(section->Offset + PhyOffset);
     }
     else
     {
         return(section->Addr);
     }
 }
Esempio n. 3
0
 public void Init()
 {
     SymTab = GetSectionHeader(".symtab");
     StrTab = GetSectionHeader(".strtab");
     Text   = GetSectionHeader(".text");
 }
Esempio n. 4
0
 public NullTerminatedString *GeSectionName(ElfSectionHeader *section)
 {
     return(GetStringByOffset(StringTableSectionHeader, section->Name));
 }
Esempio n. 5
0
 private NullTerminatedString *GetStringByOffset(ElfSectionHeader *section, uint offset)
 {
     return((NullTerminatedString *)(GetSectionPhysAddr(section) + offset));
 }