]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
kernel linker: do not read debug symbol tables for non-debug symbols
authorKonstantin Belousov <kib@FreeBSD.org>
Sun, 7 Nov 2021 08:37:48 +0000 (10:37 +0200)
committerKonstantin Belousov <kib@FreeBSD.org>
Wed, 8 Dec 2021 21:32:29 +0000 (23:32 +0200)
commit95c20faf11a1af6924f97ec4aafc32d899fea8b0
treee3fb8fe6812e387f7c48b2a580381d2ef24c7373
parent72f6662662de61ba9a221a3dd59adea115ad4646
kernel linker: do not read debug symbol tables for non-debug symbols

In particular, this prevents resolving locals from other files.
To access debug symbol tables, add LINKER_LOOKUP_DEBUG_SYMBOL and
LINKER_DEBUG_SYMBOL_VALUES kobj methods, which are allowed to use
any types of present symbols in all tables.

PR: 207898
Reviewed by: emaste, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D32878
sys/kern/kern_linker.c
sys/kern/link_elf.c
sys/kern/link_elf_obj.c
sys/kern/linker_if.m