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.
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篇论文的施引文献,订阅后可以查看论文全部施引文献