]> www.infradead.org Git - users/jedix/linux-maple.git/commit
gendwarfksyms: Add symtypes output
authorSami Tolvanen <samitolvanen@google.com>
Fri, 3 Jan 2025 20:45:33 +0000 (20:45 +0000)
committerMasahiro Yamada <masahiroy@kernel.org>
Fri, 10 Jan 2025 16:25:25 +0000 (01:25 +0900)
commitab4439981f8549b013f4ea0b274b7c77c88ab4bc
tree6431dacc19ca8f56ad024dbc019af20cd86c1a9e
parentd2ffdc1c9a0ee71b30e25fbe3e2a37bf4c146085
gendwarfksyms: Add symtypes output

Add support for producing genksyms-style symtypes files. Process
die_map to find the longest expansions for each type, and use symtypes
references in type definitions. The basic file format is similar to
genksyms, with two notable exceptions:

  1. Type names with spaces (common with Rust) in references are
     wrapped in single quotes. E.g.:

     s#'core::result::Result<u8, core::num::error::ParseIntError>'

  2. The actual type definition is the simple parsed DWARF format we
     output with --dump-dies, not the preprocessed C-style format
     genksyms produces.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/gendwarfksyms/Makefile
scripts/gendwarfksyms/die.c
scripts/gendwarfksyms/dwarf.c
scripts/gendwarfksyms/gendwarfksyms.c
scripts/gendwarfksyms/gendwarfksyms.h
scripts/gendwarfksyms/symbols.c
scripts/gendwarfksyms/types.c [new file with mode: 0644]