Module service:elfload - ELF loader service

ELF loader service. This service is used to load and inspect ELF object files within RMoX, for program and module loading, and for application use generally.

Index

Declarations

elfload.occ:56Process elfload.service

PROC elfload.service (CT.SERVICE? in, SHARED CT.DRIVER! to.drv, SHARED CT.KERNEL! to.kernel, VAL []BYTE options, SHARED LOG! log)

ELF loader for RMoX. This service is used for loading ELF binary data into a running RMoX system. More generally, it allows any ELF binary to be loaded and examined, for use with other applications that may need this functionality.

Parameters:

CT.SERVICE? in Connection from service core ().
SHARED CT.DRIVER! to.drv Connection to driver core ().
SHARED CT.KERNEL! to.kernel Connection to kernel.
VAL []BYTE options Options to service.
SHARED LOG! log System log channels.

elfload.inc:25Record ELFLOAD.SHDR

DATA TYPE ELFLOAD.SHDR

Named section header type.

elfload.inc:33Record ELFLOAD.SYM

DATA TYPE ELFLOAD.SYM

Named ELF symbol type.

elfload.inc:41Record ELFLOAD.RELOC

DATA TYPE ELFLOAD.RELOC

Detailed ELF relocation information.

elfload.inc:43Variable link.sec

INT

Symbol-table section.

elfload.inc:44Variable rel.sec

INT

Section where relocation happens.

elfload.inc:45Variable rel

ELF32.REL

Relocation information.

elfload.inc:46Variable sym

ELFLOAD.SYM

Symbol involved in relocation.

elfload.inc:47Variable addend

INT

Addend extracted from rel.sec section.

elfload.inc:51Protocol P.ELFLOAD.IN

PROTOCOL P.ELFLOAD.IN

ELF loader input protocol.

elfload.inc:53Tag set.fname

set.fname; MOBILE []BYTE

Set the filename (used once, first), responds with result.

elfload.inc:54Tag set.file

set.file; CT.FILE!

Set the file (used once, first), responds with result and additionally file.return on error.

elfload.inc:56Tag get.header

get.header

Get the ELF header, responds with elf.header or result.

elfload.inc:57Tag get.section.header

get.section.header; INT

Get a section header, responds with elf.section.header or result.

elfload.inc:58Tag get.section.name

get.section.name; INT

Get the name of a section, responds with elf.section.data or result.

elfload.inc:59Tag get.section.data

get.section.data; INT

Get the contents of a section (raw), responds with elf.section.data or result.

elfload.inc:60Tag get.section.headers

get.section.headers

Get all section headers, responds with elf.secheaders or result.

elfload.inc:61Tag get.symbol.table

get.symbol.table

Get the symbol table contents, responds with elf.symtable or result.

elfload.inc:62Tag get.reloc.table

get.reloc.table

Get the relocation table contents, responds with elf.reltable or result.

elfload.inc:66Protocol P.ELFLOAD.OUT

PROTOCOL P.ELFLOAD.OUT

ELF loader output protocol.

elfload.inc:68Tag result

result; INT

General result.

elfload.inc:69Tag file.return

file.return; CT.FILE!

File handle returned.

elfload.inc:71Tag elf.header

elf.header; ELF32.EHDR

ELF header.

elfload.inc:72Tag elf.section.header

elf.section.header; ELFLOAD.SHDR

ELF section header.

elfload.inc:73Tag elf.section.data

elf.section.data; MOBILE []BYTE

ELF section data.

elfload.inc:74Tag elf.secheaders

elf.secheaders; MOBILE []ELFLOAD.SHDR

ELF section headers.

elfload.inc:75Tag elf.symtable

elf.symtable; MOBILE []ELFLOAD.SYM

ELF symbols.

elfload.inc:76Tag elf.reltable

elf.reltable; MOBILE []ELFLOAD.RELOC

ELF relocations.

elfload.inc:80Channel type CT.ELFLOAD

RECURSIVE CHAN TYPE CT.ELFLOAD

ELF loader channel-type.

elfload.inc:82Variable in?

CHAN P.ELFLOAD.IN

Requests to loader.

elfload.inc:83Variable out!

CHAN P.ELFLOAD.OUT

Responses from loader.

elfload.inc:84Variable return?

CHAN CT.ELFLOAD!

Used to close connection.

elfload.inc:88Protocol P.ELFLOADSRV.IN

PROTOCOL P.ELFLOADSRV.IN

ELF loader service input protocol.

elfload.inc:90Tag new.loader

new.loader

Create new loader, responds with loader or result.

elfload.inc:94Protocol P.ELFLOADSRV.OUT

PROTOCOL P.ELFLOADSRV.OUT

ELF loader service output protocol.

elfload.inc:96Tag loader

loader; CT.ELFLOAD!

ELF loader client service.

elfload.inc:97Tag result

result; INT

Generic result.

elfload.inc:101Channel type CT.ELFLOADSRV

CHAN TYPE CT.ELFLOADSRV

ELF loader service channel-type.

elfload.inc:103Variable in?

CHAN P.ELFLOADSRV.IN

Requests to elf loader service.

elfload.inc:104Variable out!

CHAN P.ELFLOADSRV.OUT

Responses from elf loader service.