i386: Switch to PIC kernel modules
It seems since the last llvm project update, the lld linker has started creating a PLT dependent kernel module object files. Reviewed by: kib, jhb, emaste Differential Revision: https://reviews.freebsd.org/D41088
This commit is contained in:
+1
-1
@@ -166,7 +166,7 @@ CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
|
||||
.endif
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv" || \
|
||||
${MACHINE_CPUARCH} == "powerpc"
|
||||
${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "i386"
|
||||
CFLAGS+= -fPIC
|
||||
.endif
|
||||
|
||||
|
||||
@@ -244,6 +244,7 @@ elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data,
|
||||
break;
|
||||
|
||||
case R_386_GLOB_DAT: /* S */
|
||||
case R_386_JMP_SLOT: /* S */
|
||||
error = lookup(lf, symidx, 1, &addr);
|
||||
if (error != 0)
|
||||
return (-1);
|
||||
|
||||
Reference in New Issue
Block a user