Make llseek a compat symbol (bug 18471).

System Internals / glibc - Joseph Myers [] - 22 May 2018 15:44 EDT

The llseek function name is an obsolete, Linux-specific, unprototyped name for lseek64 with a link-time warning. This patch completes the obsoletion of this function name by making it into a compat symbol, not available for newly linked programs and not included in the ABI for new ports.

When a compat symbol is defined in syscalls.list, the code for that function is not built at all for static linking unless some non-compat symbol for that function is also defined with an explicit symbol
version, so an explicit symbol version for lseek64 is added to the MIPS n32 syscalls.list. The case in that handles such explicit non-compat symbol versions then needs to be changed to use weak_alias instead of strong_alias when the syscall is built outside of libc, to avoid linknamespace failures from a strong lseek64 symbol in static libpthread.

The x32 llseek.S was as far as I could tell already unused (nothing builds an llseek.* source file, at least since the lseek / lseek64 / llseek consolidation), so is removed in this patch as well.

Tested for x86_64 and x86, and with

[BZ #18471]
- sysdeps/unix/ (emit_weak_aliases): Use weak aliases for non-libc case of versioned symbols.
- sysdeps/unix/sysv/linux/lseek64.c: Include . (llseek): Define as compat symbol if [SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_28)], not as weak alias with link warning.
- sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list (llseek): Make into a compat symbol, disabled for minimum symbol version GLIBC_2.28 and later.
- sysdeps/unix/sysv/linux/x86_64/x32/llseek.S: Remove file.

5c5c0dd747 Make llseek a compat symbol (bug 18471).
ChangeLog | 14 ++++++++++++++
NEWS | 5 +++++
sysdeps/unix/ | 2 +-
sysdeps/unix/sysv/linux/lseek64.c | 11 +++++------
sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list | 2 +-
sysdeps/unix/sysv/linux/x86_64/x32/llseek.S | 1 -
6 files changed, 26 insertions(+), 9 deletions(-)


  • Share