https://sourceware.org/bugzilla/show_bug.cgi?id=21334
Maciej W. Rozycki <ma...@linux-mips.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #9975|0 |1 is obsolete| | --- Comment #6 from Maciej W. Rozycki <ma...@linux-mips.org> --- Created attachment 9977 --> https://sourceware.org/bugzilla/attachment.cgi?id=9977&action=edit WIP bug fix v2 I have looked into it and it looks to me like rewriting MIPS backend code to make it avoid relying on dynsym sorting in the case of the presence of GOT relocations in a static binary (i.e. linking in PIC code such as pieces of libgcc.a into a static binary) requiring the backend to set up what in a dynamic binary would become the local part of the GOT would be too costly to be justified for such a corner case. So let's make `_bfd_elf_link_renumber_dynsyms' called in all cases, which I hope is going to be safe for all backends. In fact, based on the observation previously made that this function is already inconsistently called in the `--gc-sections' case even in the static case, making the call unconditionally should have been largely validated by Debian packaging already, which has been using `--gc-sections' distribution-wide across all its targets for a while now. James, can you confirm this has been the case? James and Alastair, can you please see if this updated version of the the patch attached fixes the issue for you? -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils