|
|
|
@ -4,11 +4,11 @@ from .Exceptions import *
|
|
|
|
|
from .helpers import parse_numeric_argument, align_addr
|
|
|
|
|
|
|
|
|
|
import typing
|
|
|
|
|
|
|
|
|
|
if typing.TYPE_CHECKING:
|
|
|
|
|
from .Tokenizer import RiscVInstructionToken
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
|
|
|
class MemoryFlags:
|
|
|
|
|
read_only: bool
|
|
|
|
@ -60,6 +60,15 @@ class Executable:
|
|
|
|
|
symbols: Dict[str, Tuple[str, int]]
|
|
|
|
|
stack_pref: Optional[int]
|
|
|
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
|
return "{}(sections = {}, symbols = {}, stack = {}, run_ptr = {})".format(
|
|
|
|
|
self.__class__.__name__,
|
|
|
|
|
" ".join(self.sections.keys()),
|
|
|
|
|
" ".join(self.symbols.keys()),
|
|
|
|
|
self.stack_pref,
|
|
|
|
|
self.run_ptr
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### LOADING CODE
|
|
|
|
|
|
|
|
|
|