That depends on executables (such as your own main program) and shared libraries (what dlopen() reads) having the same file format. That&#x27;s a feature of the ELF executable format commonly used on Linux systems, but isn&#x27;t necessarily true of other executable formats, like MachO (used on OS X).