Bug 27467 - ld: Internal error when linking .tmp_vmlinux.btf
Summary: ld: Internal error when linking .tmp_vmlinux.btf
Status: RESOLVED WORKSFORME
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.36
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-25 14:55 UTC by Frank
Modified: 2022-06-22 06:31 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank 2021-02-25 14:55:42 UTC
Hi there,

While building kernel 5.11.1 (source: https://github.com/Frogging-Family/linux-tkg) I got for the first time this error:

-----
LD [M]  drivers/gpu/drm/nouveau/nouveau.o
AR      drivers/gpu/built-in.a
AR      drivers/built-in.a
GEN     .version
CHK     include/generated/compile.h
LD      vmlinux.o
MODPOST vmlinux.symvers
MODINFO modules.builtin.modinfo
GEN     modules.builtin
LD      .tmp_vmlinux.btf
ld: BFD (GNU Binutils) 2.36.1 internal error, aborting at /build/binutils/src/binutils-gdb/bfd/merge.c:939 in _bfd_merged_section_offset

ld: Please report this bug.

BTF     .btf.vmlinux.bin.o
pahole: .tmp_vmlinux.btf: No debugging information found
LD      .tmp_vmlinux.kallsyms1
.btf.vmlinux.bin.o: file not recognized: file format not recognized
make: *** [Makefile:1165: vmlinux] Error 1
DESCEND  objtool
DESCEND  bpf/resolve_btfids
-----

I am suspecting the upgrade to 2.36.1.
However I admit I have more tests to perform to isolate my theory. I will try this same build from a VM using 2.36.1 and also another VM using a previous version, plus I will downgrade to previous version of BNUtils on my main machine, if the system allows me to, and try to build the kernel again.

I do not know what other information to provide, I am not much knowledgeable about using build tools, even worse when it comes down to troubleshoot build errors. :(


Thanks
Comment 1 Frank 2021-02-26 01:45:45 UTC
Well I was not able to reproduce this on a VM machine.

- I downgraded package version to 2.36 on my main machine and compiling kernel went fine.
- I tested 2.36 on a VM and it went fine.
- I upgraded to 2.36.1 on that same VM and it also went fine.


Since I am unable to provide troubleshooting data, I have to close this and cross fingers next time it will work on my main machine with 2.36.1 or find a dirty way around it.