Open main menu

CDOT Wiki β

Changes

SPO600 Compiled C Lab

101 bytes added, 17:12, 7 February 2020
Resources
[[Category:SPO600 Labs]]{{Admon/lab|Purpose of this Lab|In this lab, you will investigate the relationship between basic C source code and the output of the C compiler.}}
{{Admon/tip|XerxesHost System|Perform You can choose to perform this lab on any of the [[SPO600 Servers#x86_64|Xerxes]] -- an account has been created for each [[SPO600]] student who submitted an SSH public key. Alternately, you may use your own system if it has been set up with development tools and libraries, '''plus''' the static version of the glibc library.}}{{Admon/important|Winter 2020|In Winter 2020, this lab is not a required lab and will instead be used as an in-class Demo.}}
== Resources ==
* [[Assembly Language]]
* [[ELF]] file format
* [[X86_64 Register and Instruction Quick Start]]
* [[Aarch64 Register and Instruction Quick Start]]
== Lab 4 / Demo ==
1. Write a basic C program which prints a message on the screen, [http://www.roesler-ac.de/wolfram/hello.htm Hello World!]-style -- something like this:
}
2. Compile the program using the GCC compiler. Include each of these compiler options (refer to the gcc manpage for details):
-g # enable debugging information
== 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]