cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURL_EXTERN also used by VMS.

From: Craig A. Berry <craigberry_at_mac.com>
Date: Mon, 02 Feb 2015 17:24:30 -0600

> On Feb 2, 2015, at 4:37 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> 2. The requirement to always add new ones last in this generated list will be seriously awkward: right now multi.h is scanned last in the test (and I believe the OS/400 script) so for example new easy functions couldn't be added in easy.h where they all are now!
>
> I don't have any immediate solution to this which is why I proceeded and pushed the test anyway, as it will at least properly make us aware if or when we break the order.

I don't have a solution to the ordering problem either, but it is possible with GNU ld's --version-script option on ELF platforms to control what gets exported in a fashion somewhat similar to what the VMS linker options file does. If a symbol isn't in the list you supply with a global tag, it doesn't get exported in the dynamic library, so you'd find out right away if there is anything that needs to be declared CURL_EXTERN that isn't.

Unfortunately I don't think there is any way to do this across compilers and platforms, but it can be one way to wrangle the symbols such that only those that should be exported are.
________________________________________
Craig A. Berry
mailto:craigberry_at_mac.com

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-02-03