https://sourceware.org/bugzilla/show_bug.cgi?id=30079
--- Comment #3 from Michael Matz <matz at suse dot de> --- The guards are supposed to be moved only, not removed: if (!wild->filenames_sorted && (sec == NULL || sec->spec.sorted == none || sec->spec.sorted == by_none)) { return wild->rightmost; } ... while (*tree) { if (wild->filenames_sorted) { ... if (i > 0) ... continue; else if (i < 0) ... continue; if (fa || la) { ... if (i > 0) ... continue else if (i < 0) ... continue; } } ... compare_section (sec->spec.sorted, section, (*tree)->section) < 0) ... So it could only get to calling compare_section() (with sec->spec.sorted being none or by_none) when ->filename_sorted _and_ it falls through the compare based on these names (i.e. if filenames are equal and containing archives (if they exist) are equal). I probably convinced myself that this situation is not supposed to happen, and as testcases were totally missing I didn't notice otherwise. If you can tar up the object files I can take a look myself (I don't have cross compilers here, but cross binutils). Or you add the guard back again and see how that goes. -- You are receiving this mail because: You are on the CC list for the bug.