mirror of https://github.com/zeldaret/tp.git
36 lines
763 B
Python
36 lines
763 B
Python
|
|
from dataclasses import dataclass, field
|
|
|
|
from ..builder import AsyncBuilder
|
|
from .symbol import *
|
|
from .base import *
|
|
|
|
@dataclass(eq=False)
|
|
class LinkerGenerated(ArbitraryData):
|
|
|
|
@property
|
|
def is_static(self):
|
|
return False
|
|
|
|
@property
|
|
def has_body(self):
|
|
return False
|
|
|
|
async def export_declaration(self, exporter, builder: AsyncBuilder):
|
|
await builder.write(f"/* generated by the linker */")
|
|
|
|
@staticmethod
|
|
def create(identifier: Identifier, addr: int, size: int) -> "LinkerGenerated":
|
|
return LinkerGenerated(
|
|
identifier=identifier,
|
|
data_type=U8,
|
|
addr=addr,
|
|
size=size,
|
|
padding=0,
|
|
data=[],
|
|
padding_data=[]
|
|
)
|
|
|
|
|
|
|