elflib
Version:
ELF file reader and writer
24 lines (23 loc) • 1.43 kB
TypeScript
/// <reference types="node" />
import * as ELF from './types/index.js';
import { Reader } from './reader.js';
export declare function getString(strings: {
[index: number]: string;
}, index: number): string;
export declare function readStringSection(section: ELF.Section): {
[index: number]: string;
};
export declare function readSymbolsSection(section: ELF.Section, endian: ELF.Endian, bits: 32 | 64): ELF.Symbol[];
export declare function readRelocationSection(section: ELF.Section, endian: ELF.Endian, bits: 32 | 64): ELF.Relocation[];
export declare function readSectionHeaderEntries(fh: Reader, elfheader: ELF.Header, readSymbolData: boolean): Promise<ELF.Section[]>;
export declare function isStringSection(section: ELF.Section): section is ELF.StringSection;
export declare function isSymbolSection(section: ELF.Section): section is ELF.SymbolSection;
export declare function isRelocationSection(section: ELF.Section): section is ELF.RelocationSection;
export declare function parseSymInfo(symInfo: number): {
symidx: number;
type: number;
};
export declare function packSymInfo(symIdx: number, type: number): number;
export declare function packStringSection(section: ELF.StringSection, size: number): Buffer;
export declare function packSymbolSection(section: ELF.SymbolSection, size: number): Buffer;
export declare function packRelocationSection(section: ELF.RelocationSection, size: number): Buffer;