Project 1 Roadmap read the project description ? read the newsgroup ? read the ELF specification ? –(1-1..1-4, 2-1..2-3, 2-7..2-8) read the elfHeader correctly.

Slides:



Advertisements
Similar presentations
Memory Management Chapter FourteenModern Programming Languages, 2nd ed.1.
Advertisements

Computer Architecture CSCE 350
Lecture 10: Heap Management CS 540 GMU Spring 2009.
Copyright ©: Lawrence Angrave, Vikram Adve, Caccamo 1 Virtual Memory III.
Computer Organization CS224 Fall 2012 Lesson 12. Synchronization  Two processors or threads sharing an area of memory l P1 writes, then P2 reads l Data.
1 Starting a Program The 4 stages that take a C++ program (or any high-level programming language) and execute it in internal memory are: Compiler - C++
CS 791v Fall # a simple makefile for building the sample program. # I use multiple versions of gcc, but cuda only supports # gcc 4.4 or lower. The.
CORS-567, YourFirstName YourLastName, Signature Piece, ThisSemester ThisYear Electronic Portfolio Menu [Slide Description 1] [Slide Description 2] [Slide.
11/15/2005Comp 120 Fall November Seven Classes to Go! Questions! VM and Making Programs Go.
Project 1 Prerequisites read the project description check the newsgroup read the ELF specification –(pages , , )
Memory Management Policies: UNIX
MInix memory management1 Minix Memory Management. Contiguous memory management. No swapping. A list of holes sorted in memory address order is maintained.
Introduction to Kernel
Memory Management. 2 How to create a process? On Unix systems, executable read by loader Compiler: generates one object file per source file Linker: combines.
Executing an ELF executable
Memory Management April 28, 2000 Instructor: Gary Kimura.
FrmModule-SY. Change #1 When you change the New Company Code more than once, it stack the company codes in the Destination Path Y05 = c:\cmswin11.2\y05.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 8: Main Memory.
© 2004, D. J. Foreman 1 Memory Management. © 2004, D. J. Foreman 2 Building a Module -1  Compiler ■ generates references for function addresses may be.
How to Create a New Voicethread Account Leah Holck – Michigan State University Suzanne Bonn – Sugiyama Jogakuen University TESOL 2009.
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /29/2013 Lecture 13: Compile-Link-Load Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE.
Operating Systems Lecture 14 Segments Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software Engineering.
Kirk Scott Computer Science The University of Alaska Anchorage 1.
Project ID # Building Area Fill in Here Cost per Square Foot Fill in Here Construction Cost Fill in Here Date of Completion Fill in Here Program Summary.
15. WRITING LARGE PROGRAMS. Source Files A program may be divided into any number of source files. Source files have the extension.c by convention. Source.
C++ LANGUAGE TUTORIAL LESSON 1 –WRITING YOUR FIRST PROGRAM.
MIPS coding. slt, slti slt $t3, $t1, $t2 – set $t3 to be 1 if $t1 < $t2 ; else clear $t3 to be 0. – “Set Less Than.” slti $t3, $t1, 100 – set $t3 to be.
Different Types of Libraries
Win32 Programming Lesson 19: Introduction to DLLs.
All even numbers are divisible by 2 Even numbers are numbers that end with either 0, 2, 4, 6, or 8.
Int main( ) { x = a(); } int a() { y = b(); } int b() { z = c(); } int c() { } 1.
CSc 453 Linking and Loading
Memory Management. 2 How to create a process? On Unix systems, executable read by loader Compiler: generates one object file per source file Linker: combines.
Today… Modularity, or Writing Functions. Winter 2016CISC101 - Prof. McLeod1.
Reciprocal Reading.
Buffer Overflow Walk-Through
YongChul Kwon CSE451 Section 1: Spring 2006 YongChul Kwon
Introduction to Kernel
(Delete this text box later.) (Later, delete this text box.)
ENEE150 Discussion 07 Section 0101 Adam Wang.
Linux Userspace Process Memory Layout
Memory Management © 2004, D. J. Foreman.
Program Execution in Linux
CSCI206 - Computer Organization & Programming
Estimate sums, differences, products, and quotients.
Buffer Overflow Walk-Through
and Executing Programs
Optimizing Malloc and Free
When I want to execute the subroutine I just give the command Write()
Estimating With Decimals
4-2 Functions in C In C, the idea of top–down design is done using functions. A C program is made of one or more functions, one and only one of which.
Memory Management III: Perils and pitfalls Mar 13, 2001
Multistep Processing of a User Program
MIPS coding.
Presentation Title.
CSE451 Memory Management Introduction Autumn 2002
Operating System Chapter 7. Memory Management
Chien-Chung Shen CIS/UD
Create engaging training with text pictures and video!
Chapter 10-1: Dynamic Memory Allocation
Running a Java Program using Blue Jay.
Segmentation Observation: Programmers don’t think in pages!
Virtual Memory Lecture notes from MKP and S. Yalamanchili.
388C Presentation: Printer Robot
Program Assembly.
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
Presented by Anne Other
Reverse Engineering for CTFs
Legacy PowerPoint Slides
Presentation transcript:

Project 1 Roadmap read the project description ? read the newsgroup ? read the ELF specification ? –( , , ) read the elfHeader correctly ? –ident, type=ET_EXEC, machine=EM_386 found the two programHeaders ? –check against objdump -x, elfdump figure out the total size > sum of codesize+datasize ! leave spack for stack, round to 4096 allocate copy the two segments; don’t forget to add base addr to source and destination entryPoint = entry from elfHeader; leave untouched free original buffer, done !

Everything is in this picture !

You will need to parse the ELF headers malloc a piece of memory big enough for the executable image (including the stack) copy the text and data sections from the ELF file image to the correct places within this memory fill in the Loadable_Program structure that will provide information to our functions (and later to your functions) that will run the code You should also free the buffer that was read in by ReadFileAndAllocate()