Just wanted to mention that for me, linking with my regular ubuntu linker (GNU ld (GNU Binutils for Ubuntu) 2.24) seemed to work just fine with using LDEMULATION:
LDEMULATION="i386pe" ld --oformat pei-x86-64 --subsystem 10 -pie -e efi_start build/boot.o -o img/efi/boot/bootx64.efi