[PATCH v2 3/3] Consolidate posix_fadvise implementations

Joseph Myers joseph@codesourcery.com
Wed Oct 12 15:39:00 GMT 2016


On Wed, 12 Oct 2016, Adhemerval Zanella wrote:

> For some reason I am not seeing this issue with my mips64n64 toolchain
> (gcc 5.3.1, binutils 2.26.0.20160331).

I was using GCC 5.4.1 20160810 and binutils 2.27.51.20160810.  I've now 
updated to today's GCC 5 branch and binutils master, and still see the 
same issue, in a clean build from scratch.

The error is complaining about libc.so when linking sotruss-lib.so.  
libc.so has (readelf --dyn-syms)

   262: 000000000010b950    28 FUNC    GLOBAL DEFAULT   12 posix_fadvise64@GLIBC_2.2
   417: 000000000010b950    28 FUNC    WEAK   DEFAULT   12 posix_fadvise64@@GLIBC_2.2
  1505: 000000000010b950    28 FUNC    GLOBAL DEFAULT   12 posix_fadvise64@@GLIBC_2.3.3

that is, two separate definitions at version GLIBC_2.2.  It looks to me 
like sysdeps/unix/sysv/linux/posix_fadvise64.c would create a 
posix_fadvise64 weak_alias, while 
sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c then adds 
compat_symbol / versioned_symbol calls.  If a symbol is being created with 
explicit versioning, direct weak_alias / strong_alias calls for it should 
be disabled.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list