RHEL 9.0.0 Alpha bootstrap

The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/glibc#90ca20fd0234925743db5e1e231b73b4a38749a9
This commit is contained in:
Troy Dawson 2020-10-23 08:45:59 -07:00
parent c9106cca32
commit eb6f429d3f
6 changed files with 1261 additions and 11 deletions

View File

@ -44,7 +44,7 @@ index 518824e8a5826314..66c395474a57c1fd 100644
-#endif
}
diff --git a/elf/dl-support.c b/elf/dl-support.c
index 7704c101c5a543a1..ffa235c78df8481f 100644
index afbc94df5435a7d7..e894f98e97641cef 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -120,10 +120,8 @@ struct r_scope_elem _dl_initial_searchlist =
@ -59,18 +59,18 @@ index 7704c101c5a543a1..ffa235c78df8481f 100644
/* Random data provided by the kernel. */
void *_dl_random;
diff --git a/elf/rtld.c b/elf/rtld.c
index 5b882163fae5ea8a..f93adf017c9d2110 100644
index 5d117d0d2c5902c1..3c4bb5605234409d 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -316,7 +316,6 @@ audit_list_count (struct audit_list *list)
return naudit;
@@ -294,7 +294,6 @@ dl_main_state_init (struct dl_main_state *state)
state->version_info = false;
}
-#ifndef HAVE_INLINED_SYSCALLS
/* Set nonzero during loading and initialization of executable and
libraries, cleared before the executable's entry point runs. This
must not be initialized to nonzero, because the unused dynamic
@@ -326,7 +325,6 @@ audit_list_count (struct audit_list *list)
@@ -304,7 +303,6 @@ dl_main_state_init (struct dl_main_state *state)
never be called. */
int _dl_starting_up = 0;
rtld_hidden_def (_dl_starting_up)
@ -78,14 +78,14 @@ index 5b882163fae5ea8a..f93adf017c9d2110 100644
/* This is the structure which defines all variables global to ld.so
(except those which cannot be added for some reason). */
@@ -1178,10 +1176,8 @@ dl_main (const ElfW(Phdr) *phdr,
@@ -1146,10 +1144,8 @@ dl_main (const ElfW(Phdr) *phdr,
/* Process the environment variable which control the behaviour. */
process_envvars (&mode, &audit_list);
process_envvars (&state);
-#ifndef HAVE_INLINED_SYSCALLS
/* Set up a flag which tells we are just starting. */
_dl_starting_up = 1;
-#endif
const char *ld_so_name = _dl_argv[0];
if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
{

View File

@ -0,0 +1,232 @@
From a4ef8877d0f9739378655e683cc013a29c4ab82b Mon Sep 17 00:00:00 2001
From: Siddhesh Poyarekar <siddhesh@sourceware.org>
Date: Wed, 21 Oct 2020 14:55:29 +0530
Subject: [PATCH] Revert "Move ftime to a compatibility symbol"
This reverts commit 14633d3e568eb9770a7e5046eff257113e0453fb.
---
include/sys/timeb.h | 1 +
.../unix/sysv/linux/riscv/rv32/libc.abilist | 1 +
time/Makefile | 5 +-
time/ftime.c | 19 +-----
time/sys/timeb.h | 44 ++++++++++++++
time/tst-ftime.c | 59 +++++++++----------
6 files changed, 79 insertions(+), 50 deletions(-)
create mode 100644 include/sys/timeb.h
create mode 100644 time/sys/timeb.h
diff --git a/include/sys/timeb.h b/include/sys/timeb.h
new file mode 100644
index 0000000000..9f4509c35e
--- /dev/null
+++ b/include/sys/timeb.h
@@ -0,0 +1 @@
+#include <time/sys/timeb.h>
diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
index d984c02492..60a74a5ac3 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
@@ -805,6 +805,7 @@ GLIBC_2.33 fsync F
GLIBC_2.33 ftell F
GLIBC_2.33 ftello F
GLIBC_2.33 ftello64 F
+GLIBC_2.33 ftime F
GLIBC_2.33 ftok F
GLIBC_2.33 ftruncate F
GLIBC_2.33 ftruncate64 F
diff --git a/time/Makefile b/time/Makefile
index ab8fb3303b..a4fb13d6a3 100644
--- a/time/Makefile
+++ b/time/Makefile
@@ -22,7 +22,7 @@ subdir := time
include ../Makeconfig
-headers := time.h sys/time.h bits/time.h \
+headers := time.h sys/time.h sys/timeb.h bits/time.h \
bits/types/clockid_t.h bits/types/clock_t.h \
bits/types/struct_itimerspec.h \
bits/types/struct_timespec.h bits/types/struct_timeval.h \
@@ -45,10 +45,9 @@ aux := era alt_digit lc-time-cleanup
tests := test_time clocktest tst-posixtz tst-strptime tst_wcsftime \
tst-getdate tst-mktime tst-mktime2 tst-ftime_l tst-strftime \
tst-mktime3 tst-strptime2 bug-asctime bug-asctime_r bug-mktime1 \
- tst-strptime3 bug-getdate1 tst-strptime-whitespace \
+ tst-strptime3 bug-getdate1 tst-strptime-whitespace tst-ftime \
tst-tzname tst-y2039 bug-mktime4 tst-strftime2 tst-strftime3 \
tst-clock tst-clock2 tst-clock_nanosleep tst-cpuclock1
-tests-internal := tst-ftime
include ../Rules
diff --git a/time/ftime.c b/time/ftime.c
index be3295ef76..93f485bbf7 100644
--- a/time/ftime.c
+++ b/time/ftime.c
@@ -16,23 +16,11 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_33)
-
+#include <sys/timeb.h>
#include <time.h>
-struct timeb
- {
- time_t time; /* Seconds since epoch, as from `time'. */
- unsigned short int millitm; /* Additional milliseconds. */
- short int timezone; /* Minutes west of GMT. */
- short int dstflag; /* Nonzero if Daylight Savings Time used. */
- };
-
int
-attribute_compat_text_section
-__ftime (struct timeb *timebuf)
+ftime (struct timeb *timebuf)
{
struct timespec ts;
__clock_gettime (CLOCK_REALTIME, &ts);
@@ -43,6 +31,3 @@ __ftime (struct timeb *timebuf)
timebuf->dstflag = 0;
return 0;
}
-
-compat_symbol (libc, __ftime, ftime, GLIBC_2_0);
-#endif
diff --git a/time/sys/timeb.h b/time/sys/timeb.h
new file mode 100644
index 0000000000..641c333450
--- /dev/null
+++ b/time/sys/timeb.h
@@ -0,0 +1,44 @@
+/* Copyright (C) 1994-2020 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_TIMEB_H
+#define _SYS_TIMEB_H 1
+
+#include <features.h>
+
+#include <bits/types/time_t.h>
+
+__BEGIN_DECLS
+
+/* Structure returned by the `ftime' function. */
+
+struct timeb
+ {
+ time_t time; /* Seconds since epoch, as from `time'. */
+ unsigned short int millitm; /* Additional milliseconds. */
+ short int timezone; /* Minutes west of GMT. */
+ short int dstflag; /* Nonzero if Daylight Savings Time used. */
+ };
+
+/* Fill in TIMEBUF with information about the current time. */
+
+extern int ftime (struct timeb *__timebuf)
+ __nonnull ((1)) __attribute_deprecated__;
+
+__END_DECLS
+
+#endif /* sys/timeb.h */
diff --git a/time/tst-ftime.c b/time/tst-ftime.c
index 6978feb0f1..08916c0c65 100644
--- a/time/tst-ftime.c
+++ b/time/tst-ftime.c
@@ -16,23 +16,9 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-
-#include <shlib-compat.h>
-#if TEST_COMPAT (libc, GLIBC_2_0, GLIBC_2_33)
-#include <time.h>
-#include <support/check.h>
-
-compat_symbol_reference (libc, ftime, ftime, GLIBC_2_0);
-
-struct timeb
- {
- time_t time;
- unsigned short int millitm;
- short int timezone;
- short int dstflag;
- };
-
-extern int ftime (struct timeb *__timebuf);
+#include <sys/timeb.h>
+#include <stdio.h>
+#include <libc-diag.h>
static int
do_test (void)
@@ -44,23 +30,36 @@ do_test (void)
{
prev = curr;
- /* ftime was deprecated on 2.31 and removed on 2.33. */
- TEST_COMPARE (ftime (&curr), 0);
- TEST_VERIFY_EXIT (curr.time >= prev.time);
- if (curr.time == prev.time)
- TEST_VERIFY_EXIT (curr.millitm >= prev.millitm);
+ /* ftime was deprecated on 2.31. */
+ DIAG_PUSH_NEEDS_COMMENT;
+ DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
+
+ if (ftime (&curr))
+ {
+ printf ("ftime returned an error\n");
+ return 1;
+ }
+
+ DIAG_POP_NEEDS_COMMENT;
+
+ if (curr.time < prev.time)
+ {
+ printf ("ftime's time flowed backwards\n");
+ return 1;
+ }
+
+ if (curr.time == prev.time
+ && curr.millitm < prev.millitm)
+ {
+ printf ("ftime's millitm flowed backwards\n");
+ return 1;
+ }
if (curr.time > prev.time)
sec ++;
}
return 0;
}
-#else
-static int
-do_test (void)
-{
- return EXIT_UNSUPPORTED;
-}
-#endif
-#include <support/test-driver.c>
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
--
2.26.2

View File

@ -0,0 +1,667 @@
From d28b30ba10c1c7da38392e1759ae141d107f3640 Mon Sep 17 00:00:00 2001
From: Siddhesh Poyarekar <siddhesh@sourceware.org>
Date: Wed, 21 Oct 2020 14:20:17 +0530
Subject: [PATCH] Revert "linux: Move {f}xstat{at} to compat symbols"
This reverts commit 20b39d59467b0c1d858e89ded8b0cebe55e22f60.
---
sysdeps/unix/sysv/linux/alpha/fxstat64.c | 12 +----------
sysdeps/unix/sysv/linux/alpha/fxstatat64.c | 9 +-------
sysdeps/unix/sysv/linux/alpha/lxstat64.c | 12 +----------
sysdeps/unix/sysv/linux/alpha/xstat64.c | 12 +----------
sysdeps/unix/sysv/linux/fxstat.c | 8 -------
sysdeps/unix/sysv/linux/fxstat64.c | 14 ++++---------
sysdeps/unix/sysv/linux/fxstatat.c | 8 -------
sysdeps/unix/sysv/linux/fxstatat64.c | 12 +----------
sysdeps/unix/sysv/linux/lxstat.c | 8 -------
sysdeps/unix/sysv/linux/lxstat64.c | 21 +++++++------------
sysdeps/unix/sysv/linux/mips/fxstat.c | 8 -------
sysdeps/unix/sysv/linux/mips/lxstat.c | 8 -------
.../unix/sysv/linux/mips/mips64/fxstat64.c | 8 -------
.../unix/sysv/linux/mips/mips64/fxstatat.c | 8 -------
.../unix/sysv/linux/mips/mips64/fxstatat64.c | 8 -------
.../unix/sysv/linux/mips/mips64/lxstat64.c | 8 -------
sysdeps/unix/sysv/linux/mips/mips64/xstat64.c | 9 +-------
sysdeps/unix/sysv/linux/mips/xstat.c | 8 -------
.../unix/sysv/linux/riscv/rv32/libc.abilist | 8 +++++++
sysdeps/unix/sysv/linux/xstat.c | 8 -------
sysdeps/unix/sysv/linux/xstat64.c | 15 +++++--------
21 files changed, 31 insertions(+), 181 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/alpha/fxstat64.c b/sysdeps/unix/sysv/linux/alpha/fxstat64.c
index bcfb55050c..9d6b8eca32 100644
--- a/sysdeps/unix/sysv/linux/alpha/fxstat64.c
+++ b/sysdeps/unix/sysv/linux/alpha/fxstat64.c
@@ -22,11 +22,9 @@
#include <kernel_stat.h>
#include <sysdep.h>
#include <xstatconv.h>
-#include <shlib-compat.h>
/* Get information about the file NAME in BUF. */
int
-attribute_compat_text_section
__fxstat64 (int vers, int fd, struct stat64 *buf)
{
switch (vers)
@@ -44,12 +42,4 @@ __fxstat64 (int vers, int fd, struct stat64 *buf)
}
}
}
-
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
-strong_alias (__fxstat64, __fxstat_compat)
-compat_symbol (libc, __fxstat_compat, __fxstat, GLIBC_2_0);
-#endif
-
-#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33)
-compat_symbol (libc, __fxstat64, __fxstat64, GLIBC_2_1);
-#endif
+strong_alias (__fxstat64, __fxstat);
diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat64.c b/sysdeps/unix/sysv/linux/alpha/fxstatat64.c
index fa3074eeca..997fb87ac6 100644
--- a/sysdeps/unix/sysv/linux/alpha/fxstatat64.c
+++ b/sysdeps/unix/sysv/linux/alpha/fxstatat64.c
@@ -22,18 +22,11 @@
#include <kernel_stat.h>
#include <sysdep.h>
#include <xstatconv.h>
-#include <shlib-compat.h>
-#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
/* Get information about the file NAME in BUF. */
int
-attribute_compat_text_section
__fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
{
return INLINE_SYSCALL_CALL (fstatat64, fd, file, st, flag);
}
-strong_alias (__fxstatat64, __fxstatat_compat)
-compat_symbol (libc, __fxstatat_compat, __fxstatat, GLIBC_2_4);
-
-compat_symbol (libc, __fxstatat64, __fxstatat64, GLIBC_2_4);
-#endif
+strong_alias (__fxstatat64, __fxstatat);
diff --git a/sysdeps/unix/sysv/linux/alpha/lxstat64.c b/sysdeps/unix/sysv/linux/alpha/lxstat64.c
index 7424b2f621..38f132f15e 100644
--- a/sysdeps/unix/sysv/linux/alpha/lxstat64.c
+++ b/sysdeps/unix/sysv/linux/alpha/lxstat64.c
@@ -23,11 +23,9 @@
#include <kernel_stat.h>
#include <sysdep.h>
#include <xstatconv.h>
-#include <shlib-compat.h>
/* Get information about the file NAME in BUF. */
int
-attribute_compat_text_section
__lxstat64 (int vers, const char *name, struct stat64 *buf)
{
switch (vers)
@@ -45,12 +43,4 @@ __lxstat64 (int vers, const char *name, struct stat64 *buf)
}
}
}
-
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
-strong_alias (__lxstat64, __lxstat_compat)
-compat_symbol (libc, __lxstat_compat, __lxstat, GLIBC_2_0);
-#endif
-
-#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33)
-compat_symbol (libc, __lxstat64, __lxstat64, GLIBC_2_1);
-#endif
+weak_alias (__lxstat64, __lxstat);
diff --git a/sysdeps/unix/sysv/linux/alpha/xstat64.c b/sysdeps/unix/sysv/linux/alpha/xstat64.c
index 59f7ddae7f..c856c95dc5 100644
--- a/sysdeps/unix/sysv/linux/alpha/xstat64.c
+++ b/sysdeps/unix/sysv/linux/alpha/xstat64.c
@@ -23,11 +23,9 @@
#include <kernel_stat.h>
#include <sysdep.h>
#include <xstatconv.h>
-#include <shlib-compat.h>
/* Get information about the file NAME in BUF. */
int
-attribute_compat_text_section
__xstat64 (int vers, const char *name, struct stat64 *buf)
{
switch (vers)
@@ -45,12 +43,4 @@ __xstat64 (int vers, const char *name, struct stat64 *buf)
}
}
}
-
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
-strong_alias (__xstat64, __xstat_compat)
-compat_symbol (libc, __xstat_compat, __xstat, GLIBC_2_0);
-#endif
-
-#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33)
-compat_symbol (libc, __xstat64, __xstat64, GLIBC_2_1);
-#endif
+weak_alias (__xstat64, __xstat);
diff --git a/sysdeps/unix/sysv/linux/fxstat.c b/sysdeps/unix/sysv/linux/fxstat.c
index 649bb95252..f78497ea92 100644
--- a/sysdeps/unix/sysv/linux/fxstat.c
+++ b/sysdeps/unix/sysv/linux/fxstat.c
@@ -24,13 +24,9 @@
#if !XSTAT_IS_XSTAT64
# include <xstatconv.h>
# include <xstatover.h>
-# include <shlib-compat.h>
-
-# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
/* Get information about the file FD in BUF. */
int
-attribute_compat_text_section
__fxstat (int vers, int fd, struct stat *buf)
{
switch (vers)
@@ -61,8 +57,4 @@ __fxstat (int vers, int fd, struct stat *buf)
}
}
}
-
-compat_symbol (libc, __fxstat, __fxstat, GLIBC_2_0);
-# endif /* SHLIB_COMPAT */
-
#endif /* XSTAT_IS_XSTAT64 */
diff --git a/sysdeps/unix/sysv/linux/fxstat64.c b/sysdeps/unix/sysv/linux/fxstat64.c
index 4bd926bf01..dd7b752873 100644
--- a/sysdeps/unix/sysv/linux/fxstat64.c
+++ b/sysdeps/unix/sysv/linux/fxstat64.c
@@ -24,14 +24,10 @@
#include <sysdep.h>
#include <xstatconv.h>
#include <statx_cp.h>
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
/* Get information about the file FD in BUF. */
int
-attribute_compat_text_section
___fxstat64 (int vers, int fd, struct stat64 *buf)
{
#if XSTAT_IS_XSTAT64
@@ -67,18 +63,16 @@ ___fxstat64 (int vers, int fd, struct stat64 *buf)
#endif /* XSTAT_IS_XSTAT64 */
}
+#include <shlib-compat.h>
+
#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
-compat_symbol (libc, ___fxstat64, __fxstat64, GLIBC_2_2);
+versioned_symbol (libc, ___fxstat64, __fxstat64, GLIBC_2_2);
strong_alias (___fxstat64, __old__fxstat64)
compat_symbol (libc, __old__fxstat64, __fxstat64, GLIBC_2_1);
#else
strong_alias (___fxstat64, __fxstat64)
-compat_symbol (libc, ___fxstat64, __fxstat64, GLIBC_2_2);
#endif
#if XSTAT_IS_XSTAT64
-strong_alias (___fxstat64, __fxstat_compat)
-compat_symbol (libc, __fxstat_compat, __fxstat, GLIBC_2_2);
+strong_alias (__fxstat64, __fxstat);
#endif
-
-#endif /* SHLIB_COMPAT */
diff --git a/sysdeps/unix/sysv/linux/fxstatat.c b/sysdeps/unix/sysv/linux/fxstatat.c
index 2083e18eac..1a60fc10e3 100644
--- a/sysdeps/unix/sysv/linux/fxstatat.c
+++ b/sysdeps/unix/sysv/linux/fxstatat.c
@@ -24,13 +24,9 @@
#if !XSTAT_IS_XSTAT64
# include <xstatconv.h>
# include <xstatover.h>
-# include <shlib-compat.h>
-
-# if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
/* Get information about the file FD in BUF. */
int
-attribute_compat_text_section
__fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
{
#if STAT_IS_KERNEL_STAT
@@ -50,8 +46,4 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
return r ?: __xstat32_conv (vers, &st64, st);
#endif
}
-
-compat_symbol (libc, __fxstatat, __fxstatat, GLIBC_2_4);
-# endif /* SHLIB_COMPAT */
-
#endif /* XSTAT_IS_XSTAT64 */
diff --git a/sysdeps/unix/sysv/linux/fxstatat64.c b/sysdeps/unix/sysv/linux/fxstatat64.c
index 8a505451d9..7fe034809c 100644
--- a/sysdeps/unix/sysv/linux/fxstatat64.c
+++ b/sysdeps/unix/sysv/linux/fxstatat64.c
@@ -24,14 +24,10 @@
#include <sysdep.h>
#include <xstatconv.h>
#include <statx_cp.h>
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
/* Get information about the file FD in BUF. */
int
-attribute_compat_text_section
__fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
{
#if XSTAT_IS_XSTAT64
@@ -65,12 +61,6 @@ __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
#endif
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
}
-
-compat_symbol (libc, __fxstatat64, __fxstatat64, GLIBC_2_4);
-
#if XSTAT_IS_XSTAT64
-strong_alias (__fxstatat64, __fxstatat_compat)
-compat_symbol (libc, __fxstatat_compat, __fxstatat, GLIBC_2_4);
+strong_alias (__fxstatat64, __fxstatat);
#endif
-
-#endif /* SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) */
diff --git a/sysdeps/unix/sysv/linux/lxstat.c b/sysdeps/unix/sysv/linux/lxstat.c
index 913618eab9..9e7e02d298 100644
--- a/sysdeps/unix/sysv/linux/lxstat.c
+++ b/sysdeps/unix/sysv/linux/lxstat.c
@@ -20,17 +20,13 @@
#include <fcntl.h>
#include <kernel_stat.h>
#include <sysdep.h>
-#include <shlib-compat.h>
#if !XSTAT_IS_XSTAT64
# include <xstatconv.h>
# include <xstatover.h>
-# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
-
/* Get information about the file NAME in BUF. */
int
-attribute_compat_text_section
__lxstat (int vers, const char *name, struct stat *buf)
{
switch (vers)
@@ -62,8 +58,4 @@ __lxstat (int vers, const char *name, struct stat *buf)
}
}
}
-
-compat_symbol (libc, __lxstat, __lxstat, GLIBC_2_0);
-# endif /* SHLIB_COMPAT */
-
#endif /* XSTAT_IS_XSTAT64 */
diff --git a/sysdeps/unix/sysv/linux/lxstat64.c b/sysdeps/unix/sysv/linux/lxstat64.c
index 277b54b305..2b06133bf3 100644
--- a/sysdeps/unix/sysv/linux/lxstat64.c
+++ b/sysdeps/unix/sysv/linux/lxstat64.c
@@ -24,14 +24,10 @@
#include <sysdep.h>
#include <xstatconv.h>
#include <statx_cp.h>
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33)
/* Get information about the file NAME in BUF. */
int
-attribute_compat_text_section
___lxstat64 (int vers, const char *name, struct stat64 *buf)
{
#if XSTAT_IS_XSTAT64
@@ -84,18 +80,17 @@ ___lxstat64 (int vers, const char *name, struct stat64 *buf)
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
}
+#if XSTAT_IS_XSTAT64
+weak_alias (___lxstat64, __lxstat);
+weak_alias (___lxstat64, __GI___lxstat);
+#endif
+
+#include <shlib-compat.h>
+
#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
-compat_symbol (libc, ___lxstat64, __lxstat64, GLIBC_2_2);
+versioned_symbol (libc, ___lxstat64, __lxstat64, GLIBC_2_2);
strong_alias (___lxstat64, __old__lxstat64)
compat_symbol (libc, __old__lxstat64, __lxstat64, GLIBC_2_1);
#else
strong_alias (___lxstat64, __lxstat64);
-compat_symbol (libc, ___lxstat64, __lxstat64, GLIBC_2_2);
#endif
-
-#if XSTAT_IS_XSTAT64
-strong_alias (___lxstat64,__lxstat_compat)
-compat_symbol (libc, __lxstat_compat, __lxstat, GLIBC_2_2);
-#endif
-
-#endif /* SHLIB_COMPAT */
diff --git a/sysdeps/unix/sysv/linux/mips/fxstat.c b/sysdeps/unix/sysv/linux/mips/fxstat.c
index cb9f656628..4585c2362b 100644
--- a/sysdeps/unix/sysv/linux/mips/fxstat.c
+++ b/sysdeps/unix/sysv/linux/mips/fxstat.c
@@ -21,13 +21,9 @@
#include <kernel_stat.h>
#include <sysdep.h>
#include <xstatconv.h>
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
/* Get information about the file NAME in BUF. */
int
-attribute_compat_text_section
__fxstat (int vers, int fd, struct stat *buf)
{
switch (vers)
@@ -43,7 +39,3 @@ __fxstat (int vers, int fd, struct stat *buf)
}
}
}
-
-compat_symbol (libc, __fxstat, __fxstat, GLIBC_2_0);
-
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/lxstat.c b/sysdeps/unix/sysv/linux/mips/lxstat.c
index ebd05cca50..62a3b15b32 100644
--- a/sysdeps/unix/sysv/linux/mips/lxstat.c
+++ b/sysdeps/unix/sysv/linux/mips/lxstat.c
@@ -21,13 +21,9 @@
#include <kernel_stat.h>
#include <sysdep.h>
#include <xstatconv.h>
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
/* Get information about the file NAME in BUF. */
int
-attribute_compat_text_section
__lxstat (int vers, const char *name, struct stat *buf)
{
switch (vers)
@@ -43,7 +39,3 @@ __lxstat (int vers, const char *name, struct stat *buf)
}
}
}
-
-compat_symbol (libc, __lxstat, __lxstat, GLIBC_2_0);
-
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c b/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c
index 855c650814..e6c1cacd4b 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c
+++ b/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c
@@ -20,14 +20,10 @@
#include <kernel_stat.h>
#include <sysdep.h>
#include <xstatconv.h>
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_33)
/* Get information about the file FD in BUF. */
int
-attribute_compat_text_section
__fxstat64 (int vers, int fd, struct stat64 *buf)
{
struct kernel_stat kbuf;
@@ -35,7 +31,3 @@ __fxstat64 (int vers, int fd, struct stat64 *buf)
return r ?: __xstat64_conv (vers, &kbuf, buf);
}
-
-compat_symbol (libc, __fxstat64, __fxstat64, GLIBC_2_2);
-
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/fxstatat.c b/sysdeps/unix/sysv/linux/mips/mips64/fxstatat.c
index 1c1fbb02c2..e384dbab8b 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/fxstatat.c
+++ b/sysdeps/unix/sysv/linux/mips/mips64/fxstatat.c
@@ -21,20 +21,12 @@
#include <kernel_stat.h>
#include <sysdep.h>
#include <xstatconv.h>
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
/* Get information about the file FD in BUF. */
int
-attribute_compat_text_section
__fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
{
struct kernel_stat kst;
int r = INLINE_SYSCALL_CALL (newfstatat, fd, file, &kst, flag);
return r ?: __xstat_conv (vers, &kst, st);
}
-
-compat_symbol (libc, __fxstatat, __fxstatat, GLIBC_2_4);
-
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c b/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c
index f40a2c5aa8..cfd172d301 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c
+++ b/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c
@@ -19,14 +19,10 @@
#include <kernel_stat.h>
#include <sysdep.h>
#include <xstatconv.h>
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
/* Get information about the file NAME in BUF. */
int
-attribute_compat_text_section
__fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
{
if (vers == _STAT_VER_LINUX)
@@ -37,7 +33,3 @@ __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
}
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
}
-
-compat_symbol (libc, __fxstatat64, __fxstatat64, GLIBC_2_4);
-
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c b/sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c
index 752c5284a7..0f3934f8c8 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c
+++ b/sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c
@@ -20,20 +20,12 @@
#include <kernel_stat.h>
#include <sysdep.h>
#include <xstatconv.h>
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_33)
/* Get information about the file NAME in BUF. */
int
-attribute_compat_text_section
__lxstat64 (int vers, const char *name, struct stat64 *buf)
{
struct kernel_stat kbuf;
int r = INLINE_SYSCALL_CALL (lstat, name, &kbuf);
return r ?: __xstat64_conv (vers, &kbuf, buf);
}
-
-compat_symbol (libc, __lxstat64, __lxstat64, GLIBC_2_2);
-
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/xstat64.c b/sysdeps/unix/sysv/linux/mips/mips64/xstat64.c
index a620ba2f1f..64d2952276 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/xstat64.c
+++ b/sysdeps/unix/sysv/linux/mips/mips64/xstat64.c
@@ -20,20 +20,13 @@
#include <kernel_stat.h>
#include <sysdep.h>
#include <xstatconv.h>
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_33)
/* Get information about the file NAME in BUF. */
+
int
-attribute_compat_text_section
__xstat64 (int vers, const char *name, struct stat64 *buf)
{
struct kernel_stat kbuf;
int r = INLINE_SYSCALL_CALL (stat, name, &kbuf);
return r ?: __xstat64_conv (vers, &kbuf, buf);
}
-
-compat_symbol (libc, __xstat64, __xstat64, GLIBC_2_2);
-
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/xstat.c b/sysdeps/unix/sysv/linux/mips/xstat.c
index 0748a3422d..d6ff5ccbe0 100644
--- a/sysdeps/unix/sysv/linux/mips/xstat.c
+++ b/sysdeps/unix/sysv/linux/mips/xstat.c
@@ -21,13 +21,9 @@
#include <kernel_stat.h>
#include <sysdep.h>
#include <xstatconv.h>
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
/* Get information about the file NAME in BUF. */
int
-attribute_compat_text_section
__xstat (int vers, const char *name, struct stat *buf)
{
switch (vers)
@@ -43,7 +39,3 @@ __xstat (int vers, const char *name, struct stat *buf)
}
}
}
-
-compat_symbol (libc, __xstat, __xstat, GLIBC_2_0);
-
-#endif
diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
index 66459efdba..365a6b17cf 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
@@ -201,6 +201,10 @@ GLIBC_2.33 __fsetlocking F
GLIBC_2.33 __fwprintf_chk F
GLIBC_2.33 __fwritable F
GLIBC_2.33 __fwriting F
+GLIBC_2.33 __fxstat F
+GLIBC_2.33 __fxstat64 F
+GLIBC_2.33 __fxstatat F
+GLIBC_2.33 __fxstatat64 F
GLIBC_2.33 __getauxval F
GLIBC_2.33 __getcwd_chk F
GLIBC_2.33 __getdelim F
@@ -283,6 +287,8 @@ GLIBC_2.33 __libc_start_main F
GLIBC_2.33 __libc_valloc F
GLIBC_2.33 __longjmp_chk F
GLIBC_2.33 __lseek F
+GLIBC_2.33 __lxstat F
+GLIBC_2.33 __lxstat64 F
GLIBC_2.33 __malloc_hook D 0x4
GLIBC_2.33 __mbrlen F
GLIBC_2.33 __mbrtowc F
@@ -481,6 +487,8 @@ GLIBC_2.33 __wunderflow F
GLIBC_2.33 __xpg_basename F
GLIBC_2.33 __xpg_sigpause F
GLIBC_2.33 __xpg_strerror_r F
+GLIBC_2.33 __xstat F
+GLIBC_2.33 __xstat64 F
GLIBC_2.33 _dl_mcount_wrapper F
GLIBC_2.33 _dl_mcount_wrapper_check F
GLIBC_2.33 _environ D 0x4
diff --git a/sysdeps/unix/sysv/linux/xstat.c b/sysdeps/unix/sysv/linux/xstat.c
index 3eb2d8c51b..a971e8cf6a 100644
--- a/sysdeps/unix/sysv/linux/xstat.c
+++ b/sysdeps/unix/sysv/linux/xstat.c
@@ -20,17 +20,13 @@
#include <fcntl.h>
#include <kernel_stat.h>
#include <sysdep.h>
-#include <shlib-compat.h>
#if !XSTAT_IS_XSTAT64
# include <xstatconv.h>
# include <xstatover.h>
-# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
-
/* Get information about the file NAME in BUF. */
int
-attribute_compat_text_section
__xstat (int vers, const char *name, struct stat *buf)
{
switch (vers)
@@ -61,8 +57,4 @@ __xstat (int vers, const char *name, struct stat *buf)
}
}
}
-
-compat_symbol (libc, __xstat, __xstat, GLIBC_2_0);
-# endif /* SHLIB_COMPAT */
-
#endif /* XSTAT_IS_XSTAT64 */
diff --git a/sysdeps/unix/sysv/linux/xstat64.c b/sysdeps/unix/sysv/linux/xstat64.c
index dd4f808c7a..9d368d5841 100644
--- a/sysdeps/unix/sysv/linux/xstat64.c
+++ b/sysdeps/unix/sysv/linux/xstat64.c
@@ -24,14 +24,10 @@
#include <sysdep.h>
#include <xstatconv.h>
#include <statx_cp.h>
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
/* Get information about the file NAME in BUF. */
int
-attribute_compat_text_section
___xstat64 (int vers, const char *name, struct stat64 *buf)
{
#if XSTAT_IS_XSTAT64
@@ -82,17 +78,16 @@ ___xstat64 (int vers, const char *name, struct stat64 *buf)
}
#if XSTAT_IS_XSTAT64
-strong_alias (___xstat64, __xstat_compat)
-compat_symbol (libc, __xstat_compat, __xstat, GLIBC_2_2);
+weak_alias (___xstat64, __xstat);
+weak_alias (___xstat64, __GI___xstat);
#endif
+#include <shlib-compat.h>
+
#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
-compat_symbol (libc, ___xstat64, __xstat64, GLIBC_2_2);
+versioned_symbol (libc, ___xstat64, __xstat64, GLIBC_2_2);
strong_alias (___xstat64, __old__xstat64)
compat_symbol (libc, __old__xstat64, __xstat64, GLIBC_2_1);
#else
strong_alias (___xstat64, __xstat64)
-compat_symbol (libc, ___xstat64, __xstat64, GLIBC_2_2);
#endif
-
-#endif /* SHLIB_COMPAT */
--
2.26.2

