Linux

In Linux, just like in Windows, we have the same support for both static and dynamic linking (and support for manual import too). The main difference is that in Linux (and this is my sole opinion), building software is much easier as all the development tools are integrated into the system. Well, except Flat Assembler, but its integration is not a problem --we simply copy the fasm executable to one of the bin directories that are included in the user's PATH environment variable.

Fortunately for us, Flat Assembler has built-in support for generation of both object files and executables, which imports procedures from libraries on Linux just as well as it supports such methods on Windows. We will shortly see that these approaches on Linux are almost identical to those on Windows, as long as we do not start diving into the depth of the ELF specifications and format.

If you want to explore the ELF format in-depth, specifications are available at
http://refspecs.linuxbase.org/elf/elf.pdf for specifications of 32-bit ELF
and
http://ftp.openwatcom.org/devel/docs/elf-64-gen.pdf for specifications of 64-bit ELF.

You may also find these specifications with Google or any other search engine, if these links appear broken.

Just like we did in the case of Windows, we will begin by linking several object files to a single executable and then proceed to create an executable ELF file with dynamic dependency linking.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset