This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Replace __attribute__((visibility("protected")))
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: "H.J. Lu" <hongjiu dot lu at intel dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Fri, 06 Mar 2015 21:11:39 +0100
- Subject: Re: [PATCH] Replace __attribute__((visibility("protected")))
- Authentication-results: sourceware.org; auth=none
- References: <20150306194153 dot GA30470 at intel dot com>
"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.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."