diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -166,7 +166,7 @@ .endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv" || \ - ${MACHINE_CPUARCH} == "powerpc" + ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "i386" CFLAGS+= -fPIC .endif diff --git a/sys/i386/i386/elf_machdep.c b/sys/i386/i386/elf_machdep.c --- a/sys/i386/i386/elf_machdep.c +++ b/sys/i386/i386/elf_machdep.c @@ -244,6 +244,7 @@ break; case R_386_GLOB_DAT: /* S */ + case R_386_JMP_SLOT: /* S */ error = lookup(lf, symidx, 1, &addr); if (error != 0) return (-1);