[arm] ld.gold crash on -flto link
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/
collect2: error: ld returned 1 exit status
This was reported to upstream a while ago, and was fixed:
https:/
And I have tested the commit they pointed to:
https:/
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?