--- Comment #6 from Joel Sherrill <joel.sherrill at oarcorp dot com> 2012-04-23 15:25:57 UTC ---
I managed to narrow down the time frame when this broke to between 2011-07-09
works - binutils 2.20.1 with rtems 4.10 patches
works - binutils 2.21.1 with no patches
broken - binutils 2.22 with no patches
works - 126.96.36.19910627
works - 188.8.131.5210701
works - 184.108.40.20610708
works - 220.127.116.1110709
broken - 18.104.22.16810710
broken - 22.214.171.12410714
The timestamps for the file changes are so close except for the gold changes
that I can't separate them. Ignoring the gold changes, I see two entries in the
bfd and ld ChangeLogs. This is the single ld ChangeLog entry:
+2011-07-09 H.J. Lu <hongjiu.lu@...>
+ PR ld/12942
+ * ldlang.c (section_already_linked): Pass "struct already_linked *"
+ to bfd_section_already_linked.
+ (lang_process): Set link_info.loading_lto_outputs before
+ loading LTO outputs.
+ * plugin.c: Include "libbfd.h".
+ (add_symbols): Call bfd_section_already_linked with comdat_key.
Since that mentions the phrase "already_linked" and our failure is on already
linked code, this looks like the culprit. I don't see any indication that a
test case like this one was tested for 12942.