Lecture 08 Program Executable File Formats

Total Page:16

File Type:pdf, Size:1020Kb

Lecture 08 Program Executable File Formats Lecture 08 Compiling a program Compiler structure CS 50011: Introduction to Systems II Static vs. dynamic linking Lecture 8: Compiling and Linking Prof. Jeff Turkstra © 2017 Dr. Jeffrey A. Turkstra 1 © 2017 Dr. Jeffrey A. Turkstra 2 Program Some slides by Prof. Gustavo File in a particular format containing Rodriguez-Rivera necessary information to load an application into memory and execute it Often time part of this is split off into the “loader” and libraries Programs include: Machine instructions Initialized data List of library dependencies List of memory sections © 2017 Dr. Jeffrey A. Turkstra 3 List of values© determined2017 Dr. Jeffrey A. Turkstra at load time 4 Executable file formats ELF Number of formats File header ELF – Executable Link File Magic number Used on most *NIX systems Version COFF – Common Object File Format Target ABI Windoze ISA a.out – Used in BSD (Berkeley Standard Entry point Distribution) and early UNIX Pointers to Not usually used anymore Program header BSD UNIX and AT&T UNIX are Section header predecessors to modern *NIXes etc © 2017 Dr. Jeffrey A. Turkstra 5 © 2017 Dr. Jeffrey A. Turkstra 6 Program header Section header How to create the process image Type (data, string, notes, etc Segments Flags (writable, executable, etc Types Virtual address Flags Offset in file image File offset Size Virtual address Size in file Alignment Size in memory © 2017 Dr. Jeffrey A. Turkstra 7 © 2017 Dr. Jeffrey A. Turkstra 8 Building a program readelf –headers /bin/ls Start with source code objdump -p, -h, -t hello.c Prepocessor Compiler Assembler Linker © 2017 Dr. Jeffrey A. Turkstra 9 © 2017 Dr. Jeffrey A. Turkstra 10 Preprocessor When a .c file is compiled, it is first scanned and modified by a preprocessor before being handed to the real compiler Finds lines beginning with #, hides them from the compiler, or takes some action #include, #define #ifdef, #else, #endif © 2017 Dr. Jeffrey A. Turkstra 11 © 2017 Dr. Jeffrey A. Turkstra 12 Can do math Parentheses around substitution #if (FLAG % 4 == 0) || (FLAG == 13) variables Macros #define ABS(x) ( (x) < 0 ? -(x) : (x) ) #define INC(x) x+1 No semi-colon Have to be careful #define ABS(x) x < 0 ? -x : x ABS(B+C) © 2017 Dr. Jeffrey A. Turkstra 13 © 2017 Dr. Jeffrey A. Turkstra 14 Why macros? Lots of other tricks Run time efficiency printf(“The date is %s\n”, __DATE__); No function call overhead Passed arguments can be any type Most preprocessor features are used #define MAX(x,y) ( (x) > (y) ? (x) : (y) ) for large/advanced software Works with ints, floats, doubles, even development practices chars © 2017 Dr. Jeffrey A. Turkstra 15 © 2017 Dr. Jeffrey A. Turkstra 16 Compiler? gcc -E * http://www.cs.montana.edu/~david.watson5/ © 2017 Dr. Jeffrey A. Turkstra 17 © 2017 Dr. Jeffrey A. Turkstra 18 Compiler? int main() { Scanning or lexical analysis int i = getint(), j = getint(); Groups program into tokens Token = smallest meaningful unit of a while (i != j) { program if (i > j) i = i - j; Parsing or syntax analysis else j = j - i; Create a parse tree } Shows how tokens “fit together” putint(i); Context-free grammar } © 2017 Dr. Jeffrey A. Turkstra 19 © 2017 Dr. Jeffrey A. Turkstra 20 Semantic analysis Determines/discovers meaning Builds symbol table Builds syntax tree © 2017 Dr. Jeffrey A. Turkstra 21 © 2017 Dr. Jeffrey A. Turkstra 22 Code generation gcc -c Traverse symbol table and syntax tree nm -v Generate loads, stores, arithmetic ops, tests, branches, etc © 2017 Dr. Jeffrey A. Turkstra 23 © 2017 Dr. Jeffrey A. Turkstra 24 Assembler Libraries Discussed in architecture lecture Libraries are just collections of object gcc -S files Internal symbols are indexed for fast lookup by the linker Searched for symbols that aren’t defined in the program Symbol found, pull it into executable (static) Otherwise include a pointer to the file, loaded by loader © 2017 Dr. Jeffrey A. Turkstra 25 © 2017 Dr. Jeffrey A. Turkstra 26 Statically linked Dynamically linked Faster, to a degree More complexity Portable Easy to upgrade libraries Larger binaries Vulnerabilities Fixed version, no updates Have to manage versions Loader re-links every time program is executed readelf --dynamic /bin/ls ldd /bin/ls © 2017 Dr. Jeffrey A. Turkstra 27 © 2017 Dr. Jeffrey A. Turkstra 28 Interpreter Lazy binding readelf --headers /bin/ls Binding a function call to a library can be expensive Have to go through code and replace the symbol with its address Delay until the call actually takes place Calls stub PLT function Invokes dynamic linker to load the function into memory and obtain real address Rewrites address that the sub code references Only happens once Procedure Lookup Table (PLT) © 2017 Dr. Jeffrey A. Turkstra 29 © 2017 Dr. Jeffrey A. Turkstra 30 Makefile gcc -o Simple way to help organize code nm compilation gcc -o hello hello.c somefunc.c -I. © 2017 Dr. Jeffrey A. Turkstra 31 © 2017 Dr. Jeffrey A. Turkstra 32 hello: hello.c hellofunc.c CC=gcc gcc -o hello hello.c hellofunc.c -I. CFLAGS=-I. DEPS = hello.h Or... CC=gcc %.o: %.c $(DEPS) CFLAGS=-I. $(CC) -c -o $@ $< $(CFLAGS) hello: hello.o hellofunc.o hello: hello.o hellofunc.o gcc -o hello hellomake.o hellofunc.o -I. $(CC) -o hello hello.o hellofunc.o -I. © 2017 Dr. Jeffrey A. Turkstra 33 © 2017 Dr. Jeffrey A. Turkstra 34 CC=gcc IDIR =../include CC=gcc CFLAGS=-I. CFLAGS=-I$(IDIR) DEPS = hellomake.h ODIR=obj LDIR =../lib OBJ = hellomake.o hellofunc.o LIBS=-lm _DEPS = hellomake.h %.o: %.c $(DEPS) DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS)) $(CC) -c -o $@ $< $(CFLAGS) _OBJ = hellomake.o hellofunc.o OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ)) hellomake: $(OBJ) $(ODIR)/%.o: %.c $(DEPS) gcc -o $@ $^ $(CFLAGS) $(CC) -c -o $@ $< $(CFLAGS) hellomake: $(OBJ) © 2017 Dr. Jeffrey A. Turkstra 35 © 2017 Dr. Jeffrey A. Turkstra 36 gcc -o $@ $^ $(CFLAGS) $(LIBS) .PHONY: clean clean: rm -f $(ODIR)/*.o *~ core $(INCDIR)/*~ Questions? .PHONY: clean clean: rm -f $(ODIR)/*.o *~ core $(INCDIR)/*~ © 2017 Dr. Jeffrey A. Turkstra 37 © 2017 Dr. Jeffrey A. Turkstra 38 .
Recommended publications
  • The “Stabs” Debug Format
    The \stabs" debug format Julia Menapace, Jim Kingdon, David MacKenzie Cygnus Support Cygnus Support Revision TEXinfo 2017-08-23.19 Copyright c 1992{2021 Free Software Foundation, Inc. Contributed by Cygnus Support. Written by Julia Menapace, Jim Kingdon, and David MacKenzie. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled \GNU Free Documentation License". i Table of Contents 1 Overview of Stabs ::::::::::::::::::::::::::::::: 1 1.1 Overview of Debugging Information Flow ::::::::::::::::::::::: 1 1.2 Overview of Stab Format ::::::::::::::::::::::::::::::::::::::: 1 1.3 The String Field :::::::::::::::::::::::::::::::::::::::::::::::: 2 1.4 A Simple Example in C Source ::::::::::::::::::::::::::::::::: 3 1.5 The Simple Example at the Assembly Level ::::::::::::::::::::: 4 2 Encoding the Structure of the Program ::::::: 7 2.1 Main Program :::::::::::::::::::::::::::::::::::::::::::::::::: 7 2.2 Paths and Names of the Source Files :::::::::::::::::::::::::::: 7 2.3 Names of Include Files:::::::::::::::::::::::::::::::::::::::::: 8 2.4 Line Numbers :::::::::::::::::::::::::::::::::::::::::::::::::: 9 2.5 Procedures ::::::::::::::::::::::::::::::::::::::::::::::::::::: 9 2.6 Nested Procedures::::::::::::::::::::::::::::::::::::::::::::: 11 2.7 Block Structure
    [Show full text]
  • Portable Executable File Format
    Chapter 11 Portable Executable File Format IN THIS CHAPTER + Understanding the structure of a PE file + Talking in terms of RVAs + Detailing the PE format + The importance of indices in the data directory + How the loader interprets a PE file MICROSOFT INTRODUCED A NEW executable file format with Windows NT. This for- mat is called the Portable Executable (PE) format because it is supposed to be portable across all 32-bit operating systems by Microsoft. The same PE format exe- cutable can be executed on any version of Windows NT, Windows 95, and Win32s. Also, the same format is used for executables for Windows NT running on proces- sors other than Intel x86, such as MIPS, Alpha, and Power PC. The 32-bit DLLs and Windows NT device drivers also follow the same PE format. It is helpful to understand the PE file format because PE files are almost identi- cal on disk and in RAM. Learning about the PE format is also helpful for under- standing many operating system concepts. For example, how operating system loader works to support dynamic linking of DLL functions, the data structures in- volved in dynamic linking such as import table, export table, and so on. The PE format is not really undocumented. The WINNT.H file has several struc- ture definitions representing the PE format. The Microsoft Developer's Network (MSDN) CD-ROMs contain several descriptions of the PE format. However, these descriptions are in bits and pieces, and are by no means complete. In this chapter, we try to give you a comprehensive picture of the PE format.
    [Show full text]
  • Common Object File Format (COFF)
    Application Report SPRAAO8–April 2009 Common Object File Format ..................................................................................................................................................... ABSTRACT The assembler and link step create object files in common object file format (COFF). COFF is an implementation of an object file format of the same name that was developed by AT&T for use on UNIX-based systems. This format encourages modular programming and provides powerful and flexible methods for managing code segments and target system memory. This appendix contains technical details about the Texas Instruments COFF object file structure. Much of this information pertains to the symbolic debugging information that is produced by the C compiler. The purpose of this application note is to provide supplementary information on the internal format of COFF object files. Topic .................................................................................................. Page 1 COFF File Structure .................................................................... 2 2 File Header Structure .................................................................. 4 3 Optional File Header Format ........................................................ 5 4 Section Header Structure............................................................. 5 5 Structuring Relocation Information ............................................... 7 6 Symbol Table Structure and Content........................................... 11 SPRAAO8–April 2009
    [Show full text]
  • Linkers and Loaders Do?
    Linkers & Loaders by John R. Levine Table of Contents 1 Table of Contents Chapter 0: Front Matter ........................................................ 1 Dedication .............................................................................................. 1 Introduction ............................................................................................ 1 Who is this book for? ......................................................................... 2 Chapter summaries ............................................................................. 3 The project ......................................................................................... 4 Acknowledgements ............................................................................ 5 Contact us ........................................................................................... 6 Chapter 1: Linking and Loading ........................................... 7 What do linkers and loaders do? ............................................................ 7 Address binding: a historical perspective .............................................. 7 Linking vs. loading .............................................................................. 10 Tw o-pass linking .............................................................................. 12 Object code libraries ........................................................................ 15 Relocation and code modification .................................................... 17 Compiler Drivers .................................................................................
    [Show full text]
  • Mach-O Internals
    Mach-O Internals William Woodru February 10, 2016 1 / 31 General Agenda 1. Who are you? 2. What is Mach-O? 3. An Extremely Brief History of Mach and Mach-O 4. Structure of a Mach-O File 5. Quirks Encountered 6. Concluding Notes 2 / 31 Who are you? My name is William Woodru. I'm a Computer Science major and Philosophy minor at the University of Maryland, College Park. Outside of school, I'm a member of the Homebrew project and a regular contributor to several open source groups. My work for Homebrew is largely concerned with the underlying system interface and reconciling OS X's intricacies/irregularities with the package manager. 3 / 31 What is Mach-O? Mach-O is the Mach Object binary format. Mach-O is used primarily by Apple in OS X and iOS. Apps on both platforms are really just directory trees containing Mach-O binaries and resources (fonts, icons, congurations). Metadata is stored in a number of places, but mainly within bundled plists (XML) and the binaries themselves. Like its cousins on Linux (ELF) and Windows (PE), Mach-O supports multiple object types: I Executable I Core dump I Shared library/object I Prelinked object le I etc. 4 / 31 . and multiple architectures: I m68k/m88k (yes, it's still supported!*) I x86 I AMD64 I POWER I ARMv6/7/8 Unlike ELF or PE, Mach-O has been extended to allow multi-architecture fat binaries. This has resulted in some interesting properties not shared by the other two. More on that later.
    [Show full text]
  • Compiling, Linking
    Compiling, linking,... • Let’s see what happens when we compile a program using gcc • Some of this material is based on section 7 of Computer Systems, A Programmer’s Perspective, by Bryant O’Hallaron. 1 /* main.c */ /* swap.c */ void swap(); extern int buf[] int buf[2] = {1,2}; int *bufp0 = &buf[0]; int main() int *bufp1; { { swap(); int temp; return 0; bufp1 = &buf[1]; } temp = *bufp0; *bufp0 = *bufp1; *bufp1 = temp; } 2 Compiling, linking,... • What happens when you use the compiler driver gcc: gcc -O2 -g -o test main.c swap.c 3 Step1: Preprocessor (cpp) • The C preprocessor translates the C source file main.c into an ASCII intermediate file main.i • cpp [other args] main.c /tmp/main.i 4 Step2: C compiler (cc1) • Driver runs C compiler cc1 • translates main.i into an ASCII assembly language file main.s • cc1 /tmp/main.i main.c -O2 [other args] -o /tmp/main.s 5 Step3: assembler (as) • driver runs assembler as to translate main.s into relocatable object file main.o • as [other args] -o /tmp/main.o /tmp/main.s • Same 3 steps are executed for swap.c 6 Step4: Linker (ld) • driver runs linker ld to combine main.o and swap.o into the executable file test • ld -o test [sys obj files and args] /tmp/main.o / tmp/swap.o 7 Overview main.c swap.c Source files! Translators! Translators! (cpp, cc1, as)! (cpp, cc1, as)! Relocatable! main.o swap.o object files! Linker (ld)! Fully linked! p! executable object file! 8 Run executable test • unix> ./test • shell invokes function in OS called loader • copy code and data of executable test into memory • then transfers control to the beginning of the program 9 Static linking • What does the static linker all do? • takes as input a collection of relocatable object files and command-line arguments • generates fully linked executable object file that can be loaded and run 10 Static linking • Linker performs two tasks: • symbol resolution: associates each symbol reference with exactly one symbol definition • relocation: compiler and assembler generate code and data sections that start at address 0.
    [Show full text]
  • Outline Executable/Object File Formats Brief History of Binary File Formats
    Outline CSci 5980/8980 ELF basics Manual and Automated Binary Reverse Engineering Slides 5: The ELF Binary File Format Stephen McCamant Static and dynamic linking University of Minnesota Executable/object file formats Brief history of binary file formats (Unix) Modern systems usually use a common format for Early Unix had a simple a.out format relocatable object files during compilation and final Lasted until early days of free Linux/BSD, now obsolete executables AT&T’s second try was named COFF Mostly binary data representing code and data Still limited, but widely adopted with changes Plus metadata allowing the data to be linked and AT&T’s third try was ELF, now used in almost all Unix loaded systems Brief history of binary file formats (non-Unix) Compile-time and run-time Early DOS and Windows had several limited formats Some file features are used during compilation Since the 32-bit era, Windows uses the PE (Portable Typically first created by assembler, then used/modified Executable) format by the linker Partially derived from COFF Other features are used when the program runs OS X era Apple (including iOS, etc) uses a format By the OS when the program starts named Mach-O And now also by runtime linking First developed for the Mach microkernel used on the NeXT Static and dynamic/shared linking ELF Traditional “static” linking happens all at compile time Executable (or Extensible) and Linking (or Linkable) Libraries become indistinguishable from the rest of the Format program First appeared in System V Release 4 Unix, c. 1989 For efficiency and flexibility, it is now more common to postpone library linking until runtime Linux switched to ELF c.
    [Show full text]
  • Novel Framework for Hidden Data in the Image Page Within Executable File Using Computation Between Advanced Encryption Standard and Distortion Techniques
    (IJCSIS) International Journal of Computer Science and Information Security, Vol. 3, No. 1, 2009 Novel Framework for Hidden Data in the Image Page within Executable File Using Computation between Advanced Encryption Standard and Distortion Techniques A.W. Naji*, Shihab A. Hameed, , B.B.Zaidan**, Wajdi F. Al-Khateeb, Othman O. Khalifa, A.A.Zaidan and Teddy S. Gunawan, Department of Electrical and Computer Engineering, Faculty of Engineering, International Islamic University Malaysia, P.O. Box 10, 50728 Kuala Lumpur, Malaysia * [email protected], ** [email protected] message. In doing this, we make it far less likely that an ABSTRACT----- The hurried development of multimedia and encrypted message will be found [2],[3]. Also, if a message internet allows for wide distribution of digital media data. It concealed through Steganography is discovered, the becomes much easier to edit, modify and duplicate digital discoverer is still faced with the formidable task of information. In additional, digital document is also easy to copy and distribute, therefore it may face many threats. It deciphering it. Also the strength of the combination between became necessary to find an appropriate protection due to the hiding and encryption science is due to the non-existence of significance, accuracy and sensitivity of the information. standard algorithms to be used in (hiding and encryption) Furthermore, there is no formal method to be followed to secret messages. Also there is randomness in hiding discover a hidden data. In this paper, a new information hiding methods such as combining several media (covers) with framework is presented.The proposed framework aim is different methods to pass a secret message.
    [Show full text]
  • Effective File Format Fuzzing
    Effective file format fuzzing Thoughts, techniques and results Mateusz “j00ru” Jurczyk Black Hat Europe 2016, London PS> whoami • Project Zero @ Google • Part time developer and frequent user of the fuzzing infrastructure. • Dragon Sector CTF team vice captain. • Low-level security researcher with interest in all sorts of vulnerability research and software exploitation. • http://j00ru.vexillium.org/ • @j00ru Agenda • What constitutes real-life offensive fuzzing (techniques and mindset). • How each of the stages is typically implemented and how to improve them for maximized effectiveness. • Tips & tricks on the examples of software I’ve fuzzed during the past few years: Adobe Reader, Adobe Flash, Windows Kernel, Oracle Java, Hex-Rays IDA Pro, FreeType2, FFmpeg, pdfium, Wireshark, … Fuzzing Fuzz testing or fuzzing is a software testing technique, often automated or semi-automated, that involves providing invalid, unexpected, or random data to the inputs of a computer program. http://en.wikipedia.org/wiki/Fuzz_testing In my (and this talk’s) case • Software = commonly used programs and libraries, both open and closed-source, written in native languages (C/C++ etc.), which may be used as targets for memory corruption-style 0-day attacks. • Inputs = files of different (un)documented formats processed by the target software (e.g. websites, applets, images, videos, documents etc.). On a scheme START choose input mutate input feed to target yes no target save input crashed Easy to learn, hard to master. Key questions • How do we choose the fuzzing
    [Show full text]
  • Advanced Programming in the UNIX Environment – Dæmon Processes, Shared Libraries
    CS631-AdvancedProgrammingintheUNIXEnvironment Slide1 CS631 - Advanced Programming in the UNIX Environment – Dæmon Processes, Shared Libraries Department of Computer Science Stevens Institute of Technology Jan Schaumann [email protected] https://stevens.netmeister.org/631/ Lecture 11: Dæmon Processes, Shared Libraries November 11, 2019 CS631-AdvancedProgrammingintheUNIXEnvironment Slide2 Dæmon processes So... what’s a dæmon process anyway? Lecture 11: Dæmon Processes, Shared Libraries November 11, 2019 CS631-AdvancedProgrammingintheUNIXEnvironment Slide3 Dæmon characteristics Commonly, dæmon processes are created to offer a specific service. Dæmon processes usually live for a long time are started at boot time terminate only during shutdown have no controlling terminal Lecture 11: Dæmon Processes, Shared Libraries November 11, 2019 CS631-AdvancedProgrammingintheUNIXEnvironment Slide4 Dæmon characteristics The previously listed characteristics have certain implications: do one thing, and one thing only no (or only limited) user-interaction possible resource leaks eventually surface consider current working directory how to create (debugging) output Lecture 11: Dæmon Processes, Shared Libraries November 11, 2019 CS631-AdvancedProgrammingintheUNIXEnvironment Slide5 Writing a dæmon fork off the parent process change file mode mask (umask) create a unique Session ID (SID) change the current working directory to a safe place close (or redirect) standard file descriptors open any logs for writing enter actual dæmon code Lecture 11: Dæmon Processes,
    [Show full text]
  • CS 449 – Executables and Linking
    Executables and Linking CS449 Spring 2016 Remember External Linkage Scope? #include <stdio.h> >> gcc ./main.c ./foo.c int global = 0; >> ./a.out void foo(); global=10 int main() { foo(); printf(“global=%d\n”, global); • How did global in foo.c find global in main.c? return 0; • How did foo() in main.c find foo() in foo.c? } • Where is the code for printf() and how does the call to printf() find it? <main.c> • What does a.out look like in the file system? extern int global; How does it look like while executing in memory? void foo() { global += 10; } <foo.c> 2 Compiler gcc Preprocessed Object C source source files Executable .c cpp cc1 .o ld Preprocessor Compiler Linker Preprocessor gcc Preprocessed Object C source source files Executable .c cpp cc1 .o ld Preprocessor Compiler Linker Preprocessor • Input: A C source file with directives • Output: A C source file after directives have been processed and comments stripped off. • #include directive – #include <...> or #include “...” – Copies the contents of the file to source file – Contain function/variable declarations and type definitions – <...> searches for file under standard include path (usually /usr/include) – “....” searches for file under local directory or paths given as –I arguments (e.g. gcc –I ~/local/include main.c) Preprocessor • #define directive – Defines a macro (a symbol that is expanded to some other text) – #define PI 3.14 • All instances of PI gets replaced by 3.14 in source – #define AVG(a, b) (((a) + (b)) / 2) • AVG(2, 4) in source gets replaced by ((2 + 4) / 2) – No type checking • CPP is just a text translator; no concept of types • Will even work on AVG(“Hello”, “World”) Compiler gcc Preprocessed Object C source source files Executable .c cpp cc1 .o ld Preprocessor Compiler Linker Compiler • Input: A preprocessed C source file • Output: An object file in machine language • In the process it performs: – Syntax and type checking – Compiler optimizations to reduce execution time and memory footprint • E.g.
    [Show full text]
  • Using OFD Utility to Create a DSP Boot Image
    Application Report SPRAA64 − November 2004 Using OFD Utility to Create a DSP Boot Image Jelena Nikolic-Popovic DSP Field Applications ABSTRACT The object file display (OFD) utility processes common object file format (COFF) files and converts the information contained in such files into XML format. This application note describes how to create a DSP boot image using COFF and XML files, and a simple Perl script. The resulting image is a C source file, which can be included into the host processor’s application program and downloaded to the DSP via HPI or PCI interfaces. The OFD utility is available in Code Composer Studio Release 3.0 or greater. This application report contains project code that can be downloaded from this link. http://www−s.ti.com/sc/psheets/spraa64/spraa64.zip Contents 1 Motivation . 1 2 COFF Format . 3 3 OFD Text Output . 4 4 OFD XML Output . 6 5 Tools for Processing OFD Output. 9 6 Creating a Host Image. 10 7 Summary and Conclusion. 12 8 References . 13 List of Figures Figure 1. COFF File Structure. 4 Figure 2. OFD Output (Text Format). 5 Figure 3. Tree Representation of XML Tags Generated by OFD. 8 Figure 4. Sample OFD XML Output. 9 Figure 5. Boot image .h file . 10 Figure 6. Boot image .c file . 11 1 Motivation In a signal processing system consisting of one or more DSPs and a host processor where the DSP code initially resides in host’s memory space, the DSP code needs to be converted into a particular format; so that, it can be included into host’s application program, and then copied to the DSP memory space upon system startup.
    [Show full text]