[PATCH] D38513: [LLD] [RFC] [COFF] Add support for GNU binutils import libraries

Saleem Abdulrasool via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 3 13:45:47 PDT 2017


compnerd added a comment.

@ruiu I'm not sure that I understand the first question.  Might be easier to discuss this on IRC or at the social.

As to why binutils generates different import libraries, is because a long time ago, import libraries used to be complete archives with object files.  This was larger but simpler.  They based the behaviour on that, but added some extensions to actually be able to sort the sections correctly (which in my experience is still insufficient as there have been cases where it would inject the null terminator too early, or swap things earlier).  To make things worse, they actually don't get the ordering correct with the short import library format (which is what MSVC currently generates).  In order to work with binutils, you need to generate the binutils specific format of the import library.


https://reviews.llvm.org/D38513





More information about the llvm-commits mailing list