[rfc] towards a defined abi for libgfortran
Andrew Pinski
pinskia@physics.uc.edu
Sat Dec 11 03:55:00 GMT 2004
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
More information about the Gcc
mailing list