hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/arm/kernel/module-plts.c
....@@ -1,9 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2014-2017 Linaro Ltd. <ard.biesheuvel@linaro.org>
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 as
6
- * published by the Free Software Foundation.
74 */
85
96 #include <linux/elf.h>
....@@ -11,6 +8,7 @@
118 #include <linux/kernel.h>
129 #include <linux/module.h>
1310 #include <linux/sort.h>
11
+#include <linux/moduleloader.h>
1412
1513 #include <asm/cache.h>
1614 #include <asm/opcodes.h>
....@@ -258,7 +256,7 @@
258256 /* sort by type and symbol index */
259257 sort(rels, numrels, sizeof(Elf32_Rel), cmp_rel, NULL);
260258
261
- if (strncmp(secstrings + dstsec->sh_name, ".init", 5) != 0)
259
+ if (!module_init_layout_section(secstrings + dstsec->sh_name))
262260 core_plts += count_plts(syms, dstsec->sh_addr, rels,
263261 numrels, s->sh_info);
264262 else