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