elflib
Version:
ELF file reader and writer
21 lines (20 loc) • 1.02 kB
TypeScript
/// <reference types="node" />
import * as elflib from './types/index.js';
import { FileHandle } from 'fs/promises';
import { OpenOptions } from './parser.js';
/** Parse an ELF file.
* @param {any} input the path to the ELF file, or the data for the file.
* @param {OpenOptions} [options] options for the parser.
* @returns {Promise<elflib.File>} a result indicating the success or failure of parsing and the data for the ELF file. */
export declare function open(input: Uint8Array | ArrayBuffer | number[] | string | number | FileHandle, options?: OpenOptions): Promise<elflib.File>;
/** Pack an ELF file back to binary.
* @param {elflib.File} elf the ELF object to pack.
* @returns {Promise<Buffer>} the binary buffer for the ELF file. */
export declare function pack(elf: elflib.File): Promise<Buffer>;
export * from './reader.js';
export * from './elf.js';
export * from './types/index.js';
export * from './debug.js';
export * from './rplsections.js';
export * from './sections.js';
export { OpenOptions };