I had just finished the 14th chapter of the Linux edition of Assembly Arithmetic Algorithms, and then I took a look at some old source code where I had learned enough of the ELF format to create my own ELF headers using either FASM or NASM. The differences between these two assemblers make them incompatible with each other. Still, I have made four separate gists on GitHub so that if someone wants to create their own ELF header for a program without relying on the built-in features of FASM, I have found the best way to do it.
The purposes of this are both for my own greater understanding of the ELF format, because it is used in all Linux distributions, and also to provide a way for NASM users to benefit from features that currently only exist in FASM, which is still my favorite Assembler.
Although my Linux Assembly book mostly focuses on using FASM because it is easier for beginners, I do officially support those who wish to port my programs to other assemblers. Porting is easy once you get past the small differences in the directives of each.
Leave a comment