From 7992bb64dc99164dc7bcb9f8f23c66c923c2fbd8 Mon Sep 17 00:00:00 2001 From: Rong Tao Date: Wed, 17 Apr 2024 19:32:58 +0800 Subject: [PATCH] x86_64: patch: Add -fpic -fno-PIE hint Link: https://github.com/Rtoax/ulpatch/issues/5 Signed-off-by: Rong Tao --- src/arch/x86_64/patch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/x86_64/patch.c b/src/arch/x86_64/patch.c index bf02278b..4d4c190c 100644 --- a/src/arch/x86_64/patch.c +++ b/src/arch/x86_64/patch.c @@ -201,7 +201,7 @@ int apply_relocate_add(const struct load_info *info, GElf_Shdr *sechdrs, overflow: lerror("overflow in relocation type %s(%d) val %lx\n", rela_type_string(r_type), r_type, val); - lerror("likely not compiled with -mcmodel=kernel.\n"); + lerror("likely not compiled with -fpic and -fno-PIE.\n"); return -ENOEXEC; }