fortify-headers adds a UD2 instruction because the compiler cannot determine the size of "spjump_start" that is used with memmove in the remap_spjump() function of pmcl-kernel.c. Disabling this allows CCL to run without encountering an "Illegal instruction". Use -no-pie to suppress compiler warnings about "relocation in read-only section `.text'" and "creating DT_TEXTREL in a PIE". --- a/lisp-kernel/linuxx8664/Makefile +++ b/lisp-kernel/linuxx8664/Makefile @@ -23,7 +23,7 @@ M4FLAGS = -DLINUX -DX86 -DX8664 -DHAVE_TLS CDEFINES = -DLINUX -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS -DVC_REVISION=$(VC_REVISION) #-DDISABLE_EGC -DUSE_FUTEX CDEBUG = -g -COPT = -O2 +COPT = -O2 -U_FORTIFY_SOURCE # Once in a while, -Wformat says something useful. The odds are against that, # however. WFORMAT = -Wno-format @@ -74,7 +74,7 @@ USE_LINK_MAP = # -T ./elf_x86_64.x ../../lx86cl64: $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile $(LINK_MAP) - $(CC) -m64 $(CDEBUG) -Wl,--export-dynamic $(HASH_STYLE) -o $@ $(USE_LINK_MAP) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) -Wl,--no-as-needed $(OSLIBS) + $(CC) -m64 $(CDEBUG) -Wl,--export-dynamic $(HASH_STYLE) -Wl,--no-pie -o $@ $(USE_LINK_MAP) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) -Wl,--no-as-needed $(OSLIBS) $(SPOBJ): $(SPINC)