public abstract RelocationTypeToString ( uint type ) : string | ||
type | uint | |
Résultat | string |
public List <ElfSymbol> RelocateEntries(Program program, ulong offStrtab, ulong offSymtab, ulong symEntrySize) { var offRela = relocator.Loader.AddressToFileOffset(VirtualAddress); var rdrRela = relocator.Loader.CreateReader(offRela); var offRelaEnd = (long)(offRela + TableSize); var symbols = new List <ElfSymbol>(); while (rdrRela.Offset < offRelaEnd) { var relocation = ReadRelocation(rdrRela); var elfSym = relocator.Loader.EnsureSymbol(offSymtab, relocation.SymbolIndex, symEntrySize, offStrtab); Debug.Print(" {0}: symbol {1} type: {2}", relocation, elfSym, relocator.RelocationTypeToString((byte)relocation.Info)); relocator.RelocateEntry(program, elfSym, null, relocation); symbols.Add(elfSym); } return(symbols); }
public List <(Address, ElfSymbol, ElfSymbol)> RelocateEntries(Program program, ulong offStrtab, ulong offSymtab, ulong symEntrySize) { var offRela = relocator.Loader.AddressToFileOffset(VirtualAddress); var rdrRela = relocator.Loader.CreateReader(offRela); var offRelaEnd = (long)(offRela + TableSize); var symbols = new List <(Address, ElfSymbol, ElfSymbol)>(); while (rdrRela.Offset < offRelaEnd) { var relocation = ReadRelocation(rdrRela); var elfSym = relocator.Loader.EnsureSymbol(offSymtab, relocation.SymbolIndex, symEntrySize, offStrtab); if (elfSym == null) { continue; } ElfImageLoader.trace.Verbose(" {0}: symbol {1} type: {2} addend: {3:X}", relocation, elfSym, relocator.RelocationTypeToString((byte)relocation.Info), relocation.Addend); var(addrRelocation, newSym) = relocator.RelocateEntry(program, elfSym, null, relocation); if (addrRelocation != null) { symbols.Add((addrRelocation, elfSym, newSym)); } } return(symbols); }