The Kaleidoscope tutorial has great coverage of most of the basic LLVM use cases, but it doesn't cover creating object files. I struggled with this when I started working with LLVM, and I've seen others express a need for this (e.g. this blog post).
So, I've written a new chapter that walks users through generating object code. This is based on my understanding from reading llc and rustc source code, so please highlight any sections that are misleading or outright wrong.
This new chapter is chapter 5. You can ignore any changes to chapters 6-10, this is a simple renumbering.
You can also view the new chapter as rendered HTML at http://www.wilfred.me.uk/llvm/tutorial/LangImpl5.html