from .._ffi.base import py_str
from ..api import register_func
+
@register_func("tvm_callback_get_section_size")
def tvm_callback_get_section_size(binary_path, section_name, toolchain_prefix):
"""Finds size of the section in the binary.
size_output = size_output.decode("utf-8")
if size_proc.returncode != 0:
msg = "error in finding section size:\n"
- msg += py_str(out)
+ msg += py_str(size_output)
raise RuntimeError(msg)
# TODO(weberlo): Refactor this method and `*relocate_binary` so they are
return section_size + 32
return section_size
+
@register_func("tvm_callback_relocate_binary")
def tvm_callback_relocate_binary(
binary_path, text_addr, rodata_addr, data_addr, bss_addr, toolchain_prefix):