[rfc] towards a defined abi for libgfortran

Richard Henderson rth@twiddle.net
Tue Dec 7 00:41:00 GMT 2004


A prerequisite for being able to point to an ABI is symbol access control.
Namely, you don't want to expose any symbols that you don't mean to expose.

The following patch replaces the prefix macro with a set of fine-grain
macros that do allow us to control which symbols are seen by user apps.

On elf systems, it will use __attribute__((visibility("hidden"))) to
prevent specific symbols from escaping the library.  It will also use
__attribute__((alias(...))) to reduce the number of PLT entries needed
when calling routines that we do intend to export.

On windows, it will use __attribute__((dllexport)).

I've tested on linux, both with and without the attributes.  I have
not tested on windows.  I may be able to do this later, but I'd really
prefer someone else do it.  ;-)

A future step for elf will be to actually version the symbols.  That's
complimentary with this step, since here we get to tell the compiler
that it can generate better code for various symbol access.

Comments?


r~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: d-export.gz
Type: application/x-gzip
Size: 30433 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20041207/20a27ab7/attachment.bin>


More information about the Fortran mailing list