Web lists-archives.com

Re: [Mingw-users] Can't do partial linking with libmoldname.a?





在 2016年11月26日 19:29, Eli Zaretskii 写道:

> I don't really know, I never tried "ld -r".  I asked what would be the
> semantics of that, and I still don't know the answer to that.

I think the semantics of "ld -r" is gluing input object files together, 
output a single and big object file.

The object files in an import library just like other object files, it 
can has it's own .text segment (maybe .data as well), the difference is 
that it have some import section.

So "ld -r" an object and an import library can generate a single big 
object, with .text segment gluing together, and preserving import data.



In fact, I'm using this technique to compile my code (used some GCC only 
extensions) to a single and MSVC usable .obj file. As a temporary 
solution, I replaced all "strdup" to "_strdup" by defining a macro, to 
avoid linking to libmoldname.a

------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe