CORC  > 软件研究所  > 基础软件国家工程研究中心  > 学位论文
题名Wine兼容关键代码的检测及应用方法研究
作者黄译萱
学位类别硕士
答辩日期2019-05
授予单位中国科学院大学
授予地点北京
导师李明树
关键词Windows应用兼容 Wine 代码克隆检测
学位专业计算机软件与理论
中文摘要

Linux在服务器、嵌入式以及高性能计算领域的市场占有率上优势明显,但是在桌面领域与Windows差距甚大。Windows因其用户界面和操作方式早已成为人们的使用习惯,占据了广阔的桌面市场;而Linux应用程序和设备驱动程序不足的问题严重阻碍了其在桌面市场的拓展。开源应用Wine的出现使在Linux系统上便捷地使用Windows应用程序成为可能。

Wine作为一个在Linux系统上运行Windows应用程序的兼容层,已能兼容大量Windows应用程序。对开源应用程序Wine进行分析对于开发兼容操作系统而言有重大意义。Wine主体工作是对Windows应用程序接口(Application Programming Interface,API)的仿真,以复现Windows编程逻辑。而Wine对Windows API的“翻译”最终都会涉及到Windows操作系统机制到Linux操作系统机制的转换,本文将这些与操作系统机制转换相关的代码称为兼容关键代码。兼容关键代码对于开发Windows应用兼容系统具有重要意义,但实际上,在Wine中查找到这类兼容关键代码十分困难。

本文研究工作主要包括以下三个方面:

Wine兼容关键代码的检测。本文通过分析Wine的源代码,对比Wine与ReactOS DLL的相关情况,提出了基于源代码克隆检测的Wine兼容关键代码检测方法,该方法通过检测ReactOS对Wine的代码克隆,排除明显的兼容非关键代码,从而缩小兼容关键代码的范围。另外,作为上述方法的补充,本文针对Wine Server组件提出了基于函数调用关系检测兼容关键代码的方法,该方法通过检测函数调用图中Linux系统调用的位置,检测兼容关键代码。

Wine兼容关键代码资源库的设计与实现。Wine兼容关键代码数量庞大且复杂,为方便应用兼容关键代码相关信息,本文设计并实现了Wine兼容关键代码资源库,用于检测、存储和展示Wine兼容关键代码。本文设计了资源库结构,设计并实现了用于检测功能的Wine兼容关键代码检测工具和用于展示功能的Wine兼容关键代码资源库可视化访问工具。

Wine兼容关键代码的分析和应用。在Wine兼容关键代码资源库的基础上,本文对Wine兼容关键代码进行整理,将Wine兼容关键代码划分为4类,然后针对每一类别代码提供了实例和分析。本文将Wine预留内存关键代码扩展为Linux系统调用,提高了Wine的启动性能。本文还对Wine xmlite.DLL关键代码进行了分析,并对其进行了重新设计,优化了代码结构。

 

英文摘要

Linux has a significantly greater share in the market of servers, embedded systems and high-performance computing. But it is much more outperformed by Windows in the desktop market. Windows has occupied a vast desktop market because its user interface and operation mode have long been used by people, while the shortage of Linux application and device driver has seriously hindered the expansion of Linux in the desktop market. The advent of the open source application Wine addresses the gap and possibly enable the convenient use of Windows applications on Linux.

As a compatibility layer running on Linux, Wine has been able to support the execution of a large number of Windows applications. The analysis of Wine is of great significance for the development of compatible operating systems. The essential idea of Wine is to simulate Windows APIs to reproduce Windows programming logic. And, wine's "translation" of Windows APIs will eventually involve the conversion of Windows operating system mechanisms to that of Linux. In this thesis, the code related to such conversion is referred to Compatibility Key Code. Compatibility key code is important to develop a Windows-compatible system. But in fact, it's very difficult to find such compatibility key code in Wine.

The main research work of this thesis includes:

The detection of Wine's compatibility key code. Through the analysis of the source code of Wine and comparison of Wine and ReactOS DLLs, this thesis proposes a Wine's compatibility key code detection method based on code clone detection. This method detects the code clones of Wine by ReactOS, eliminates the obvious non-critical compatibility, and narrows the range of compatibility key code. In addition, as a supplement, this thesis also proposes a Wine's compatibility key code detection method based on function-call relationship, which detects compatibility key code by detecting the location of Linux syscall functions in call graph.

The design and implementation of a resource library of Wine's compatibility key code. There is numerous compatibility key code in Wine. For the convenient application of the compatibility key code and its related information, this thesis designs and builds a resource library of Wine's compatibility key code to detect, store and display them. Specifically, this thesis designs the database of the resource library. In addition, this thesis designs and implementes a Wine compatibility key code detection tool and a visual access tool for the resource library Wine compatibility key code.

The analysis and usage of Wine's compatibility key code. Based on the resource library of Wine's compatibility key code, this thesis divides the Wine-compatible key code into 4 categories, and then provides examples and analysis for each category. This thesis refactors the reserved memory key code into a Linux system call, which improves the startup performance of the Wine. This thesis also analyzes and redesigns the key code of Wine xmlite.DLL to optimize its code structure.

 

语种中文
学科主题计算机科学技术
内容类型学位论文
源URL[http://ir.iscas.ac.cn/handle/311060/19144]  
专题软件研究所_基础软件国家工程研究中心_学位论文
作者单位中国科学院软件研究所
推荐引用方式
GB/T 7714
黄译萱. Wine兼容关键代码的检测及应用方法研究[D]. 北京. 中国科学院大学. 2019.
个性服务
查看访问统计
相关权益政策
暂无数据
收藏/分享
所有评论 (0)
暂无评论
 

除非特别说明,本系统中所有内容都受版权保护,并保留所有权利。


©版权所有 ©2017 CSpace - Powered by CSpace