Commit f2856884 authored by Sami Tolvanen's avatar Sami Tolvanen Committed by Masahiro Yamada
Browse files

tools: Add gendwarfksyms



Add a basic DWARF parser, which uses libdw to traverse the debugging
information in an object file and looks for functions and variables.
In follow-up patches, this will be expanded to produce symbol versions
for CONFIG_MODVERSIONS from DWARF.

Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
Reviewed-by: default avatarPetr Pavlu <petr.pavlu@suse.com>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent a56fece7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -9550,6 +9550,13 @@ W: https://linuxtv.org
T:	git git://linuxtv.org/media.git
F:	drivers/media/radio/radio-gemtek*
GENDWARFKSYMS
M:	Sami Tolvanen <samitolvanen@google.com>
L:	linux-modules@vger.kernel.org
L:	linux-kbuild@vger.kernel.org
S:	Maintained
F:	scripts/gendwarfksyms/
GENERIC ARCHITECTURE TOPOLOGY
M:	Sudeep Holla <sudeep.holla@arm.com>
L:	linux-kernel@vger.kernel.org
+8 −0
Original line number Diff line number Diff line
@@ -169,6 +169,14 @@ config MODVERSIONS
	  make them incompatible with the kernel you are running.  If
	  unsure, say N.

config GENDWARFKSYMS
	bool "gendwarfksyms (from debugging information)"
	depends on DEBUG_INFO
	# Requires full debugging information, split DWARF not supported.
	depends on !DEBUG_INFO_REDUCED && !DEBUG_INFO_SPLIT
	# Requires ELF object files.
	depends on !LTO

config ASM_MODVERSIONS
	bool
	default HAVE_ASM_MODVERSIONS && MODVERSIONS
+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ targets += module.lds

subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins
subdir-$(CONFIG_MODVERSIONS) += genksyms
subdir-$(CONFIG_GENDWARFKSYMS) += gendwarfksyms
subdir-$(CONFIG_SECURITY_SELINUX) += selinux
subdir-$(CONFIG_SECURITY_IPE) += ipe

+2 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
/gendwarfksyms
+8 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
hostprogs-always-y += gendwarfksyms

gendwarfksyms-objs += gendwarfksyms.o
gendwarfksyms-objs += dwarf.o
gendwarfksyms-objs += symbols.o

HOSTLDLIBS_gendwarfksyms := -ldw -lelf
Loading