arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2610.05999cs.OScs.SE

不再在运行时翻译:LLM赋能的静态二进制翻译

No More Translation at Runtime: LLM-Empowered Static Binary Translation

Zhibo Liu, Huaijin Wang, Wai Kin Wong, Daoyuan Wu, Shuai Wang

首次发表
浏览论文内容

中文总结 AI 辅助

本文提出一种LLM赋能的静态汇编到汇编二进制翻译范式,在执行前转换代码,生成无需运行时框架的原生性能二进制,并通过拆分验证确保正确性,显著优于开源方案和ExaGear。

中文摘要 AI 辅助

虽然AArch64 CPU正成为强劲的市场竞争者,但其软件生态系统落后于成熟的x86-64环境,阻碍了新架构的采用并影响了用户体验。二进制翻译通过将二进制代码从一种架构(例如x86-64)转换为在另一种架构(例如AArch64)上运行来弥合这一鸿沟,使遗留软件能够受益于现代硬件在性能和能效方面的优势。当前的翻译方法要么是动态的,这会增加显著的运行时开销;要么是静态的,但由于二进制分析固有的复杂性,其在可靠性方面存在困难。本文提出了一种新的静态、汇编到汇编的翻译范式,在执行前转换二进制代码,生成可移植、高效的类似原生的二进制文件,无需运行时框架即可在AArch64设备上运行。借助大型语言模型(LLM)的最新突破,我们提供了一个实用且自动化的翻译引擎,能以最少的人工干预生成高质量代码。为确保正确性,我们引入了一个关键的验证步骤,将汇编代码拆分为简化的片段,从而实现高效且可扩展的语义验证。我们的评估表明,该方法以较大优势显著优于现有的开源解决方案,生成的二进制文件具有接近原生的性能。此外,它相较于领先的工业翻译器ExaGear也显示出实质性改进,为跨架构二进制翻译研究指明了一个有前景的新方向。

英文摘要

While AArch64 CPUs are becoming strong market contenders, their software ecosystem lags behind the mature x86-64 environment, hindering the adoption of the new architectures and impacting user experience. Binary translation bridges this divide by converting binary code from one architecture (e.g., x86-64) to run on another (e.g., AArch64), allowing legacy software to benefit from modern hardware's performance and energy efficiency advantages. Current translation methods are typically either dynamic, which adds significant runtime overhead, or static, which struggles with reliability due to the inherent complexities of binary analysis. This paper introduces a new static, assembly-to-assembly translation paradigm that transforms binary code ahead of execution, generating portable, efficient native-like binaries that run on AArch64 devices without runtime frameworks. Benefiting from recent breakthroughs in large language models (LLMs), we provide a practical and automated translation engine that produces high-quality code with minimal human intervention. To ensure correctness, we introduce a crucial verification step, where we split the assembly code into simplified snippets, enabling efficient and scalable semantic verification. Our evaluation shows that this approach significantly outperforms existing open-source solutions with a large margin, producing binaries with near-native performance. Furthermore, it shows substantial improvements over the leading industrial translator, ExaGear, illuminating a promising new direction for cross-architecture binary translation research.

发表机构

  • Nanjing University(南京大学)
  • The Hong Kong University of Science and Technology(香港科技大学)
  • Lingnan University(岭南大学)

机构由 AI 辅助整理,请以论文原文为准。

补充信息

↑