[PATCH] Replace __attribute__((visibility("protected")))

Mike Frysinger vapier@gentoo.org
Fri Mar 6 22:31:00 GMT 2015


On 06 Mar 2015 13:11, H.J. Lu wrote:
> On Fri, Mar 6, 2015 at 12:11 PM, 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.
> 
> Here is the updated patch to use __SYMBOL_PREFIX.  OK
> to install?

a bunch of the elf/ files don't utilize __SYMBOL_PREFIX already.  would be nice 
if we have ASM_SYMBOL_NAME to complement the C_SYMBOL_NAME in libc-symbols.h.  
and maybe a protected_def() macro so you could do:
	protected_def (global);

at any rate, this patch as-is lgtm.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150306/72712b2b/attachment.sig>


More information about the Libc-alpha mailing list