From 213042bba186b995bc2f25c8c2d06a9652177fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 27 Sep 2022 17:09:49 +0200 Subject: Import Turris OS kernel patches --- ...-errors-in-unresolved-weak-symbols-on-arm.patch | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 nixos/modules/kernel-patches/0041-fix-errors-in-unresolved-weak-symbols-on-arm.patch (limited to 'nixos/modules/kernel-patches/0041-fix-errors-in-unresolved-weak-symbols-on-arm.patch') diff --git a/nixos/modules/kernel-patches/0041-fix-errors-in-unresolved-weak-symbols-on-arm.patch b/nixos/modules/kernel-patches/0041-fix-errors-in-unresolved-weak-symbols-on-arm.patch new file mode 100644 index 0000000..3e86460 --- /dev/null +++ b/nixos/modules/kernel-patches/0041-fix-errors-in-unresolved-weak-symbols-on-arm.patch @@ -0,0 +1,29 @@ +From 5e60b036c4ea403bd96eb4eac0f711cd38c9e766 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Tue, 27 Sep 2022 16:21:35 +0200 +Subject: [PATCH 41/96] fix errors in unresolved weak symbols on arm + +lede-commit: 570699d4838a907c3ef9f2819bf19eb72997b32f +Signed-off-by: Felix Fietkau +--- + arch/arm/kernel/module.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c +index d59c36dc0494..200a31b0acad 100644 +--- a/arch/arm/kernel/module.c ++++ b/arch/arm/kernel/module.c +@@ -146,6 +146,10 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, + return -ENOEXEC; + } + ++ if ((IS_ERR_VALUE(sym->st_value) || !sym->st_value) && ++ ELF_ST_BIND(sym->st_info) == STB_WEAK) ++ continue; ++ + loc = dstsec->sh_addr + rel->r_offset; + + switch (ELF32_R_TYPE(rel->r_info)) { +-- +2.37.2 + -- cgit v1.2.3