This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [rfc] towards a defined abi for libgfortran
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: GCC ML <gcc at gcc dot gnu dot org>, Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: fortran at gcc dot gnu dot org, Richard Henderson <rth at twiddle dot net>
- Date: Fri, 10 Dec 2004 22:55:07 -0500
- Subject: Re: [rfc] towards a defined abi for libgfortran
- References: <20041207004150.GA5856@twiddle.net> <DA243E46-47ED-11D9-840F-000A95D692F4@physics.uc.edu>
On Dec 6, 2004, at 8:18 PM, Andrew Pinski wrote:
On Dec 6, 2004, at 7:41 PM, Richard Henderson wrote:
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.
Comments?
I will test this on darwin which has visibility("hidden") but not
alias.
This failed but due to a compiler bug.
The following code is not able to compile on darwin because
the target says options is defined when it is not because it is
a common symbol.
int options __attribute__((__visibility__("hidden")));
void f(void)
{
options = 0;
}
I will look into fixing this and test the patch again. This is a
regression from when Mark rewrote part of the darwin backend.
Thanks,
Andrew Pinski