‫Hello and welcome to part three of implementing the oil flowed up in this lecture, we're going to change
‫our Blanchot ASEM program to Output and el-Fadl rather than a binary file.
‫So just go to the link old script and you'll see output format binary.
‫Just change this to F thirty two, dash three eight six.
‫OK, this is the output format that we want.
‫I now want us to open up a terminal and we're about to build the project first.
‫Go to the makefile.
‫We're going to change this filename here to blanked out all blank yet blank.
‫That will be fine just to make it clear it's now file and just delete blank toppin because that's the
‫old file.
‫And now if we go back to the search.
‫And can see that compiles perfectly fine and we have a blank profile, if you if you open that, you'll
‫see it's a binary file contains everything we need.
‫OK, let's let's examine the contents of blank to death.
‫So I just want us to see into the programs here in the blank, and we're going to install a utility
‫called Dump Health, Jesco Pseudo Apte installed on pelf.
‫And we can see that, unfortunately, we can't locate the package.
‫It might not be an official package, so just go to Google.
‫And we're going to get that, so dump our Lennix, just search for that, because it might be in another
‫repository that isn't official.
‫Just type jump out for a minute, we may already have an installed dump of Langstaff.
‫No, no, we don't, but it tells us how to install it.
‫So this is what we should be installing I to install Praxiteles.
‫OK, so just install that one and then we should be able to use dump out them.
‫OK.
‫OK, so we're going to do now is we're going to say dump elf type forward slash blanked out elf and
‫this is now dump the contents of the ELF file in a readable way so you can use this to compare when
‫you're working on your elf loader implementation.
‫So you'll notice this is some of the output that was displayed in the presentation a few lectures ago.
‫So you can see the entry point here is your X 400000.
‫You can see the program headers here.
‫So what we're essentially going to be making, we're going to be making something where we go through
‫all the program headers and we basically load them all into memory so we can see that this this had
‫a file here, for example, it starts at offset four thousand ninety six and it's 31 bytes in size.
‫So, you know, we're going to be loading all of these into memory.
‫Essentially, guys like we can see this one starts at eight one nine two and it's twenty eight bytes
‫in size.
‫So we're going to be loading these program headers into memory.
‫You can see the section headers here as well.
‫We're not going to worry so much about the section headers for the time being.
‫You can also use a utility called Redleaf.
‫Now, this one is already installed.
‫You can go read out of dash a top four slash Blanchot elf and it will print out all the elf information
‫so we can see this is an ELF 32 binary.
‫We can see all the sections here, dot, dot data, that same table, string table and so on.
‫And then we can see some symbols here.
‫So we can see we've exported the sad symbol here and we can see some other types of symbols, such as
‫the file tells us what the file is.
‫So this is this is how the alpha works, essentially, guys.
‫OK, we're going to be understanding and reading all of this ourselves.
‫So that concludes part three.
‫You'll notice we never actually worked on the loader in this lecture.
‫We just installed these utilities so we could understand the file a little more.