cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURL_EXTERN also used by VMS.

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 3 Feb 2015 01:09:52 +0100

On Mon, Feb 02, 2015 at 05:24:30PM -0600, Craig A. Berry wrote:
> > 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.

Symbian OS suffers from this issue as well, except that it's resolved by
explicitly specifying the order of the symbols in a .def file. If an external
symbol gets added without that file being updated, then the build fails and the
symbol can be manually added to the file (to the end of the file!). For this
reason it's likely rather bit-rotted by now.

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