Compacting ARM binaries with the Diablo framework – Dominique Chanet & Ludo Van Put Compacting ARM binaries with the Diablo framework Dominique Chanet.

Slides:



Advertisements
Similar presentations
1 Lecture 3: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation.
Advertisements

8. Code Generation. Generate executable code for a target machine that is a faithful representation of the semantics of the source code Depends not only.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /15/2013 Lecture 11: MIPS-Conditional Instructions Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.
CSE 340 Computer Architecture Spring 2014 MIPS ISA Review
Program Development Tools The GNU (GNU’s Not Unix) Toolchain The GNU toolchain has played a vital role in the development of the Linux kernel, BSD, and.
9.0 EMBEDDED SOFTWARE DEVELOPMENT TOOLS 9.1 Introduction Application programs are typically developed, compiled, and run on host system Embedded programs.
Introduction to Programming Lecture 2. Today’s Lecture Software Categories Software Categories System Software System Software Application Software Application.
CS 31003: Compilers ANIRUDDHA GUPTA 11CS10004 G2 CLASS DATE : 24/07/2013.
Whole-Program Linear-Constant Analysis with Applications to Link-Time Optimization Ludo Van Put – Dominique Chanet – Koen De Bosschere Ghent University.
Code Compaction of an Operating System Kernel Haifeng He, John Trimble, Somu Perianayagam, Saumya Debray, Gregory Andrews Computer Science Department.
RISC vs CISC CS 3339 Lecture 3.2 Apan Qasem Texas State University Spring 2015 Some slides adopted from Milo Martin at UPenn.
Binary Program Rewriting with Diablo – Bjorn De Sutter – Engineering Sciences Faculty – Electronics and Information Systems Department p. 1 Binary.
August Code Compaction for UniCore on Link-Time Optimization Platform Zhang Jiyu Compilation Toolchain Group MPRC.
Embedded Systems Programming
Embedded Systems Programming Introduction to cross development techniques.
2/15/2006"Software-Hardware Cooperative Memory Disambiguation", Alok Garg, HPCA Software-Hardware Cooperative Memory Disambiguation Ruke Huang, Alok.
Embedded Computing From Theory to Practice November 2008 USTC Suzhou.
Enhancing Embedded Processors with Specific Instruction Set Extensions for Network Applications A. Chormoviti, N. Vassiliadis, G. Theodoridis, S. Nikolaidis.
Partial Automation of an Integration Reverse Engineering Environment of Binary Code Author : Cristina Cifuentes Reverse Engineering, 1996., Proceedings.
Software Development and Software Loading in Embedded Systems.
Efficient Instruction Set Randomization Using Software Dynamic Translation Michael Crane Wei Hu.
Cortex-M3 Programming. Chapter 10 in the reference book.
Introduction to Programming Dr Masitah Ghazali Programming Techniques I SCJ1013.
L29:Lower Power Embedded Architecture Design 성균관대학교 조 준 동 교수,
Natawut NupairojAssembly Language1 Introduction to Assembly Programming.
Instruction-Level Parallelism for Low-Power Embedded Processors January 23, 2001 Presented By Anup Gangwar.
2015/10/22\course\cpeg323-08F\Final-Review F.ppt1 Midterm Review Introduction to Computer Systems Engineering (CPEG 323)
RISC By Ryan Aldana. Agenda Brief Overview of RISC and CISC Features of RISC Instruction Pipeline Register Windowing and renaming Data Conflicts Branch.
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
Visual Linker Prototype presentation.
Compilers for Embedded Systems Ram, Vasanth, and VJ Instructor : Dr. Edwin Sha Synthesis and Optimization of High-Performance Systems.
RNJ 05/05/091 6 Further System Fundamentals (HL) ‏ 6.3 Operating Systems and Utility Software Linkers, Loaders and Library Managers.
Virtual Machines, Interpretation Techniques, and Just-In-Time Compilers Kostis Sagonas
Retargetting of VPO to the tms320c54x - a status report Presented by Joshua George Advisor: Dr. Jack Davidson.
1 The Instruction Set Architecture September 27 th, 2007 By: Corbin Johnson CS 146.
ISA's, Compilers, and Assembly
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
Introduction to Performance Tuning Chia-heng Tu PAS Lab Summer Workshop 2009 June 30,
Phoenix Based Dynamic Slicing Debugging Tool Eric Cheng Lin Xu Matt Gruskin Ravi Ramaseshan Microsoft Phoenix Intern Team (Summer '06)
Lecture 3 Translation.
Computer Architecture & Operations I
Computer Architecture & Operations I
ARM Processor.
Assembler, Compiler, MIPS simulator
ARM Embedded Systems
Evaluating Register File Size
PRESENTATION ON ARM PROCESSORS
Introduction to Advanced Topics Chapter 1 Text Book: Advanced compiler Design implementation By Steven S Muchnick (Elsevier)
Why to use the assembly and why we need this course at all?
Microprocessor and Assembly Language
Improving Program Efficiency by Packing Instructions Into Registers
Methodology of a Compiler that Compresses Code using Echo Instructions
The University of Adelaide, School of Computer Science
Introduction to Computer Systems Engineering
Introduction to System Programming
Computer Organization & Compilation Process
COSC121: Computer Systems
Application Binary Interface (ABI)
The University of Adelaide, School of Computer Science
5.6 Real-World Examples of ISAs
9.0 EMBEDDED SOFTWARE DEVELOPMENT TOOLS
Morgan Kaufmann Publishers The Processor
Computer Architecture
Embedded System Development Lecture 13 4/11/2007
ARM Processor.
Computer Organization & Compilation Process
Lecture 4: Instruction Set Design/Pipelining
EE108b Review Session February 2nd, 2007 Daxia Ge.
Introduction to Computer Systems Engineering
Presentation transcript:

Compacting ARM binaries with the Diablo framework – Dominique Chanet & Ludo Van Put Compacting ARM binaries with the Diablo framework Dominique Chanet Ludo Van Put

Compacting ARM binaries with the Diablo framework – Dominique Chanet & Ludo Van Put Introduction Embedded systems: emphasis on compact programs How? –assembly language programming –compilers optimizing for code size –specially tweaked libraries –smart linkers e.g. Squeeze, Squeeze++: developed for Compaq Alpha not yet evaluated for a real embedded architecture!

Compacting ARM binaries with the Diablo framework – Dominique Chanet & Ludo Van Put ARM Widely used in embedded systems: –StrongArm, XScale (PDAs) –OMAP (cell phones) in 2001: 76% of all RISC processors shipped were based on the ARM instruction set Low power consumption Special attention for compact code –Thumb instruction set –ISA features like conditional execution of all instructions, pipeline with integrated barrel shifter,...

Compacting ARM binaries with the Diablo framework – Dominique Chanet & Ludo Van Put Diablo Binary rewriting framework: useful for compaction, instrumentation, obfuscation, … Retargetable: ports for ARM, MIPS, x86, Alpha, … At link time –Inputs: object files, libraries –Output: a statically linked executable

Compacting ARM binaries with the Diablo framework – Dominique Chanet & Ludo Van Put Impact of libraries

Compacting ARM binaries with the Diablo framework – Dominique Chanet & Ludo Van Put Major compaction opportunities initial unreachable code removal results of interprocedural constant propagation –at link time addresses are propagated optimize address calculations disambiguate indirect jumps –combined with dead code elimination: discard parts of functions that can never be executed results of interprocedural liveness analysis –unused function results,...

Compacting ARM binaries with the Diablo framework – Dominique Chanet & Ludo Van Put Results

Compacting ARM binaries with the Diablo framework – Dominique Chanet & Ludo Van Put Conclusions & Future Work on average 8-11% compaction of the code section (depending on platform) mostly thanks to unreachable code removal and interprocedural constant propagation Future work: more advanced techniques (e.g. factorization, stack analysis,...) support for Thumb instruction set