[Core,Driver,ELF] Differentiate static and dynamic executables.

This also adds a simple relocation change for dynamic executables to
x86-64 ELF.