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
-
Channel type
CT.ELFLOAD- ELF loader channel-type-
Variable
in?- Requests to loader -
Variable
out!- Responses from loader -
Variable
return?- Used to close connection
-
Variable
-
Channel type
CT.ELFLOADSRV- ELF loader service channel-type-
Variable
in?- Requests to elf loader service -
Variable
out!- Responses from elf loader service
-
Variable
-
Record
ELFLOAD.RELOC- Detailed ELF relocation information-
Variable
addend- Addend extracted from rel.sec section -
Variable
link.sec- Symbol-table section -
Variable
rel- Relocation information -
Variable
rel.sec- Section where relocation happens -
Variable
sym- Symbol involved in relocation
-
Variable
-
Record
ELFLOAD.SHDR- Named section header type -
Record
ELFLOAD.SYM- Named ELF symbol type -
Protocol
P.ELFLOAD.IN- ELF loader input protocol-
Tag
get.header- Get the ELF header, responds with elf.header or result -
Tag
get.reloc.table- Get the relocation table contents, responds with elf.reltable or result -
Tag
get.section.data- Get the contents of a section (raw), responds with elf.section.data or result -
Tag
get.section.header- Get a section header, responds with elf.section.header or result -
Tag
get.section.headers- Get all section headers, responds with elf.secheaders or result -
Tag
get.section.name- Get the name of a section, responds with elf.section.data or result -
Tag
get.symbol.table- Get the symbol table contents, responds with elf.symtable or result -
Tag
set.file- Set the file (used once, first), responds with result and additionally file.return on error -
Tag
set.fname- Set the filename (used once, first), responds with result
-
Tag
-
Protocol
P.ELFLOAD.OUT- ELF loader output protocol-
Tag
elf.header- ELF header -
Tag
elf.reltable- ELF relocations -
Tag
elf.secheaders- ELF section headers -
Tag
elf.section.data- ELF section data -
Tag
elf.section.header- ELF section header -
Tag
elf.symtable- ELF symbols -
Tag
file.return- File handle returned -
Tag
result- General result
-
Tag
-
Protocol
P.ELFLOADSRV.IN- ELF loader service input protocol-
Tag
new.loader- Create new loader, responds with loader or result
-
Tag
-
Protocol
P.ELFLOADSRV.OUT- ELF loader service output protocol-
Tag
loader- ELF loader client service -
Tag
result- Generic result
-
Tag
-
Process
elfload.service- ELF loader for RMoX
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:
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.