1 // SPDX-License-Identifier: GPL-2.0
8 /* On arm64, kernel text segment start at high memory address,
9 * for example 0xffff 0000 8xxx xxxx. Modules start at a low memory
10 * address, like 0xffff 0000 00ax xxxx. When only samll amount of
11 * memory is used by modules, gap between end of module's text segment
12 * and start of kernel text segment may be reach 2G.
13 * Therefore do not fill this gap and do not assign it to the kernel dso map.
16 #define SYMBOL_LIMIT (1 << 12) /* 4K */
18 void arch__symbols__fixup_end(struct symbol
*p
, struct symbol
*c
)
20 if ((strchr(p
->name
, '[') && strchr(c
->name
, '[') == NULL
) ||
21 (strchr(p
->name
, '[') == NULL
&& strchr(c
->name
, '[')))
22 /* Limit range of last symbol in module and kernel */
23 p
->end
+= SYMBOL_LIMIT
;
26 pr_debug4("%s sym:%s end:%#lx\n", __func__
, p
->name
, p
->end
);