Created attachment 5796 [details] failing linker script gold fails to link the new kernel kvm tool. http://article.gmane.org/gmane.linux.kernel/1155280 ld -T bios/rom.ld.S -o bios/bios.bin.elf bios/bios.o bios/e820.o bios/int10.o ld: error: allocated section not in any segment ld: error: allocated section not in any segment ld: internal error in segment_precedes, at /var/tmp/portage/sys-devel/binutils-2.21.52.0.2/work/binutils-2.21.52.0.2/gold/layout.cc:2803
Can you attach the input files bios/bios.o bios/e820.o bios/int10.o. Thanks.
Created attachment 5802 [details] input files
CVSROOT: /cvs/src Module name: src Changes by: ian@sourceware.org 2011-06-29 00:39:55 Modified files: gold : ChangeLog layout.cc layout.h script-sections.cc Log message: PR gold/12898 * layout.cc (Layout::segment_precedes): Don't crash if a linker script create indistinguishable segments. (Layout::set_segment_offsets): Use stable_sort when sorting segments. Pass this to Compare_segments constructor. * layout.h (class Layout): Make segment_precedes non-static. (class Compare_segments): Change from struct to class. Add layout_ field. Add constructor. * script-sections.cc (Script_sections::attach_sections_using_phdrs_clause): Rename local orphan to is_orphan. Don't report failure to put empty section in segment. On attachment failure, report name of section, and attach to first PT_LOAD segment. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=src&r1=1.772&r2=1.773 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/layout.cc.diff?cvsroot=src&r1=1.206&r2=1.207 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/layout.h.diff?cvsroot=src&r1=1.94&r2=1.95 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/script-sections.cc.diff?cvsroot=src&r1=1.52&r2=1.53
This should now be fixed in the development sources. Thanks for reporting it, and thanks for the test case.
And thank you for the quick fix. KVM is linking fine now.