View File

@ -0,0 +1,278 @@
From 9036019b09f0e6fd9d66721f4d6bbc856bb27da2 Mon Sep 17 00:00:00 2001
From: Siddhesh Poyarekar <siddhesh@sourceware.org>
Date: Wed, 21 Oct 2020 14:51:39 +0530
Subject: [PATCH] Revert "linux: Move xmknod{at} to compat symbols"
This reverts commit 81b83ff61f95f30ad53d6075247af0ea61a0b16e.
---
include/sys/stat.h | 4 +--
sysdeps/mach/hurd/xmknod.c | 17 +++------
sysdeps/mach/hurd/xmknodat.c | 12 +------
sysdeps/unix/sysv/linux/mknod.c | 28 ---------------
sysdeps/unix/sysv/linux/mknodat.c | 35 -------------------
.../unix/sysv/linux/riscv/rv32/libc.abilist | 2 ++
sysdeps/unix/sysv/linux/xmknod.c | 20 +++++++----
sysdeps/unix/sysv/linux/xmknodat.c | 23 ++++++++----
8 files changed, 40 insertions(+), 101 deletions(-)
delete mode 100644 sysdeps/unix/sysv/linux/mknod.c
delete mode 100644 sysdeps/unix/sysv/linux/mknodat.c
diff --git a/include/sys/stat.h b/include/sys/stat.h
index 108cb0c9bf..9a4a8f62cc 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -79,8 +79,10 @@ libc_hidden_proto (__mknod);
extern int __xmknod (int __ver, const char *__path, __mode_t __mode,
__dev_t *__dev);
+libc_hidden_proto (__xmknod)
extern int __xmknodat (int __ver, int __fd, const char *__path,
__mode_t __mode, __dev_t *__dev);
+libc_hidden_proto (__xmknodat)
int __fxstat (int __ver, int __fildes, struct stat *__stat_buf);
int __xstat (int __ver, const char *__filename,
@@ -106,8 +108,6 @@ hidden_proto (__xstat64);
hidden_proto (__lxstat64);
hidden_proto (__fxstatat64);
# endif
-libc_hidden_proto (__xmknod)
-libc_hidden_proto (__xmknodat)
# define stat(fname, buf) __xstat (_STAT_VER, fname, buf)
# define lstat(fname, buf) __lxstat (_STAT_VER, fname, buf)
# define __lstat(fname, buf) __lxstat (_STAT_VER, fname, buf)
diff --git a/sysdeps/mach/hurd/xmknod.c b/sysdeps/mach/hurd/xmknod.c
index a1b5af086d..0ab4f1b719 100644
--- a/sysdeps/mach/hurd/xmknod.c
+++ b/sysdeps/mach/hurd/xmknod.c
@@ -15,9 +15,12 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#include <sys/stat.h>
+#include <errno.h>
#include <fcntl.h>
-#include <shlib-compat.h>
+#include <stddef.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
/* Create a device file named FILE_NAME, with permission and special bits MODE
and device number DEV (which can be constructed from major and minor
@@ -28,13 +31,3 @@ __xmknod (int vers, const char *file_name, mode_t mode, dev_t *dev)
return __xmknodat (vers, AT_FDCWD, file_name, mode, dev);
}
libc_hidden_def (__xmknod)
-
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
-int
-__xmknod_compat (int vers, const char *file_name, mode_t mode, dev_t *dev)
-{
- return __xmknod (vers, file_name, mode, dev);
-}
-
-compat_symbol (libc, __xmknod_compat, __xmknod, GLIBC_2_0);
-#endif
diff --git a/sysdeps/mach/hurd/xmknodat.c b/sysdeps/mach/hurd/xmknodat.c
index 90724694d5..4239d1ea91 100644
--- a/sysdeps/mach/hurd/xmknodat.c
+++ b/sysdeps/mach/hurd/xmknodat.c
@@ -26,7 +26,6 @@
#include <string.h>
#include <sys/types.h>
#include <sys/sysmacros.h>
-#include <shlib-compat.h>
/* Create a device file named PATH relative to FD, with permission and
special bits MODE and device number DEV (which can be constructed
@@ -117,14 +116,5 @@ __xmknodat (int vers, int fd, const char *path, mode_t mode, dev_t *dev)
return __hurd_fail (err);
return 0;
}
-libc_hidden_def (__xmknodat)
-
-#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
-int
-__xmknodat_compat (int vers, int fd, const char *path, mode_t mode, dev_t *dev)
-{
- return __xmknodat (vers, fd, path, mode, dev);
-}
-compat_symbol (libc, __xmknodat_compat, __xmknodat, GLIBC_2_4);
-#endif
+libc_hidden_def (__xmknodat)
diff --git a/sysdeps/unix/sysv/linux/mknod.c b/sysdeps/unix/sysv/linux/mknod.c
deleted file mode 100644
index 7e290ddc8b..0000000000
--- a/sysdeps/unix/sysv/linux/mknod.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Create a special or ordinary file. Linux version.
- Copyright (C) 2020 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <sys/stat.h>
-#include <fcntl.h>
-
-int
-__mknod (const char *path, mode_t mode, dev_t dev)
-{
- return __mknodat (AT_FDCWD, path, mode, dev);
-}
-libc_hidden_def (__mknod)
-weak_alias (__mknod, mknod)
diff --git a/sysdeps/unix/sysv/linux/mknodat.c b/sysdeps/unix/sysv/linux/mknodat.c
deleted file mode 100644
index fdb8f1951a..0000000000
--- a/sysdeps/unix/sysv/linux/mknodat.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Create a special or ordinary file. Linux version.
- Copyright (C) 2020 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-
-int
-__mknodat (int fd, const char *path, mode_t mode, dev_t dev)
-{
- /* The user-exported dev_t is 64-bit while the kernel interface is
- 32-bit. */
- unsigned int k_dev = dev;
- if (k_dev != dev)
- return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
-
- return INLINE_SYSCALL_CALL (mknodat, fd, path, mode, k_dev);
-}
-libc_hidden_def (__mknodat)
-weak_alias (__mknodat, mknodat)
diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
index 365a6b17cf..d984c02492 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
@@ -484,6 +484,8 @@ GLIBC_2.33 __wprintf_chk F
GLIBC_2.33 __write F
GLIBC_2.33 __wuflow F
GLIBC_2.33 __wunderflow F
+GLIBC_2.33 __xmknod F
+GLIBC_2.33 __xmknodat F
GLIBC_2.33 __xpg_basename F
GLIBC_2.33 __xpg_sigpause F
GLIBC_2.33 __xpg_strerror_r F
diff --git a/sysdeps/unix/sysv/linux/xmknod.c b/sysdeps/unix/sysv/linux/xmknod.c
index 82bb0bd953..42809d4c57 100644
--- a/sysdeps/unix/sysv/linux/xmknod.c
+++ b/sysdeps/unix/sysv/linux/xmknod.c
@@ -17,23 +17,29 @@
<https://www.gnu.org/licenses/>. */
#include <sys/stat.h>
+#include <sys/sysmacros.h>
#include <fcntl.h>
-#include <errno.h>
-#include <shlib-compat.h>
+#include <sysdep.h>
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
/* Create a device file named PATH, with permission and special bits MODE
and device number DEV (which can be constructed from major and minor
device numbers with the `makedev' macro above). */
int
-attribute_compat_text_section
__xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
{
+ unsigned long long int k_dev;
+
if (vers != _MKNOD_VER)
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
- return __mknodat (AT_FDCWD, path, mode, *dev);
+ /* We must convert the value to dev_t type used by the kernel. */
+ k_dev = (*dev) & ((1ULL << 32) - 1);
+ if (k_dev != *dev)
+ return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+
+ return INLINE_SYSCALL_CALL (mknodat, AT_FDCWD, path, mode,
+ (unsigned int) k_dev);
}
-compat_symbol (libc, __xmknod, __xmknod, GLIBC_2_0);
-#endif
+weak_alias (__xmknod, _xmknod)
+libc_hidden_def (__xmknod)
diff --git a/sysdeps/unix/sysv/linux/xmknodat.c b/sysdeps/unix/sysv/linux/xmknodat.c
index fae3fe54d1..5640a499aa 100644
--- a/sysdeps/unix/sysv/linux/xmknodat.c
+++ b/sysdeps/unix/sysv/linux/xmknodat.c
@@ -15,11 +15,18 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#include <sys/stat.h>
#include <errno.h>
-#include <shlib-compat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/sysmacros.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
-#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
/* Create a device file named PATH relative to FD, with permission and
special bits MODE and device number DEV (which can be constructed
from major and minor device numbers with the `makedev' macro above). */
@@ -29,8 +36,12 @@ __xmknodat (int vers, int fd, const char *file, mode_t mode, dev_t *dev)
if (vers != _MKNOD_VER)
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
- return __mknodat (fd, file, mode, *dev);
+ /* We must convert the value to dev_t type used by the kernel. */
+ unsigned long long int k_dev = (*dev) & ((1ULL << 32) - 1);
+ if (k_dev != *dev)
+ return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+
+ return INLINE_SYSCALL (mknodat, 4, fd, file, mode, (unsigned int) k_dev);
}
-compat_symbol (libc, __xmknodat, __xmknodat, GLIBC_2_4);
-#endif
+libc_hidden_def (__xmknodat)
--
2.26.2

