https://sourceware.org/bugzilla/show_bug.cgi?id=20675
--- Comment #5 from Nick Clifton <nickc at redhat dot com> --- Created attachment 9629 --> https://sourceware.org/bugzilla/attachment.cgi?id=9629&action=edit Proposed patch Hi Wbx, Thanks very much. I can now reproduce the problem, although I am not sure now it should be resolved. At issue is the fact that the libc.a library contains relocations that set up entries in the PLT, but the PLT is only used when creating a dynamic executable, not a static one. You are linking with "-static" specified on the command line, so clearly the intent is to create a static executable. There is a bug in the linker, in that it should have produced an informative error message and then exited with a non-zero return code, rather than calling abort. But I do not think that the linker is doing anything fundamentally wrong. You are asking it to create a static executable, but giving it shared libraries to link. The real bug, IMHO, is the creation of what appears to be a static library - libc.a - but which actually contains shared library code. The uploaded patch will fix the linker, so that an error message like this is displayed: ld:./libc.a(herrno.os)(.text): shared library symbol _h_errno encountered whilst performing a static link ld: final link failed: Nonrepresentable section on output If you are happy with this change then I will check it in. I am not sure however what should be done about libc.a. I think that you need to investigate how it was created in the first place. Cheers Nick -- 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