Quote Originally Posted by Schol-R-LEA-2 View Post
I realize I am rather late to the party, and I do not know if it helps any, but the book Linkers and Loaders by John Levine covers the structure of ELF32 in detail. It is an older book, so it doesn't really discuss ELF64 , but it gives a reasonable description of the ELF format itself, and even discusses how an ELF file would be generated, though only in general terms. The code examples from the book can be found for free on Levine's own book page.

While the book isn't exactly cheap, you can probably find a copy of it in any university library, if you have access to one.

The OSDev wiki page on the ELF format also covers the format itself in detail.

You can go over the ELF64 specification as well, if you like.
Better late than never my friend! Thanks a lot for the info! I will try to find the book if possible and read it. Probably there will not be a lot of differences between ELF32 and ELF64 so it will be fine. The other two sources are great. The OSDev wiki page is awesome and I will read it. The spec is also the most complete thing we have but like I explained, I want something friendlier to begin with and then we can read the spec for fixing bugs and learn advanced stuff.

Quote Originally Posted by Schol-R-LEA-2 View Post
The thing is, IMAO it really doesn't make sense to try to construct an ELF file manually, simply because of the difficulties involved in editing the binary directly. You could use a hex editor, I suppose, but it goes against the whole purpose of it in my mind. Object files in general are far too complex to easily prepare manually. They are designed to generated by compilers and linkers, not by hand.
But.... That's what I'm going to do. I plan to create a compiler! I mean, I am crazy but not crazy enough to want to edit binary files by hand. Thank you for your time my friend!