: Avoid using the same object file in the kernel and modules
PATCH 2/6 : Avoid using the same object file in the kernel and modules
Avoid using the same object file in the kernel and modules
The patch is by Hassan Nadeem and Ruslan Nikolaev. This extends the prior PIE kernel patch (by Thomas Garnier) to also support position-independent modules that can be placed anywhere in the 48/64-bit address space (for better KASLR).
Signed-off-by Ruslan Nikolaev <[email protected]>
--- Makefile | 2 +- entropy_common_dec.c | 2 ++ fse_decompress_dec.c | 2 ++ zstd_common_dec.c | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-)
lib/zstd/entropy_common_dec.c +2 -0
@@ -0,0 +1,2 @@ +// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 +#include "entropy_common.c"
lib/zstd/fse_decompress_dec.c +2 -0
@@ -0,0 +1,2 @@ +// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 +#include "fse_decompress.c"
lib/zstd/Makefile +1 -1
@@ -6,4 +6,4 @@ ccflags-y += -O3 zstd_compress-y := fse_compress.o huf_compress.o compress.o \ entropy_common.o fse_decompress.o zstd_common.o zstd_decompress-y := huf_decompress.o decompress.o \ - entropy_common.o fse_decompress.o zstd_common.o + entropy_common_dec.o fse_decompress_dec.o zstd_common_dec.o
lib/zstd/zstd_common_dec.c +2 -0
@@ -0,0 +1,2 @@ +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 +#include "zstd_common.c"