From 983f43b57bc347717aca85616cbce731c7494ca3 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 25 Jun 2021 10:42:54 +0200 Subject: Linux: Move mq_open, __mq_open_2 from librt to libc The symbols were moved using scripts/move-symbol-to-libc.py. A placeholder symbol is required to keep the GLIBC_2.7 version. Reviewed-by: Adhemerva Zanella --- rt/Makefile | 2 +- rt/Versions | 14 +++++++++++++- rt/librt-compat.c | 6 ++++++ 3 files changed, 20 insertions(+), 2 deletions(-) (limited to 'rt') diff --git a/rt/Makefile b/rt/Makefile index e86a3107ee..c015611f1d 100644 --- a/rt/Makefile +++ b/rt/Makefile @@ -30,7 +30,6 @@ routines = \ librt-routines = \ librt-compat \ - mq_open \ mq_receive \ mq_send \ mq_timedreceive \ @@ -62,6 +61,7 @@ $(librt-routines-var) += \ mq_close \ mq_getattr \ mq_notify \ + mq_open \ mq_setattr \ tests := tst-shm tst-timer tst-timer2 \ diff --git a/rt/Versions b/rt/Versions index b3c9bba9ff..d28a7f6979 100644 --- a/rt/Versions +++ b/rt/Versions @@ -29,6 +29,7 @@ libc { mq_close; mq_getattr; mq_notify; + mq_open; mq_setattr; %endif } @@ -36,10 +37,16 @@ libc { %if PTHREAD_IN_LIBC lio_listio; lio_listio64; +%endif + } + GLIBC_2.7 { +%if PTHREAD_IN_LIBC + __mq_open_2; %endif } GLIBC_2.34 { %if PTHREAD_IN_LIBC + __mq_open_2; aio_cancel; aio_cancel64; aio_init; @@ -60,6 +67,7 @@ libc { mq_close; mq_getattr; mq_notify; + mq_open; mq_setattr; %endif shm_open; @@ -115,9 +123,9 @@ librt { mq_close; mq_getattr; mq_notify; + mq_open; mq_setattr; %endif - mq_open; mq_receive; mq_send; mq_timedreceive; @@ -133,6 +141,10 @@ librt { %endif } GLIBC_2.7 { +%if PTHREAD_IN_LIBC + __librt_version_placeholder; +%else __mq_open_2; +%endif } } diff --git a/rt/librt-compat.c b/rt/librt-compat.c index 23c87b0f3e..ef353acdd1 100644 --- a/rt/librt-compat.c +++ b/rt/librt-compat.c @@ -38,4 +38,10 @@ compat_symbol (librt, __librt_version_placeholder_1, __librt_version_placeholder, GLIBC_2_4); # endif +# if SHLIB_COMPAT (librt, GLIBC_2_7, GLIBC_2_34) \ + && ABI_librt_GLIBC_2_7 != ABI_librt_GLIBC_2_4 +compat_symbol (librt, __librt_version_placeholder_1, + __librt_version_placeholder, GLIBC_2_7); +# endif + #endif -- cgit 1.4.1