Bug 211443 - binutils 2.36 will not compile kernel that compiled just fine on binutils 2.35.1. Error point included
Summary: binutils 2.36 will not compile kernel that compiled just fine on binutils 2.3...
Status: NEW
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: other_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-27 16:01 UTC by Joel
Modified: 2021-02-05 23:04 UTC (History)
2 users (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Joel 2021-01-27 16:01:01 UTC
As the summary states - trying to compile kernel 5.10.11. Here is a logfile of what I did. Note that I tried this both without AND with the recent patch in the git logs to help thunk_64.S compile with LLVM. That patch, by itself, did not help.

Running GCC 10.2.0, GLIBC 2.32, binutils 2.36, kernel 5.10.11. 

When I tried kernel 5.10.6, which I had successfully compiled a short number of days ago with binutils 2.35.1, it also did not compile. So, the upgrade from binutils 2.35.1 to binutils 2.36 has changed something...

j-comm@www:/sources% tar xf archive/linux-5.10.11.tar.xz 
j-comm@www:/sources% cd linux-5.10.11/
j-comm@www:/sources/linux-5.10.11% make mrproper
j-comm@www:/sources/linux-5.10.11% make defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/conf
*** Default configuration is based on 'x86_64_defconfig'
#
# configuration written to .config
#
j-comm@www:/sources/linux-5.10.11% make V=1
...
  gcc -Wp,-MMD,arch/x86/entry/.thunk_64.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -fmacro-prefix-map=./= -D__ASSEMBLY__ -fno-PIE -m64    -c -o arch/x86/entry/thunk_64.o arch/x86/entry/thunk_64.S
   ./tools/objtool/objtool orc generate  --no-fp --retpoline --uaccess arch/x86/entry/thunk_64.o
arch/x86/entry/thunk_64.o: warning: objtool: missing symbol table
make[2]: *** [scripts/Makefile.build:360: arch/x86/entry/thunk_64.o] Error 1
make[2]: *** Deleting file 'arch/x86/entry/thunk_64.o'
make[1]: *** [scripts/Makefile.build:496: arch/x86/entry] Error 2
make: *** [Makefile:1805: arch/x86] Error 2
j-comm@www:/sources/linux-5.10.11%
Comment 1 Matthew Perkowski 2021-01-27 19:49:30 UTC
Confirmed. Got the same error using the same toolchain as Joel. Building with binutils 2.35.1 immediately eliminated the problem.
Comment 2 H.J. Lu 2021-01-28 22:58:38 UTC
See:

https://bugzilla.kernel.org/show_bug.cgi?id=211443
Comment 3 H.J. Lu 2021-01-28 22:59:13 UTC
The kernel patch is at

https://lore.kernel.org/patchwork/patch/1357006/
Comment 4 Matthew Perkowski 2021-01-29 13:09:34 UTC
Applied the patch and built again with the aforementioned toolchain. Build succeeded. Thank you.
Comment 5 Joel 2021-01-29 19:59:07 UTC
The patch worked for me as well. Thank you!
Comment 6 H.J. Lu 2021-02-05 23:04:27 UTC
Fixed in v5.10.12 by

commit c6fd968f58439398b765300aecd7758d501ee49c
Author: Josh Poimboeuf <jpoimboe@redhat.com>
Date:   Thu Jan 14 16:14:01 2021 -0600

    objtool: Don't fail on missing symbol table

Note You need to log in before you can comment on or make changes to this bug.