Software multiplexing: share your libraries and statically link them too

Author:

Dietz Will1,Adve Vikram1

Affiliation:

1. University of Illinois at Urbana-Champaign, USA

Abstract

We describe a compiler strategy we call “ Software Multiplexing ” that achieves many benefits of both statically linked and dynamically linked libraries, and adds some additional advantages. Specifically, it achieves the code size benefits of dynamically linked libraries while eliminating the major disadvantages: unexpected failures due to missing dependences, slow startup times, reduced execution performance due to indirect references to globals, and the potential for security vulnerabilities. We design Software Multiplexing so that it works even in the common case where application build systems support only dynamic and not static linking; we have automatically built thousands of Linux software packages in this way. Software Multiplexing combines two ideas: Automatic Multicall , i.e., where multiple independent programs are automatically merged into a single executable, and Static Linking of Shared Libraries , which works by linking an IR-level version of application code and all its libraries, even if the libraries are normally compiled as shared, before native code generation. The benefits are achieved primarily through deduplication of libraries across the multiplexed programs, while using static linking, and secondly through more effective unused code elimination for statically linked shared libraries. Compared with equivalent dynamically linked programs, <span>allmux-optimized programs start more quickly and even have slightly lower memory usage and total disk size. Compared with equivalent statically linked programs, <span>allmux-optimized programs are much smaller in both aggregate size and memory usage, and have similar startup times and execution performance. We have implemented Software Multiplexing in a tool called <span>allmux, part of the open-source ALLVM project. Example results show that when the LLVM Compiler Infrastructure is optimized using allmux, the resulting binaries and libraries are 18.3% smaller and 30% faster than the default production version. For 74 other packages containing 2–166 programs each, multiplexing each package into one static binary reduces the aggregate package size by 39% (geometric mean) compared with dynamic linking.

Funder

Office of Naval Research

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference31 articles.

1. Vikram Adve Will Dietz etal 2016. ALLVM Project. http://allvm.org Vikram Adve Will Dietz et al. 2016. ALLVM Project. http://allvm.org

2. Architectural Support for Dynamic Linking

3. WYSINWYX

4. Christian S Collberg John H Hartman Sridivya Babu and Sharath K Udupa. 2004. Slinky - Static Linking Reloaded. Retrieved 2018 from http://slinky.cs.arizona.edu/ Christian S Collberg John H Hartman Sridivya Babu and Sharath K Udupa. 2004. Slinky - Static Linking Reloaded. Retrieved 2018 from http://slinky.cs.arizona.edu/

Cited by 3 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Guidelines for collaborative development of sustainable data treatment software;Journal of Neutron Research;2022-03-23

2. A Syscall-Level Binary-Compatible Unikernel;IEEE Transactions on Computers;2021

3. Guided linking: dynamic linking without the costs;Proceedings of the ACM on Programming Languages;2020-11-13

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3