Module
A Module represents a single binary (library or executable).
The corresponding Protobuf message type is Module
.
Guaranteed Properties
- A Module is a Node.
- Each Module object must be an AuxDataContainer.
- Each Module object must have the following information, and the API must provide functionality for getting and setting each.
- binary_path
- preferred_addr
- rebase_delta
- file_format
- isa
- name (as a non-empty string)
- sections (as a collection of Section, order defined by target language)
- symbols (as a collection of Symbol, order defined by target language)
- proxy_blocks (as a collection of ProxyBlock, order defined by target language)
- entry_point (as a CodeBlock, or null if empty)
- Functionality for conversion to and from a Protobuf message of type
Module
must be provided, and must account for the required fields listed above.
- Each Module must belong to either zero (0) or one (1) IR objects. The owning IR must be stored as a reference.
- This reference may be null, in which case the Module is freestanding and does not belong to any IR.
- The reference must be readable.
- If the reference is writable, setting it must automatically update the module sets for the affected IR object or objects (there will be at most two).
- The following operations must be available for the set of Section objects in the Module.
- Find all Section objects that intersect a given address or range of addresses.
- Find all Section objects that begin at a given address or range of addresses. This operation must complete in O(log n) time, where m is the size of the returned set and n is the number of Section objects in the Module.
API Implementations
The guaranteed functionality is provided as follows.
Module Classes and AuxDataContainer functionality
Required Field Getters/Setters
binary_path
preferred_addr
rebase_delta
file_format
isa
name
sections
symbols
proxy_blocks
entry_point
Associated IR
Find Section Objects...
[*] Address range checking is not yet implemented for Common Lisp at-address
Links