This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] towards a defined abi for libgfortran



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]