Message ID | 1473424150-6407-1-git-send-email-ynorov@caviumnetworks.com |
---|---|
State | New |
Headers | show |
On Sep 09 2016, Yury Norov <ynorov@caviumnetworks.com> wrote: > diff --git a/sysdeps/unix/sysv/linux/fxstatat.c b/sysdeps/unix/sysv/linux/fxstatat.c > index f716bf3..32959e5 100644 > --- a/sysdeps/unix/sysv/linux/fxstatat.c > +++ b/sysdeps/unix/sysv/linux/fxstatat.c > @@ -61,5 +61,5 @@ libc_hidden_def (__fxstatat) > #ifdef XSTAT_IS_XSTAT64 > # undef __fxstatat64 > strong_alias (__fxstatat, __fxstatat64); > -libc_hidden_def (__fxstatat64) > +libc_hidden_ver (__fxstatat, __fxstatat64) libc_hidden_ver doesn't make sense, as __fxstatat64 isn't a versioned symbol. The real problem is that the hidden_proto for __fxstatat64 is suppressed. Andreas.
On Fri, Sep 09, 2016 at 04:16:44PM +0200, Andreas Schwab wrote: > On Sep 09 2016, Yury Norov <ynorov@caviumnetworks.com> wrote: > > > diff --git a/sysdeps/unix/sysv/linux/fxstatat.c b/sysdeps/unix/sysv/linux/fxstatat.c > > index f716bf3..32959e5 100644 > > --- a/sysdeps/unix/sysv/linux/fxstatat.c > > +++ b/sysdeps/unix/sysv/linux/fxstatat.c > > @@ -61,5 +61,5 @@ libc_hidden_def (__fxstatat) > > #ifdef XSTAT_IS_XSTAT64 > > # undef __fxstatat64 > > strong_alias (__fxstatat, __fxstatat64); > > -libc_hidden_def (__fxstatat64) > > +libc_hidden_ver (__fxstatat, __fxstatat64) > > libc_hidden_ver doesn't make sense, as __fxstatat64 isn't a versioned > symbol. The real problem is that the hidden_proto for __fxstatat64 is > suppressed. > > Andreas. Maybe. I'm not too experienced in glibc versioning. And what the correct fix for it? Yury.
On Sep 09 2016, Yury Norov <ynorov@caviumnetworks.com> wrote: > On Fri, Sep 09, 2016 at 04:16:44PM +0200, Andreas Schwab wrote: >> On Sep 09 2016, Yury Norov <ynorov@caviumnetworks.com> wrote: >> >> > diff --git a/sysdeps/unix/sysv/linux/fxstatat.c b/sysdeps/unix/sysv/linux/fxstatat.c >> > index f716bf3..32959e5 100644 >> > --- a/sysdeps/unix/sysv/linux/fxstatat.c >> > +++ b/sysdeps/unix/sysv/linux/fxstatat.c >> > @@ -61,5 +61,5 @@ libc_hidden_def (__fxstatat) >> > #ifdef XSTAT_IS_XSTAT64 >> > # undef __fxstatat64 >> > strong_alias (__fxstatat, __fxstatat64); >> > -libc_hidden_def (__fxstatat64) >> > +libc_hidden_ver (__fxstatat, __fxstatat64) >> >> libc_hidden_ver doesn't make sense, as __fxstatat64 isn't a versioned >> symbol. The real problem is that the hidden_proto for __fxstatat64 is >> suppressed. >> >> Andreas. > > Maybe. I'm not too experienced in glibc versioning. And what the > correct fix for it? Reinstate the hidden_proto, but with a non-conflicting definition. Andreas.
diff --git a/sysdeps/unix/sysv/linux/fxstatat.c b/sysdeps/unix/sysv/linux/fxstatat.c index f716bf3..32959e5 100644 --- a/sysdeps/unix/sysv/linux/fxstatat.c +++ b/sysdeps/unix/sysv/linux/fxstatat.c @@ -61,5 +61,5 @@ libc_hidden_def (__fxstatat) #ifdef XSTAT_IS_XSTAT64 # undef __fxstatat64 strong_alias (__fxstatat, __fxstatat64); -libc_hidden_def (__fxstatat64) +libc_hidden_ver (__fxstatat, __fxstatat64) #endif
__fxstatat64 is defined with hidden_def, if XSTAT_IS_XSTAT64 is enabled. It causes compile-time error. This patch fixes it. GCC error: In file included from <command-line>:0:0: ./../include/libc-symbols.h:432:26: error: ‘__EI___fxstatat64’ aliased to undefined symbol ‘__GI___fxstatat64’ extern __typeof (name) __EI_##name \ ^ ./../include/libc-symbols.h:436:29: note: in expansion of macro ‘__hidden_ver1’ # define hidden_def(name) __hidden_ver1(__GI_##name, name, name); ^ ./../include/libc-symbols.h:487:32: note: in expansion of macro ‘hidden_def’ # define libc_hidden_def(name) hidden_def (name) ^ ../sysdeps/unix/sysv/linux/fxstatat.c:64:1: note: in expansion of macro ‘libc_hidden_def’ libc_hidden_def (__fxstatat64) ^ 2016-09-09 Yury Norov <ynorov@caviumnetworks.com> * sysdeps/unix/sysv/linux/fxstatat.c: fix __fxstatat64 symmbol generation Signed-off-by: Yury Norov <ynorov@caviumnetworks.com> --- sysdeps/unix/sysv/linux/fxstatat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)