def asm_and_link_one_file(asm_path: str, work_dir: str) -> str:
    'Assemble and link file at asm_path in work_dir.\n\n    Returns the path to the resulting ELF\n\n    '
    otbn_as = os.path.join(UTIL_DIR, 'otbn-as')
    otbn_ld = os.path.join(UTIL_DIR, 'otbn-ld')
    obj_path = os.path.join(work_dir, 'tst.o')
    elf_path = os.path.join(work_dir, 'tst')
    subprocess.run([otbn_as, '-o', obj_path, asm_path], check=True)
    subprocess.run([otbn_ld, '-o', elf_path, obj_path], check=True)
    return elf_path
Assemble and link file at asm_path in work_dir.

Returns the path to the resulting ELF
def asm_and_link_one_file(asm_path: str, work_dir: str) -> str:
    'Assemble and link file at asm_path in work_dir.\n\n    Returns the path to the resulting ELF\n\n    '
    otbn_as = os.path.join(UTIL_DIR, 'otbn-as')
    otbn_ld = os.path.join(UTIL_DIR, 'otbn-ld')
    obj_path = os.path.join(work_dir, 'tst.o')
    elf_path = os.path.join(work_dir, 'tst')
    subprocess.run([otbn_as, '-o', obj_path, asm_path], check=True)
    subprocess.run([otbn_ld, '-o', elf_path, obj_path], check=True)
    return elf_path