View File

@ -1,4 +1,4 @@
%define glibcsrcdir glibc-2.32.9000-165-g72d36ffd7d
%define glibcsrcdir glibc-2.32.9000-224-g0f09154c64
%define glibcversion 2.32.9000
# Pre-release tarballs are pulled in from git using a command that is
# effectively:
@ -100,7 +100,7 @@
Summary: The GNU libc libraries
Name: glibc
Version: %{glibcversion}
Release: 10%{?dist}
Release: 12%{?dist}
# In general, GPLv2+ is used by programs, LGPLv2+ is used for
# libraries.
@ -162,6 +162,9 @@ Patch29: glibc-fedora-nsswitch.patch
Patch30: glibc-deprecated-selinux-makedb.patch
Patch31: glibc-deprecated-selinux-nscd.patch
Patch32: glibc-rhbz1869030-faccessat2-eperm.patch
Patch33: glibc-revert-fxstat-compat.patch
Patch34: glibc-revert-mknod-compat.patch
Patch35: glibc-revert-ftime-compat.patch
##############################################################################
# Continued list of core "glibc" package information:
@ -1056,6 +1059,7 @@ rpm_inherit_flags \
"-march=x86-64" \
"-march=z13" \
"-march=z14" \
"-march=z15" \
"-march=zEC12" \
"-mbranch-protection=standard" \
"-mfpmath=sse" \
@ -1064,6 +1068,7 @@ rpm_inherit_flags \
"-mtune=generic" \
"-mtune=z13" \
"-mtune=z14" \
"-mtune=z15" \
"-mtune=zEC12" \
"-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" \
@ -2257,6 +2262,74 @@ fi
%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared
%changelog
* Wed Oct 21 2020 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.32.9000-12
- Revert __xstat64 symbol removal.
- Revert xmknod* symbol removal.
- Revert ftime symbol removal.
* Sun Oct 18 2020 Patsy Griffin <patsy@redhat.com> - 2.32.9000-11
- Auto-sync with upstream branch master,
commit 0f09154c64005e78b61484ae87b5ea2028051ea0.
- x86: Initialize CPU info via IFUNC relocation [BZ 26203]
- Add NEWS entry for ftime compatibility move
- support: Add create_temp_file_in_dir
- linux: Add __readdir_unlocked
- linux: Simplify opendir buffer allocation
- linux: Move posix dir implementations to Linux
- linux: Add 64-bit time_t support for wait3
- Move ftime to a compatibility symbol
- linux: Fix time64 support for futimesat
- linux: Use INTERNAL_SYSCALL on fstatat{64}
- shm tests: Append PID to names passed to shm_open [BZ #26737]
- sysvipc: Fix tst-sysvshm-linux on x32
- x86/CET: Update vfork to prevent child return
- resolv: Serialize processing in resolv/tst-resolv-txnid-collision
- statfs: add missing f_flags assignment
- y2038: Remove not used __fstatat_time64 define
- y2038: nptl: Convert pthread_mutex_{clock|timed}lock to support 64 bit
- sysvipc: Return EINVAL for invalid shmctl commands
- sysvipc: Fix IPC_INFO and SHM_INFO handling [BZ #26636]
- AArch64: Use __memcpy_simd on Neoverse N2/V1
- resolv: Handle transaction ID collisions in parallel queries (bug 26600)
- support: Provide a way to clear the RA bit in DNS server responses
- support: Provide a way to reorder responses within the DNS test server
- Add missing stat/mknod symbol on libc.abilist some ABIs
- manual: correct the spelling of "MALLOC_PERTURB_" [BZ #23015]
- manual: replace an obsolete collation example with a valid one
- rtld: fix typo in comment
- elf: Add missing <dl-procinfo.h> header to elf/dl-usage.c
- hurd: support clock_gettime(CLOCK_PROCESS/THREAD_CPUTIME_ID)
- linux: Move xmknod{at} to compat symbols
- linux: Add {f}stat{at} y2038 support
- linux: Move {f}xstat{at} to compat symbols
- linux: Disentangle fstatat from fxstatat
- linux: Implement {l}fstat{at} in terms of fstatat
- linux: Move the struct stat{64} to struct_stat.h
- Remove mknod wrapper functions, move them to symbols
- Remove stat wrapper functions, move them to exported symbols
- <sys/platform/x86.h>: Add FSRCS/FSRS/FZLRM support
- <sys/platform/x86.h>: Add Intel HRESET support
- <sys/platform/x86.h>: Add AVX-VNNI support
- <sys/platform/x86.h>: Add AVX512_FP16 support
- <sys/platform/x86.h>: Add Intel UINTR support
- elf: Do not pass GLRO(dl_platform), GLRO(dl_platformlen) to _dl_important_hwcaps
- elf: Enhance ld.so --help to print HWCAP subdirectories
- elf: Add library search path information to ld.so --help
- sunrpc: Adjust RPC function declarations to match Sun's (bug 26686]
- Avoid GCC 11 -Warray-parameter warnings [BZ #26686].
- elf: Make __rtld_env_path_list and __rtld_search_dirs global variables
- elf: Print the full name of the dynamic loader in the ld.so help message
- elf: Use the term "program interpreter" in the ld.so help message
- scripts/update-copyrights: Update csu/version.c, elf/dl-usage.c
- elf: Implement ld.so --version
- nptl: Add missing cancellation flags on lockf
- Update mips64 libm-test-ulps
- Update alpha libm-test-ulps
- elf: Implement ld.so --help
- elf: Record whether paths come from LD_LIBRARY_PATH or --library-path
- elf: Move ld.so error/help output to _dl_usage
- elf: Extract command-line/environment variables state from rtld.c
* Wed Oct 14 2020 Florian Weimer <fweimer@redhat.com> - 2.32.9000-10
- Disable -Werror on ELN (#1888246)

View File

@ -1 +1 @@
SHA512 (glibc-2.32.9000-165-g72d36ffd7d.tar.xz) = 1f7acebe842ba42f17561b177a3070cee88ea8d5e8beb42a0b5952711e714165a0c16105a0e5ec3cafde6bc8e01e2f7121b42bebe770353174458b6e89e08782
SHA512 (glibc-2.32.9000-224-g0f09154c64.tar.xz) = 954c676048319ea30a316ac35c6ecd97f20b09572ab5eb50d21ffc5f7ff22c7ba8ce5b9a9edd40eff56742d8e99cd0444d44e7b0dc5b0bc97555c1fe5cb1f309