Merge tag 'rust-fixes-6.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux

Pull Rust fix from Miguel Ojeda:

 - Fix a Rust 1.91.0 build issue due to 'bindings.o' not containing
   DWARF debug information anymore by teaching gendwarfksyms to skip
   object files without exports

* tag 'rust-fixes-6.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux:
  gendwarfksyms: Skip files with no exports
This commit is contained in:
Linus Torvalds
2025-11-14 15:36:15 -08:00
3 changed files with 6 additions and 3 deletions

View File

@@ -138,7 +138,8 @@ int main(int argc, char **argv)
error("no input files?");
}
symbol_read_exports(stdin);
if (!symbol_read_exports(stdin))
return 0;
if (symtypes_file) {
symfile = fopen(symtypes_file, "w");

View File

@@ -123,7 +123,7 @@ struct symbol {
typedef void (*symbol_callback_t)(struct symbol *, void *arg);
bool is_symbol_ptr(const char *name);
void symbol_read_exports(FILE *file);
int symbol_read_exports(FILE *file);
void symbol_read_symtab(int fd);
struct symbol *symbol_get(const char *name);
void symbol_set_ptr(struct symbol *sym, Dwarf_Die *ptr);

View File

@@ -128,7 +128,7 @@ static bool is_exported(const char *name)
return for_each(name, NULL, NULL) > 0;
}
void symbol_read_exports(FILE *file)
int symbol_read_exports(FILE *file)
{
struct symbol *sym;
char *line = NULL;
@@ -159,6 +159,8 @@ void symbol_read_exports(FILE *file)
free(line);
debug("%d exported symbols", nsym);
return nsym;
}
static void get_symbol(struct symbol *sym, void *arg)