[PATCH 15/30] nptl: Remove pread from libpthread

Adhemerval Zanella adhemerval.zanella@linaro.org
Fri Mar 19 16:51:08 GMT 2021



On 19/03/2021 10:40, Florian Weimer wrote:
> * Adhemerval Zanella via Libc-alpha:
> 
>> I tried, but the issue is although it fixes alpha it throws an error for
>> i386 with 'multiple definition of `pread@GLIBC_2.2' since its ABI also
>> exports the same symbol version *but* in a different TU (non-LFS Linux 
>> pread.c).
>>
>> The issue alpha is currently the *only* ABI with has a versioned 
>> pread@GLIBC_2.2, but it is also a LFS as default so the its versioned 
>> pread@GLIBC_2.2 is an alias for __libc_pread64.
> 
> How does alpha maintain its current exception status?  I find it
> difficult to understand how the present state is realized.
> 

Because the weak_alias does this automatically:

sysdeps/unix/sysv/linux/pread64.c

 35 weak_alias (__libc_pread64, pread)

$ readelf -s posix/pread64.os | grep -w pread
    21: 0000000000000000   288 FUNC    WEAK   DEFAULT [STD GPLOAD]     1 pread
$ readelf -s nptl/pread64.os | grep -w pread
    18: 0000000000000000   288 FUNC    WEAK   DEFAULT [STD GPLOAD]     1 pread

$ readelf -s nptl/libpthread.so | grep -w pread | head -n1
   182: 0000000000005850   288 FUNC    WEAK   DEFAULT [STD GPLOAD]    12 pread@@GLIBC_2.2

But I just figure out that I need to put the compat_symbol
within the __OFF_T_MATCHES_OFF64_T.


More information about the Libc-alpha mailing list