The following table lists the ElfFile object's member functions.
ElfFile.crc32(address, length, virtualNotPhysical, padding, programNotSection) returns the CRC-32 checksum of an address range length bytes long, located at address. If virtualNotPhysical is true or undefined, address is a virtual address otherwise it is a physical address. If padding is defined, it specifies the byte value used to fill gaps in the program. If programNotSection is true or undefined, data is read using program headers rather than section headers. This function computes a CRC-32 checksum on a block of data using the standard CRC-32 polynomial (0x04C11DB7) with an initial value of 0xFFFFFFFF. Note that this implementation doesn't reflect the input or the output and the result is inverted. |
ElfFile.findProgram(address) returns an object with start, the data and the size to allocate of the Elf program that contains address. |
ElfFile.getEntryPoint() returns the entry point in the ELF file. |
ElfFile.getSection(name) returns an object with start and the data of the Elf section corresponding to the name. |
ElfFile.isLittleEndian() returns true if the Elf file has numbers encoded as little endian. |
ElfFile.load(path) loads Elf file from path. |
ElfFile.peekBytes(address, length, virtualNotPhysical, padding, programNotSection) returns byte array containing length bytes peeked from address. If virtualNotPhysical is true or undefined, address is a virtual address otherwise it is a physical address. If padding is defined, it specifies the byte value used to fill gaps in the program. If programNotSection is true or undefined, data is read using program headers rather than section headers. |
ElfFile.peekUint32(address, virtualNotPhysical) returns a 32-bit word peeked from address. If virtualNotPhysical is true or undefined, address is a virtual address otherwise it is a physical address. |
ElfFile.pokeBytes(address, byteArray, virtualNotPhysical) poke byte array byteArray to address. If virtualNotPhysical is true or undefined, address is a virtual address otherwise it is a physical address. |
ElfFile.pokeUint32(address, value, virtualNotPhysical) poke a value to 32-bit word located at address. If virtualNotPhysical is true or undefined, address is a virtual address otherwise it is a physical address. |
ElfFile.save(path) saves Elf file to path. |
ElfFile.symbolValue(symbol) returns the value of symbol in Elf file. |