Changes

Jump to: navigation, search

SPO600 Compiled C Lab

1,052 bytes added, 00:49, 17 January 2014
no edit summary
[[Category:SPO600]]{{Chris Tyler Draft}}
{{Admon/note|Purpose of this Lab|In this lab, you will see investigate the relationship between basic C source code and the output of the C compiler.}}{{Admon/tip|Ireland|If you do not have a Linux machine with you, you can use ireland.proximity.on.ca -- an account hasbeen created for each [[SPO600]] student. See your professor for login information.}} 
== Lab 2 ==
-O0 # do not optimize (that's a capital letter and then the digit zero)
-fno-builtins # do not use builtin function optimizations
 
3. The resulting binary is an ELF (Executable and Linkable Format) file, which contains multiple sections. These sections may contain [[Machine Language|object code]], link tables, [[Debugger|debugging]] [[Symbols|symbols]], program data (such as constants and the initial values of variables), metadata about the program and ELF sections, and comments.
 
Examine the binary produced by the previous step using the ''objdump'' program. These options may be useful -- see the manpage for ''objdump'' for other options:
 
-f # display header information for the entire file
-s # display per-section summary information
-d # disassemble sections containing code
--source # (implies -d) show source code, if available, along with disassembly
 
 
 
== External Resources ==
 
* For a general overview of ELF, see the Wikipedia article on [http://en.wikipedia.org/wiki/Executable_and_Linkable_Format Executable and Linkable Format]).

Navigation menu