https://sourceware.org/bugzilla/show_bug.cgi?id=32584
Bug ID: 32584 Summary: ld.bfd slowdown linking some linux kernels Product: binutils Version: 2.39 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: arnd at arndb dot de Target Milestone: --- I noticed a slowdown in link times between linux kernels 6.12 and 6.13, bisected it to a commit that changed the section ordering, as well as binutils-2.39 and higher, see my report on the kernel mailing list, see https://lore.kernel.org/lkml/20250120212839.1675696-1-a...@kernel.org/. Rong Xu further narrowed down the cause of the problem on the binutils side to to commit fba1ac87dcb7 ("Fix the sorting algorithm for reloc entries"). I created a smaller test case for reproducing the issue, but it still exceeds the 10MB limit for binutils bugzilla, so I uploaded the file to https://drive.google.com/file/d/1M_ccr8RINzfjpU1qA5qA0rhRIGgDOFix/view?usp=sharing time x86_64-linux-gnu-ld -m elf_x86_64 -z noexecstack --emit-relocs --discard-none -z max-page-size=0x200000 --gc-sections --build-id=sha1 --orphan-handling=warn --script=./arch/x86/kernel/vmlinux.lds --strip-debug -o .tmp_vmlinux1 --whole-archive vmlinux.a init/version-timestamp.o --no-whole-archive --start-group lib/lib.a arch/x86/lib/lib.a --end-group .tmp_vmlinux0.kallsyms.o real 0m31.128s user 0m30.472s sys 0m0.277s time x86_64-linux-ld-2.36 -m elf_x86_64 -z noexecstack --emit-relocs --discard-none -z max-page-size=0x200000 --gc-sections --build-id=sha1 --orphan-handling=warn --script=./arch/x86/kernel/vmlinux.lds --strip-debug -o .tmp_vmlinux1 --whole-archive vmlinux.a init/version-timestamp.o --no-whole-archive --start-group lib/lib.a arch/x86/lib/lib.a --end-group .tmp_vmlinux0.kallsyms.o real 0m1.142s user 0m0.898s sys 0m0.237s -- You are receiving this mail because: You are on the CC list for the bug.