#906004 binutils: ld.gold internal error building linux kernel 4.18

Package:
binutils
Source:
binutils
Description:
GNU assembler, linker and binary utilities
Submitter:
Arthur Marsh
Date:
2025-08-29 05:33:04 UTC
Severity:
normal
Tags:
#906004#5
Date:
2018-08-13 02:41:48 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

All 4.18 kernel release candidates built alright for i386 architecture with
ld.gold, using (except V=1 VERBOSE=1 which I added after the failure):

MAKEFLAGS="HOSTCC=gcc-8 CC=gcc-8 LD=ld.gold V=1 VERBOSE=1 KCFLAGS=-march=pentium4" make-kpkg \
--initrd --config menuconfig linux-image

for 4.18 kernel itself:

+ ld.gold -m elf_i386 -r -o vmlinux.o --whole-archive built-in.a --no-whole-archive --start-group lib/lib.a arch/x86/lib/lib.a --end-group
ld.gold: internal error in make_view, at ../../gold/fileread.cc:474


   * What exactly did you do (or not do) that was effective (or
     ineffective)?

With LD=ld.bfd

+ ld.bfd -m elf_i386 -r -o vmlinux.o --whole-archive built-in.a --no-whole-archive --start-group lib/lib.a arch/x86/lib/lib.a --end-group
ld.bfd: built-in.a: member arch/x86/kernel/cpu/mcheck/therm_throt.o in archive is not an object

so I deleted therm_throt.o and re-ran the build:

+ ld.bfd -m elf_i386 -r -o vmlinux.o --whole-archive built-in.a --no-whole-archive --start-group lib/lib.a arch/x86/lib/lib.a --end-group
ld.bfd: built-in.a: member kernel/locking/lockdep.o in archive is not an object

I then ran make clean and tried a build with ld.bfd:

The build succeeded in creating vmlinux

   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

#906004#10
Date:
2018-08-14 07:24:19 UTC
From:
To:
Please provide the files used for the link, and all command line options used.
#906004#17
Date:
2018-08-15 01:14:00 UTC
From:
To:
Hi, it appears that the symptoms were caused by running the build under a kernel revision (between 4.18.0-rc8 and 4.18.0) that had issues.

Please close the bug report.

Arthur.