Fix linker script and customize compilation options (optimization, debugging symbols)