This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] Replace __attribute__((visibility("protected")))


On Fri, 6 Mar 2015, Andreas Schwab wrote:

> "H.J. Lu" <hongjiu.lu@intel.com> writes:
> 
> > diff --git a/elf/ifuncdep2.c b/elf/ifuncdep2.c
> > index 99d1926..599eba7 100644
> > --- a/elf/ifuncdep2.c
> > +++ b/elf/ifuncdep2.c
> > @@ -2,7 +2,8 @@
> >  
> >  #include "ifunc-sel.h"
> >  
> > -int global __attribute__ ((visibility ("protected"))) = -1;
> > +int global = -1;
> > +asm (".protected global");
> 
> Some architectures use a symbol prefix.

No such architectures are currently supported by glibc, and I expect lots 
of places would need fixing if support were to be added for any such 
architecture.  (Using symbol prefixes with ELF also violates the gABI, 
which says "External C symbols have the same names in C and object files' 
symbol tables.".)

-- 
Joseph S. Myers
joseph@codesourcery.com


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