The next re开发者_如何学Govision of the POSIX / Single Unix Specification standard is expected to include a C compiler that is capable of producing shared objects / dynamic libraries.
One of the comments caught my attention, and I'm quoting the essence of it here:
... some dynamic linker implementations require that an exhaustive list of exported symbols ...
I've also heard of __declspec(dllexport)
in Microsoft toolchains, and likes.
The current wording for the next revision of the standard doesn't seem to include any capability to specify individual symbols for export, and I'm worried that I can't suppress the exporting of symbols internal to the implementation of my library.
While I seek a portable way to control the visibility of object file symbols, I'd also like to know how do linkers (from toolchains and within the OS) determine which of the many duplicate symbols to link with.
精彩评论