[arm] ld.gold crash on -flto link

Bug #1415486 reported by Steven Noonan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
binutils (Ubuntu)
New
Undecided
Unassigned

Bug Description

Running on armhf board with binutils 2.24-5ubuntu3. Any attempt to use -flto with the gold linker yields this internal error:

$ cat test.c
int main(int argc, char **argv)
{
 return 0;
}
$ gcc -flto -fuse-ld=gold -o test test.c
/usr/bin/ld.gold: internal error in do_read_symbols, at ../../gold/arm.cc:6734
collect2: error: ld returned 1 exit status

This was reported to upstream a while ago, and was fixed:

https://sourceware.org/bugzilla/show_bug.cgi?id=15639

And I have tested the commit they pointed to:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f35c4853cc5b0e51d8a460be390f7a20cd44ba44

I applied this change, excluding the changes to ChangeLog (conflicts) and mips.cc (missing source file). With the change, -flto works again. Can this be pulled in to the next armhf build of binutils, please?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.