Code: Select all
gcc -c -fno-stack-protector -fpic -fshort-wchar -mno-red-zone -Wall -DEFI_FUNCTION_WRAPPER -Iinclude/ lockdown.c -o lockdown.o
ld -T elf_x86_64_efi.lds -nostdlib -znocombreloc -shared -Bsymbolic -L/usr/lib/ -lefi -lgnuefi lockdown.o -o lockdown.so
objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela -j .reloc --target=efi-app-x86_64 lockdown.so lockdown.efi