The code in Layout::set_segment_offsets() expects the segments to be sorted by their load address, but currently they are sorted by the LMA of their first section.
To reproduce: % cat phdr.s .text .word 1 .data .word 2 % cat phdrs.ld PHDRS { headers PT_PHDR FILEHDR PHDRS; data PT_LOAD AT (0xfff50000); text PT_LOAD AT (0xfff40000); } SECTIONS { .data 0 : { *(.data) } : data .text : { *(.text) } : text } % gcc -c phdr.s % gold -T phdrs.ld phdr.o gold: internal error in set_segment_offsets, at gold/layout.cc:2641 -- Summary: segments not sorted by LMA Product: binutils Version: 2.21 (HEAD) Status: NEW Severity: normal Priority: P3 Component: gold AssignedTo: ian at airs dot com ReportedBy: nickc at redhat dot com CC: bug-binutils at gnu dot org GCC build triplet: any GCC host triplet: any GCC target triplet: any http://sourceware.org/bugzilla/show_bug.cgi?id=11899 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils