Commit f2850dd5 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'kbuild-fixes-v5.6' of...

Merge tag 'kbuild-fixes-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - fix memory corruption in scripts/kallsyms

 - fix the vmlinux link stage to correctly update compile.h

* tag 'kbuild-fixes-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kbuild: fix mismatch between .version and include/generated/compile.h
  scripts/kallsyms: fix memory corruption caused by write over-run
parents 359c92c0 083bc0e1
......@@ -210,7 +210,7 @@ static struct sym_entry *read_symbol(FILE *in)
len = strlen(name) + 1;
sym = malloc(sizeof(*sym) + len);
sym = malloc(sizeof(*sym) + len + 1);
if (!sym) {
fprintf(stderr, "kallsyms failure: "
"unable to allocate required amount of memory\n");
......@@ -219,7 +219,7 @@ static struct sym_entry *read_symbol(FILE *in)
sym->addr = addr;
sym->len = len;
sym->sym[0] = type;
memcpy(sym_name(sym), name, len);
strcpy(sym_name(sym), name);
sym->percpu_absolute = 0;
return sym;
......
......@@ -239,7 +239,7 @@ else
fi;
# final build of init/
${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init
${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init need-builtin=1
#link vmlinux.o
info LD vmlinux.o
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment