Gold fails to make a relocatable object file from a static library Gold fails to make a relocatable object file from a static library unix unix

Gold fails to make a relocatable object file from a static library


Reported here. Turns out this is already fixed in trunk, so I guess the solution is to wait until binutils 2.31 (or build binutils from scratch).


What does the error mean?

It means that Gold is failing internal assertion. Probably this one.

How can I achieve the same relocatable object output with ld.gold as with ld and ld.bfd

You need to either fix Gold to handle this input, or to change the input so it doesn't trigger the bug.

Since neither you nor I understand exactly what the bug triggering conditions are, the first step should be to file a bug in bugzilla.

There is already a very similar bug. Not sure if you are hitting the same issue though.