Commit a752782a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 1cc41c88 fdf302e6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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");
+1 −1
Original line number Diff line number Diff line
@@ -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);
+3 −1
Original line number Diff line number Diff line
@@ -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)