| author | |
| committer | |
| log | 2314051acaad37dd5630dd7eca08571d620d6496 |
| tree | 06cb3422b4237bd38ff4ac2c3c5a8f9f8324fcf7 |
| parent | 87b3e2317294186ba6625592eb55760fd99fe211 |
I went ahead and left the README.md file deleted because it had broken
git hashes. Better to use `git log -- lib/libc/glibc/` to find out the
patches.264 files changed, 1248 insertions(+), 1997 deletions(-)
lib/libc/glibc/README.md deleted-9| ... | @@ -1,9 +0,0 @@ | ||
| 1 | glibc headers are slightly patched for backwards compatibility. This is not | ||
| 2 | good, because it requires to maintain our patchset whlist upgrading glibc. | ||
| 3 | |||
| 4 | Until universal headers are real and this file can be removed, these commits | ||
| 5 | need to be cherry-picked in the future glibc header upgrades: | ||
| 6 | |||
| 7 | - 39083c31a550ed80f369f60d35791e98904b8096 | ||
| 8 | - a89813ef282c092a9caf699731c7faaf485acabe | ||
| 9 | - 3eaca9bbc6fee4b6be0f22b844f7d3214222f434 | ||
lib/libc/glibc/bits/byteswap.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Macros and inline functions to swap the order of bytes in integer values. | 1 | /* Macros and inline functions to swap the order of bytes in integer values. |
| 2 | Copyright (C) 1997-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1997-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/bits/floatn-common.h+21-21| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Macros to control TS 18661-3 glibc features where the same | 1 | /* Macros to control TS 18661-3 glibc features where the same |
| 2 | definitions are appropriate for all platforms. | 2 | definitions are appropriate for all platforms. |
| 3 | Copyright (C) 2017-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 2017-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -78,7 +78,7 @@ | ... | @@ -78,7 +78,7 @@ |
| 78 | or _FloatNx types, if __HAVE_<type> is 1. The corresponding | 78 | or _FloatNx types, if __HAVE_<type> is 1. The corresponding |
| 79 | literal suffixes exist since GCC 7, for C only. */ | 79 | literal suffixes exist since GCC 7, for C only. */ |
| 80 | # if __HAVE_FLOAT16 | 80 | # if __HAVE_FLOAT16 |
| 81 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 81 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 82 | /* No corresponding suffix available for this type. */ | 82 | /* No corresponding suffix available for this type. */ |
| 83 | # define __f16(x) ((_Float16) x##f) | 83 | # define __f16(x) ((_Float16) x##f) |
| 84 | # else | 84 | # else |
| ... | @@ -87,7 +87,7 @@ | ... | @@ -87,7 +87,7 @@ |
| 87 | # endif | 87 | # endif |
| 88 | 88 | ||
| 89 | # if __HAVE_FLOAT32 | 89 | # if __HAVE_FLOAT32 |
| 90 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 90 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 91 | # define __f32(x) x##f | 91 | # define __f32(x) x##f |
| 92 | # else | 92 | # else |
| 93 | # define __f32(x) x##f32 | 93 | # define __f32(x) x##f32 |
| ... | @@ -95,7 +95,7 @@ | ... | @@ -95,7 +95,7 @@ |
| 95 | # endif | 95 | # endif |
| 96 | 96 | ||
| 97 | # if __HAVE_FLOAT64 | 97 | # if __HAVE_FLOAT64 |
| 98 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 98 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 99 | # ifdef __NO_LONG_DOUBLE_MATH | 99 | # ifdef __NO_LONG_DOUBLE_MATH |
| 100 | # define __f64(x) x##l | 100 | # define __f64(x) x##l |
| 101 | # else | 101 | # else |
| ... | @@ -107,7 +107,7 @@ | ... | @@ -107,7 +107,7 @@ |
| 107 | # endif | 107 | # endif |
| 108 | 108 | ||
| 109 | # if __HAVE_FLOAT32X | 109 | # if __HAVE_FLOAT32X |
| 110 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 110 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 111 | # define __f32x(x) x | 111 | # define __f32x(x) x |
| 112 | # else | 112 | # else |
| 113 | # define __f32x(x) x##f32x | 113 | # define __f32x(x) x##f32x |
| ... | @@ -115,7 +115,7 @@ | ... | @@ -115,7 +115,7 @@ |
| 115 | # endif | 115 | # endif |
| 116 | 116 | ||
| 117 | # if __HAVE_FLOAT64X | 117 | # if __HAVE_FLOAT64X |
| 118 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 118 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 119 | # if __HAVE_FLOAT64X_LONG_DOUBLE | 119 | # if __HAVE_FLOAT64X_LONG_DOUBLE |
| 120 | # define __f64x(x) x##l | 120 | # define __f64x(x) x##l |
| 121 | # else | 121 | # else |
| ... | @@ -127,7 +127,7 @@ | ... | @@ -127,7 +127,7 @@ |
| 127 | # endif | 127 | # endif |
| 128 | 128 | ||
| 129 | # if __HAVE_FLOAT128X | 129 | # if __HAVE_FLOAT128X |
| 130 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 130 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 131 | # error "_Float128X supported but no constant suffix" | 131 | # error "_Float128X supported but no constant suffix" |
| 132 | # else | 132 | # else |
| 133 | # define __f128x(x) x##f128x | 133 | # define __f128x(x) x##f128x |
| ... | @@ -136,7 +136,7 @@ | ... | @@ -136,7 +136,7 @@ |
| 136 | 136 | ||
| 137 | /* Defined to a complex type if __HAVE_<type> is 1. */ | 137 | /* Defined to a complex type if __HAVE_<type> is 1. */ |
| 138 | # if __HAVE_FLOAT16 | 138 | # if __HAVE_FLOAT16 |
| 139 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 139 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 140 | typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); | 140 | typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); |
| 141 | # define __CFLOAT16 __cfloat16 | 141 | # define __CFLOAT16 __cfloat16 |
| 142 | # else | 142 | # else |
| ... | @@ -145,7 +145,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); | ... | @@ -145,7 +145,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); |
| 145 | # endif | 145 | # endif |
| 146 | 146 | ||
| 147 | # if __HAVE_FLOAT32 | 147 | # if __HAVE_FLOAT32 |
| 148 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 148 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 149 | # define __CFLOAT32 _Complex float | 149 | # define __CFLOAT32 _Complex float |
| 150 | # else | 150 | # else |
| 151 | # define __CFLOAT32 _Complex _Float32 | 151 | # define __CFLOAT32 _Complex _Float32 |
| ... | @@ -153,7 +153,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); | ... | @@ -153,7 +153,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); |
| 153 | # endif | 153 | # endif |
| 154 | 154 | ||
| 155 | # if __HAVE_FLOAT64 | 155 | # if __HAVE_FLOAT64 |
| 156 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 156 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 157 | # ifdef __NO_LONG_DOUBLE_MATH | 157 | # ifdef __NO_LONG_DOUBLE_MATH |
| 158 | # define __CFLOAT64 _Complex long double | 158 | # define __CFLOAT64 _Complex long double |
| 159 | # else | 159 | # else |
| ... | @@ -165,7 +165,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); | ... | @@ -165,7 +165,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); |
| 165 | # endif | 165 | # endif |
| 166 | 166 | ||
| 167 | # if __HAVE_FLOAT32X | 167 | # if __HAVE_FLOAT32X |
| 168 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 168 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 169 | # define __CFLOAT32X _Complex double | 169 | # define __CFLOAT32X _Complex double |
| 170 | # else | 170 | # else |
| 171 | # define __CFLOAT32X _Complex _Float32x | 171 | # define __CFLOAT32X _Complex _Float32x |
| ... | @@ -173,7 +173,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); | ... | @@ -173,7 +173,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); |
| 173 | # endif | 173 | # endif |
| 174 | 174 | ||
| 175 | # if __HAVE_FLOAT64X | 175 | # if __HAVE_FLOAT64X |
| 176 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 176 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 177 | # if __HAVE_FLOAT64X_LONG_DOUBLE | 177 | # if __HAVE_FLOAT64X_LONG_DOUBLE |
| 178 | # define __CFLOAT64X _Complex long double | 178 | # define __CFLOAT64X _Complex long double |
| 179 | # else | 179 | # else |
| ... | @@ -185,7 +185,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); | ... | @@ -185,7 +185,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); |
| 185 | # endif | 185 | # endif |
| 186 | 186 | ||
| 187 | # if __HAVE_FLOAT128X | 187 | # if __HAVE_FLOAT128X |
| 188 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 188 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 189 | # error "_Float128X supported but no complex type" | 189 | # error "_Float128X supported but no complex type" |
| 190 | # else | 190 | # else |
| 191 | # define __CFLOAT128X _Complex _Float128x | 191 | # define __CFLOAT128X _Complex _Float128x |
| ... | @@ -195,7 +195,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); | ... | @@ -195,7 +195,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); |
| 195 | /* The remaining of this file provides support for older compilers. */ | 195 | /* The remaining of this file provides support for older compilers. */ |
| 196 | # if __HAVE_FLOAT16 | 196 | # if __HAVE_FLOAT16 |
| 197 | 197 | ||
| 198 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 198 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 199 | typedef float _Float16 __attribute__ ((__mode__ (__HF__))); | 199 | typedef float _Float16 __attribute__ ((__mode__ (__HF__))); |
| 200 | # endif | 200 | # endif |
| 201 | 201 | ||
| ... | @@ -210,7 +210,7 @@ typedef float _Float16 __attribute__ ((__mode__ (__HF__))); | ... | @@ -210,7 +210,7 @@ typedef float _Float16 __attribute__ ((__mode__ (__HF__))); |
| 210 | 210 | ||
| 211 | # if __HAVE_FLOAT32 | 211 | # if __HAVE_FLOAT32 |
| 212 | 212 | ||
| 213 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 213 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 214 | typedef float _Float32; | 214 | typedef float _Float32; |
| 215 | # endif | 215 | # endif |
| 216 | 216 | ||
| ... | @@ -234,7 +234,7 @@ typedef float _Float32; | ... | @@ -234,7 +234,7 @@ typedef float _Float32; |
| 234 | 234 | ||
| 235 | # ifdef __NO_LONG_DOUBLE_MATH | 235 | # ifdef __NO_LONG_DOUBLE_MATH |
| 236 | 236 | ||
| 237 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 237 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 238 | typedef long double _Float64; | 238 | typedef long double _Float64; |
| 239 | # endif | 239 | # endif |
| 240 | 240 | ||
| ... | @@ -247,7 +247,7 @@ typedef long double _Float64; | ... | @@ -247,7 +247,7 @@ typedef long double _Float64; |
| 247 | 247 | ||
| 248 | # else | 248 | # else |
| 249 | 249 | ||
| 250 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 250 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 251 | typedef double _Float64; | 251 | typedef double _Float64; |
| 252 | # endif | 252 | # endif |
| 253 | 253 | ||
| ... | @@ -264,7 +264,7 @@ typedef double _Float64; | ... | @@ -264,7 +264,7 @@ typedef double _Float64; |
| 264 | 264 | ||
| 265 | # if __HAVE_FLOAT32X | 265 | # if __HAVE_FLOAT32X |
| 266 | 266 | ||
| 267 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 267 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 268 | typedef double _Float32x; | 268 | typedef double _Float32x; |
| 269 | # endif | 269 | # endif |
| 270 | 270 | ||
| ... | @@ -281,7 +281,7 @@ typedef double _Float32x; | ... | @@ -281,7 +281,7 @@ typedef double _Float32x; |
| 281 | 281 | ||
| 282 | # if __HAVE_FLOAT64X_LONG_DOUBLE | 282 | # if __HAVE_FLOAT64X_LONG_DOUBLE |
| 283 | 283 | ||
| 284 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 284 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 285 | typedef long double _Float64x; | 285 | typedef long double _Float64x; |
| 286 | # endif | 286 | # endif |
| 287 | 287 | ||
| ... | @@ -294,7 +294,7 @@ typedef long double _Float64x; | ... | @@ -294,7 +294,7 @@ typedef long double _Float64x; |
| 294 | 294 | ||
| 295 | # else | 295 | # else |
| 296 | 296 | ||
| 297 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 297 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 298 | typedef _Float128 _Float64x; | 298 | typedef _Float128 _Float64x; |
| 299 | # endif | 299 | # endif |
| 300 | 300 | ||
| ... | @@ -311,7 +311,7 @@ typedef _Float128 _Float64x; | ... | @@ -311,7 +311,7 @@ typedef _Float128 _Float64x; |
| 311 | 311 | ||
| 312 | # if __HAVE_FLOAT128X | 312 | # if __HAVE_FLOAT128X |
| 313 | 313 | ||
| 314 | # if !__GNUC_PREREQ (7, 0) || defined __cplusplus | 314 | # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) |
| 315 | # error "_Float128x supported but no type" | 315 | # error "_Float128x supported but no type" |
| 316 | # endif | 316 | # endif |
| 317 | 317 |
lib/libc/glibc/bits/libc-header-start.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Handle feature test macros at the start of a header. | 1 | /* Handle feature test macros at the start of a header. |
| 2 | Copyright (C) 2016-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2016-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/bits/long-double.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Properties of long double type. | 1 | /* Properties of long double type. |
| 2 | Copyright (C) 2016-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2016-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/bits/select.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1997-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1997-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/bits/signum-generic.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Signal number constants. Generic template. | 1 | /* Signal number constants. Generic template. |
| 2 | Copyright (C) 1991-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1991-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/bits/stat.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1992-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/bits/stdint-intn.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Define intN_t types. | 1 | /* Define intN_t types. |
| 2 | Copyright (C) 2017-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/bits/stdlib-bsearch.h+12-3| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Perform binary search - inline version. | 1 | /* Perform binary search - inline version. |
| 2 | Copyright (C) 1991-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1991-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -29,14 +29,23 @@ bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, | ... | @@ -29,14 +29,23 @@ bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, |
| 29 | while (__l < __u) | 29 | while (__l < __u) |
| 30 | { | 30 | { |
| 31 | __idx = (__l + __u) / 2; | 31 | __idx = (__l + __u) / 2; |
| 32 | __p = (void *) (((const char *) __base) + (__idx * __size)); | 32 | __p = (const void *) (((const char *) __base) + (__idx * __size)); |
| 33 | __comparison = (*__compar) (__key, __p); | 33 | __comparison = (*__compar) (__key, __p); |
| 34 | if (__comparison < 0) | 34 | if (__comparison < 0) |
| 35 | 	__u = __idx; | 35 | 	__u = __idx; |
| 36 | else if (__comparison > 0) | 36 | else if (__comparison > 0) |
| 37 | 	__l = __idx + 1; | 37 | 	__l = __idx + 1; |
| 38 | else | 38 | else |
| 39 | 	return (void *) __p; | 39 | 	{ |
| 40 | #if __GNUC_PREREQ(4, 6) | ||
| 41 | # pragma GCC diagnostic push | ||
| 42 | # pragma GCC diagnostic ignored "-Wcast-qual" | ||
| 43 | #endif | ||
| 44 | 	 return (void *) __p; | ||
| 45 | #if __GNUC_PREREQ(4, 6) | ||
| 46 | # pragma GCC diagnostic pop | ||
| 47 | #endif | ||
| 48 | 	} | ||
| 40 | } | 49 | } |
| 41 | 50 | ||
| 42 | return NULL; | 51 | return NULL; |
lib/libc/glibc/bits/time64.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* bits/time64.h -- underlying types for __time64_t. Generic version. | 1 | /* bits/time64.h -- underlying types for __time64_t. Generic version. |
| 2 | Copyright (C) 2018-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2018-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/bits/timesize.h+2-4| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Bit size of the time_t type at glibc build time, general case. | 1 | /* Bit size of the time_t type at glibc build time, general case. |
| 2 | Copyright (C) 2018-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2018-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -16,7 +16,5 @@ | ... | @@ -16,7 +16,5 @@ |
| 16 | License along with the GNU C Library; if not, see | 16 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ | 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | #include <bits/wordsize.h> | ||
| 20 | |||
| 21 | /* Size in bits of the 'time_t' type of the default ABI. */ | 19 | /* Size in bits of the 'time_t' type of the default ABI. */ |
| 22 | #define __TIMESIZE	__WORDSIZE | 20 | #define __TIMESIZE	64 |
lib/libc/glibc/bits/types/struct_sched_param.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Sched parameter structure. Generic version. | 1 | /* Sched parameter structure. Generic version. |
| 2 | Copyright (C) 1996-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1996-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/bits/typesizes.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* bits/typesizes.h -- underlying types for *_t. Generic version. | 1 | /* bits/typesizes.h -- underlying types for *_t. Generic version. |
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/bits/uintn-identity.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Inline functions to return unsigned integer values unchanged. | 1 | /* Inline functions to return unsigned integer values unchanged. |
| 2 | Copyright (C) 2017-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/bits/waitflags.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Definitions of flag bits for `waitpid' et al. | 1 | /* Definitions of flag bits for `waitpid' et al. |
| 2 | Copyright (C) 1992-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/bits/waitstatus.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Definitions of status bits for `wait' et al. | 1 | /* Definitions of status bits for `wait' et al. |
| 2 | Copyright (C) 1992-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/csu/errno.c+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Definition of `errno' variable. Canonical version. | 1 | /* Definition of `errno' variable. Canonical version. |
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/debug/stack_chk_fail_local.c+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2005-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2005-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/elf/elf.h+248-19| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* This file defines standard ELF types, structures, and macros. | 1 | /* This file defines standard ELF types, structures, and macros. |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -210,7 +210,7 @@ typedef struct | ... | @@ -210,7 +210,7 @@ typedef struct |
| 210 | #define EM_68HC12	53	/* Motorola M68HC12 */ | 210 | #define EM_68HC12	53	/* Motorola M68HC12 */ |
| 211 | #define EM_MMA		54	/* Fujitsu MMA Multimedia Accelerator */ | 211 | #define EM_MMA		54	/* Fujitsu MMA Multimedia Accelerator */ |
| 212 | #define EM_PCP		55	/* Siemens PCP */ | 212 | #define EM_PCP		55	/* Siemens PCP */ |
| 213 | #define EM_NCPU		56	/* Sony nCPU embeeded RISC */ | 213 | #define EM_NCPU		56	/* Sony nCPU embedded RISC */ |
| 214 | #define EM_NDR1		57	/* Denso NDR1 microprocessor */ | 214 | #define EM_NDR1		57	/* Denso NDR1 microprocessor */ |
| 215 | #define EM_STARCORE	58	/* Motorola Start*Core processor */ | 215 | #define EM_STARCORE	58	/* Motorola Start*Core processor */ |
| 216 | #define EM_ME16		59	/* Toyota ME16 processor */ | 216 | #define EM_ME16		59	/* Toyota ME16 processor */ |
| ... | @@ -358,8 +358,9 @@ typedef struct | ... | @@ -358,8 +358,9 @@ typedef struct |
| 358 | 358 | ||
| 359 | #define EM_BPF		247	/* Linux BPF -- in-kernel virtual machine */ | 359 | #define EM_BPF		247	/* Linux BPF -- in-kernel virtual machine */ |
| 360 | #define EM_CSKY		252 /* C-SKY */ | 360 | #define EM_CSKY		252 /* C-SKY */ |
| 361 | #define EM_LOONGARCH	258	/* LoongArch */ | ||
| 361 | 362 | ||
| 362 | #define EM_NUM		253 | 363 | #define EM_NUM		259 |
| 363 | 364 | ||
| 364 | /* Old spellings/synonyms. */ | 365 | /* Old spellings/synonyms. */ |
| 365 | 366 | ||
| ... | @@ -443,7 +444,8 @@ typedef struct | ... | @@ -443,7 +444,8 @@ typedef struct |
| 443 | #define SHT_PREINIT_ARRAY 16		/* Array of pre-constructors */ | 444 | #define SHT_PREINIT_ARRAY 16		/* Array of pre-constructors */ |
| 444 | #define SHT_GROUP	 17		/* Section group */ | 445 | #define SHT_GROUP	 17		/* Section group */ |
| 445 | #define SHT_SYMTAB_SHNDX 18		/* Extended section indices */ | 446 | #define SHT_SYMTAB_SHNDX 18		/* Extended section indices */ |
| 446 | #define	SHT_NUM		 19		/* Number of defined types. */ | 447 | #define SHT_RELR	 19 /* RELR relative relocations */ |
| 448 | #define	SHT_NUM		 20		/* Number of defined types. */ | ||
| 447 | #define SHT_LOOS	 0x60000000	/* Start OS-specific. */ | 449 | #define SHT_LOOS	 0x60000000	/* Start OS-specific. */ |
| 448 | #define SHT_GNU_ATTRIBUTES 0x6ffffff5	/* Object attributes. */ | 450 | #define SHT_GNU_ATTRIBUTES 0x6ffffff5	/* Object attributes. */ |
| 449 | #define SHT_GNU_HASH	 0x6ffffff6	/* GNU-style hash table. */ | 451 | #define SHT_GNU_HASH	 0x6ffffff6	/* GNU-style hash table. */ |
| ... | @@ -504,6 +506,7 @@ typedef struct | ... | @@ -504,6 +506,7 @@ typedef struct |
| 504 | 506 | ||
| 505 | /* Legal values for ch_type (compression algorithm). */ | 507 | /* Legal values for ch_type (compression algorithm). */ |
| 506 | #define ELFCOMPRESS_ZLIB	1	 /* ZLIB/DEFLATE algorithm. */ | 508 | #define ELFCOMPRESS_ZLIB	1	 /* ZLIB/DEFLATE algorithm. */ |
| 509 | #define ELFCOMPRESS_ZSTD	2	 /* Zstandard algorithm. */ | ||
| 507 | #define ELFCOMPRESS_LOOS	0x60000000 /* Start of OS-specific. */ | 510 | #define ELFCOMPRESS_LOOS	0x60000000 /* Start of OS-specific. */ |
| 508 | #define ELFCOMPRESS_HIOS	0x6fffffff /* End of OS-specific. */ | 511 | #define ELFCOMPRESS_HIOS	0x6fffffff /* End of OS-specific. */ |
| 509 | #define ELFCOMPRESS_LOPROC	0x70000000 /* Start of processor-specific. */ | 512 | #define ELFCOMPRESS_LOPROC	0x70000000 /* Start of processor-specific. */ |
| ... | @@ -556,7 +559,7 @@ typedef struct | ... | @@ -556,7 +559,7 @@ typedef struct |
| 556 | 559 | ||
| 557 | /* Possible bitmasks for si_flags. */ | 560 | /* Possible bitmasks for si_flags. */ |
| 558 | #define SYMINFO_FLG_DIRECT	0x0001	/* Direct bound symbol */ | 561 | #define SYMINFO_FLG_DIRECT	0x0001	/* Direct bound symbol */ |
| 559 | #define SYMINFO_FLG_PASSTHRU	0x0002	/* Pass-thru symbol for translator */ | 562 | #define SYMINFO_FLG_PASSTHRU	0x0002	/* Pass-through symbol for translator */ |
| 560 | #define SYMINFO_FLG_COPY	0x0004	/* Symbol is a copy-reloc */ | 563 | #define SYMINFO_FLG_COPY	0x0004	/* Symbol is a copy-reloc */ |
| 561 | #define SYMINFO_FLG_LAZYLOAD	0x0008	/* Symbol bound to object to be lazy | 564 | #define SYMINFO_FLG_LAZYLOAD	0x0008	/* Symbol bound to object to be lazy |
| 562 | 					 loaded */ | 565 | 					 loaded */ |
| ... | @@ -662,6 +665,11 @@ typedef struct | ... | @@ -662,6 +665,11 @@ typedef struct |
| 662 | Elf64_Sxword	r_addend;		/* Addend */ | 665 | Elf64_Sxword	r_addend;		/* Addend */ |
| 663 | } Elf64_Rela; | 666 | } Elf64_Rela; |
| 664 | 667 | ||
| 668 | /* RELR relocation table entry */ | ||
| 669 | |||
| 670 | typedef Elf32_Word	Elf32_Relr; | ||
| 671 | typedef Elf64_Xword	Elf64_Relr; | ||
| 672 | |||
| 665 | /* How to extract and insert information held in the r_info field. */ | 673 | /* How to extract and insert information held in the r_info field. */ |
| 666 | 674 | ||
| 667 | #define ELF32_R_SYM(val)		((val) >> 8) | 675 | #define ELF32_R_SYM(val)		((val) >> 8) |
| ... | @@ -720,6 +728,7 @@ typedef struct | ... | @@ -720,6 +728,7 @@ typedef struct |
| 720 | #define PT_GNU_STACK	0x6474e551	/* Indicates stack executability */ | 728 | #define PT_GNU_STACK	0x6474e551	/* Indicates stack executability */ |
| 721 | #define PT_GNU_RELRO	0x6474e552	/* Read-only after relocation */ | 729 | #define PT_GNU_RELRO	0x6474e552	/* Read-only after relocation */ |
| 722 | #define PT_GNU_PROPERTY	0x6474e553	/* GNU property */ | 730 | #define PT_GNU_PROPERTY	0x6474e553	/* GNU property */ |
| 731 | #define PT_GNU_SFRAME	0x6474e554	/* SFrame segment. */ | ||
| 723 | #define PT_LOSUNW	0x6ffffffa | 732 | #define PT_LOSUNW	0x6ffffffa |
| 724 | #define PT_SUNWBSS	0x6ffffffa	/* Sun Specific segment */ | 733 | #define PT_SUNWBSS	0x6ffffffa	/* Sun Specific segment */ |
| 725 | #define PT_SUNWSTACK	0x6ffffffb	/* Stack segment */ | 734 | #define PT_SUNWSTACK	0x6ffffffb	/* Stack segment */ |
| ... | @@ -801,6 +810,7 @@ typedef struct | ... | @@ -801,6 +810,7 @@ typedef struct |
| 801 | #define NT_S390_GS_BC	0x30c		/* s390 guarded storage | 810 | #define NT_S390_GS_BC	0x30c		/* s390 guarded storage |
| 802 | 					 broadcast control block. */ | 811 | 					 broadcast control block. */ |
| 803 | #define NT_S390_RI_CB	0x30d		/* s390 runtime instrumentation. */ | 812 | #define NT_S390_RI_CB	0x30d		/* s390 runtime instrumentation. */ |
| 813 | #define NT_S390_PV_CPU_DATA	0x30e	/* s390 protvirt cpu dump data. */ | ||
| 804 | #define NT_ARM_VFP	0x400		/* ARM VFP/NEON registers */ | 814 | #define NT_ARM_VFP	0x400		/* ARM VFP/NEON registers */ |
| 805 | #define NT_ARM_TLS	0x401		/* ARM TLS register */ | 815 | #define NT_ARM_TLS	0x401		/* ARM TLS register */ |
| 806 | #define NT_ARM_HW_BREAK	0x402		/* ARM hardware breakpoint registers */ | 816 | #define NT_ARM_HW_BREAK	0x402		/* ARM hardware breakpoint registers */ |
| ... | @@ -822,6 +832,15 @@ typedef struct | ... | @@ -822,6 +832,15 @@ typedef struct |
| 822 | #define NT_MIPS_DSP	0x800		/* MIPS DSP ASE registers. */ | 832 | #define NT_MIPS_DSP	0x800		/* MIPS DSP ASE registers. */ |
| 823 | #define NT_MIPS_FP_MODE	0x801		/* MIPS floating-point mode. */ | 833 | #define NT_MIPS_FP_MODE	0x801		/* MIPS floating-point mode. */ |
| 824 | #define NT_MIPS_MSA	0x802		/* MIPS SIMD registers. */ | 834 | #define NT_MIPS_MSA	0x802		/* MIPS SIMD registers. */ |
| 835 | #define NT_LOONGARCH_CPUCFG	0xa00	/* LoongArch CPU config registers. */ | ||
| 836 | #define NT_LOONGARCH_CSR	0xa01	/* LoongArch control and | ||
| 837 | 					 status registers. */ | ||
| 838 | #define NT_LOONGARCH_LSX	0xa02	/* LoongArch Loongson SIMD | ||
| 839 | 					 Extension registers. */ | ||
| 840 | #define NT_LOONGARCH_LASX	0xa03	/* LoongArch Loongson Advanced | ||
| 841 | 					 SIMD Extension registers. */ | ||
| 842 | #define NT_LOONGARCH_LBT	0xa04	/* LoongArch Loongson Binary | ||
| 843 | 					 Translation registers. */ | ||
| 825 | 844 | ||
| 826 | /* Legal values for the note segment descriptor types for object files. */ | 845 | /* Legal values for the note segment descriptor types for object files. */ |
| 827 | 846 | ||
| ... | @@ -887,7 +906,10 @@ typedef struct | ... | @@ -887,7 +906,10 @@ typedef struct |
| 887 | #define DT_PREINIT_ARRAY 32		/* Array with addresses of preinit fct*/ | 906 | #define DT_PREINIT_ARRAY 32		/* Array with addresses of preinit fct*/ |
| 888 | #define DT_PREINIT_ARRAYSZ 33		/* size in bytes of DT_PREINIT_ARRAY */ | 907 | #define DT_PREINIT_ARRAYSZ 33		/* size in bytes of DT_PREINIT_ARRAY */ |
| 889 | #define DT_SYMTAB_SHNDX	34		/* Address of SYMTAB_SHNDX section */ | 908 | #define DT_SYMTAB_SHNDX	34		/* Address of SYMTAB_SHNDX section */ |
| 890 | #define	DT_NUM		35		/* Number used */ | 909 | #define DT_RELRSZ	35		/* Total size of RELR relative relocations */ |
| 910 | #define DT_RELR		36		/* Address of RELR relative relocations */ | ||
| 911 | #define DT_RELRENT	37		/* Size of one RELR relative relocaction */ | ||
| 912 | #define	DT_NUM		38		/* Number used */ | ||
| 891 | #define DT_LOOS		0x6000000d	/* Start of OS-specific */ | 913 | #define DT_LOOS		0x6000000d	/* Start of OS-specific */ |
| 892 | #define DT_HIOS		0x6ffff000	/* End of OS-specific */ | 914 | #define DT_HIOS		0x6ffff000	/* End of OS-specific */ |
| 893 | #define DT_LOPROC	0x70000000	/* Start of processor-specific */ | 915 | #define DT_LOPROC	0x70000000	/* Start of processor-specific */ |
| ... | @@ -1044,7 +1066,8 @@ typedef struct | ... | @@ -1044,7 +1066,8 @@ typedef struct |
| 1044 | 1066 | ||
| 1045 | /* Legal values for vd_flags (version information flags). */ | 1067 | /* Legal values for vd_flags (version information flags). */ |
| 1046 | #define VER_FLG_BASE	0x1		/* Version definition of file itself */ | 1068 | #define VER_FLG_BASE	0x1		/* Version definition of file itself */ |
| 1047 | #define VER_FLG_WEAK	0x2		/* Weak version identifier */ | 1069 | #define VER_FLG_WEAK	0x2		/* Weak version identifier. Also |
| 1070 | 					 used by vna_flags below. */ | ||
| 1048 | 1071 | ||
| 1049 | /* Versym symbol index values. */ | 1072 | /* Versym symbol index values. */ |
| 1050 | #define	VER_NDX_LOCAL		0	/* Symbol is local. */ | 1073 | #define	VER_NDX_LOCAL		0	/* Symbol is local. */ |
| ... | @@ -1122,10 +1145,6 @@ typedef struct | ... | @@ -1122,10 +1145,6 @@ typedef struct |
| 1122 | } Elf64_Vernaux; | 1145 | } Elf64_Vernaux; |
| 1123 | 1146 | ||
| 1124 | 1147 | ||
| 1125 | /* Legal values for vna_flags. */ | ||
| 1126 | #define VER_FLG_WEAK	0x2		/* Weak version identifier */ | ||
| 1127 | |||
| 1128 | |||
| 1129 | /* Auxiliary vector. */ | 1148 | /* Auxiliary vector. */ |
| 1130 | 1149 | ||
| 1131 | /* This vector is normally only used by the program interpreter. The | 1150 | /* This vector is normally only used by the program interpreter. The |
| ... | @@ -1205,6 +1224,9 @@ typedef struct | ... | @@ -1205,6 +1224,9 @@ typedef struct |
| 1205 | #define AT_HWCAP2	26		/* More machine-dependent hints about | 1224 | #define AT_HWCAP2	26		/* More machine-dependent hints about |
| 1206 | 					 processor capabilities. */ | 1225 | 					 processor capabilities. */ |
| 1207 | 1226 | ||
| 1227 | #define AT_RSEQ_FEATURE_SIZE	27	/* rseq supported feature size. */ | ||
| 1228 | #define AT_RSEQ_ALIGN	28		/* rseq allocation alignment. */ | ||
| 1229 | |||
| 1208 | #define AT_EXECFN	31		/* Filename of executable. */ | 1230 | #define AT_EXECFN	31		/* Filename of executable. */ |
| 1209 | 1231 | ||
| 1210 | /* Pointer to the global system page used for system calls and other | 1232 | /* Pointer to the global system page used for system calls and other |
| ... | @@ -1231,8 +1253,7 @@ typedef struct | ... | @@ -1231,8 +1253,7 @@ typedef struct |
| 1231 | #define AT_L3_CACHESIZE		46 | 1253 | #define AT_L3_CACHESIZE		46 |
| 1232 | #define AT_L3_CACHEGEOMETRY	47 | 1254 | #define AT_L3_CACHEGEOMETRY	47 |
| 1233 | 1255 | ||
| 1234 | #define AT_MINSIGSTKSZ		51 /* Stack needed for signal delivery | 1256 | #define AT_MINSIGSTKSZ		51 /* Stack needed for signal delivery */ |
| 1235 | 				 (AArch64). */ | ||
| 1236 | 1257 | ||
| 1237 | /* Note section contents. Each entry in the note section begins with | 1258 | /* Note section contents. Each entry in the note section begins with |
| 1238 | a header of a fixed form. */ | 1259 | a header of a fixed form. */ |
| ... | @@ -1259,6 +1280,8 @@ typedef struct | ... | @@ -1259,6 +1280,8 @@ typedef struct |
| 1259 | /* Note entries for GNU systems have this name. */ | 1280 | /* Note entries for GNU systems have this name. */ |
| 1260 | #define ELF_NOTE_GNU		"GNU" | 1281 | #define ELF_NOTE_GNU		"GNU" |
| 1261 | 1282 | ||
| 1283 | /* Note entries for freedesktop.org have this name. */ | ||
| 1284 | #define ELF_NOTE_FDO		"FDO" | ||
| 1262 | 1285 | ||
| 1263 | /* Defined types of notes for Solaris. */ | 1286 | /* Defined types of notes for Solaris. */ |
| 1264 | 1287 | ||
| ... | @@ -1302,6 +1325,10 @@ typedef struct | ... | @@ -1302,6 +1325,10 @@ typedef struct |
| 1302 | /* Program property. */ | 1325 | /* Program property. */ |
| 1303 | #define NT_GNU_PROPERTY_TYPE_0 5 | 1326 | #define NT_GNU_PROPERTY_TYPE_0 5 |
| 1304 | 1327 | ||
| 1328 | /* Packaging metadata as defined on | ||
| 1329 | https://systemd.io/COREDUMP_PACKAGE_METADATA/ */ | ||
| 1330 | #define NT_FDO_PACKAGING_METADATA 0xcafe1a7e | ||
| 1331 | |||
| 1305 | /* Note section name of program property. */ | 1332 | /* Note section name of program property. */ |
| 1306 | #define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property" | 1333 | #define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property" |
| 1307 | 1334 | ||
| ... | @@ -1312,6 +1339,23 @@ typedef struct | ... | @@ -1312,6 +1339,23 @@ typedef struct |
| 1312 | /* No copy relocation on protected data symbol. */ | 1339 | /* No copy relocation on protected data symbol. */ |
| 1313 | #define GNU_PROPERTY_NO_COPY_ON_PROTECTED	2 | 1340 | #define GNU_PROPERTY_NO_COPY_ON_PROTECTED	2 |
| 1314 | 1341 | ||
| 1342 | /* A 4-byte unsigned integer property: A bit is set if it is set in all | ||
| 1343 | relocatable inputs. */ | ||
| 1344 | #define GNU_PROPERTY_UINT32_AND_LO	0xb0000000 | ||
| 1345 | #define GNU_PROPERTY_UINT32_AND_HI	0xb0007fff | ||
| 1346 | |||
| 1347 | /* A 4-byte unsigned integer property: A bit is set if it is set in any | ||
| 1348 | relocatable inputs. */ | ||
| 1349 | #define GNU_PROPERTY_UINT32_OR_LO	0xb0008000 | ||
| 1350 | #define GNU_PROPERTY_UINT32_OR_HI	0xb000ffff | ||
| 1351 | |||
| 1352 | /* The needed properties by the object file. */ | ||
| 1353 | #define GNU_PROPERTY_1_NEEDED		GNU_PROPERTY_UINT32_OR_LO | ||
| 1354 | |||
| 1355 | /* Set if the object file requires canonical function pointers and | ||
| 1356 | cannot be used with copy relocation. */ | ||
| 1357 | #define GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS (1U << 0) | ||
| 1358 | |||
| 1315 | /* Processor-specific semantics, lo */ | 1359 | /* Processor-specific semantics, lo */ |
| 1316 | #define GNU_PROPERTY_LOPROC			0xc0000000 | 1360 | #define GNU_PROPERTY_LOPROC			0xc0000000 |
| 1317 | /* Processor-specific semantics, hi */ | 1361 | /* Processor-specific semantics, hi */ |
| ... | @@ -2871,6 +2915,9 @@ enum | ... | @@ -2871,6 +2915,9 @@ enum |
| 2871 | #define R_AARCH64_TLSDESC 1031	/* TLS Descriptor. */ | 2915 | #define R_AARCH64_TLSDESC 1031	/* TLS Descriptor. */ |
| 2872 | #define R_AARCH64_IRELATIVE	1032	/* STT_GNU_IFUNC relocation. */ | 2916 | #define R_AARCH64_IRELATIVE	1032	/* STT_GNU_IFUNC relocation. */ |
| 2873 | 2917 | ||
| 2918 | /* MTE memory tag segment type. */ | ||
| 2919 | #define PT_AARCH64_MEMTAG_MTE	(PT_LOPROC + 2) | ||
| 2920 | |||
| 2874 | /* AArch64 specific values for the Dyn d_tag field. */ | 2921 | /* AArch64 specific values for the Dyn d_tag field. */ |
| 2875 | #define DT_AARCH64_BTI_PLT	(DT_LOPROC + 1) | 2922 | #define DT_AARCH64_BTI_PLT	(DT_LOPROC + 1) |
| 2876 | #define DT_AARCH64_PAC_PLT	(DT_LOPROC + 3) | 2923 | #define DT_AARCH64_PAC_PLT	(DT_LOPROC + 3) |
| ... | @@ -3896,6 +3943,8 @@ enum | ... | @@ -3896,6 +3943,8 @@ enum |
| 3896 | #define EF_RISCV_FLOAT_ABI_SINGLE 	0x0002 | 3943 | #define EF_RISCV_FLOAT_ABI_SINGLE 	0x0002 |
| 3897 | #define EF_RISCV_FLOAT_ABI_DOUBLE 	0x0004 | 3944 | #define EF_RISCV_FLOAT_ABI_DOUBLE 	0x0004 |
| 3898 | #define EF_RISCV_FLOAT_ABI_QUAD 	0x0006 | 3945 | #define EF_RISCV_FLOAT_ABI_QUAD 	0x0006 |
| 3946 | #define EF_RISCV_RVE			0x0008 | ||
| 3947 | #define EF_RISCV_TSO			0x0010 | ||
| 3899 | 3948 | ||
| 3900 | /* RISC-V relocations. */ | 3949 | /* RISC-V relocations. */ |
| 3901 | #define R_RISCV_NONE		 0 | 3950 | #define R_RISCV_NONE		 0 |
| ... | @@ -3953,8 +4002,24 @@ enum | ... | @@ -3953,8 +4002,24 @@ enum |
| 3953 | #define R_RISCV_SET32		56 | 4002 | #define R_RISCV_SET32		56 |
| 3954 | #define R_RISCV_32_PCREL	57 | 4003 | #define R_RISCV_32_PCREL	57 |
| 3955 | #define R_RISCV_IRELATIVE	58 | 4004 | #define R_RISCV_IRELATIVE	58 |
| 4005 | #define R_RISCV_PLT32		59 | ||
| 4006 | #define R_RISCV_SET_ULEB128	60 | ||
| 4007 | #define R_RISCV_SUB_ULEB128	61 | ||
| 3956 | 4008 | ||
| 3957 | #define R_RISCV_NUM		59 | 4009 | #define R_RISCV_NUM		62 |
| 4010 | |||
| 4011 | /* RISC-V specific values for the st_other field. */ | ||
| 4012 | #define STO_RISCV_VARIANT_CC	0x80	/* Function uses variant calling | ||
| 4013 | 					 convention */ | ||
| 4014 | |||
| 4015 | /* RISC-V specific values for the sh_type field. */ | ||
| 4016 | #define SHT_RISCV_ATTRIBUTES	(SHT_LOPROC + 3) | ||
| 4017 | |||
| 4018 | /* RISC-V specific values for the p_type field. */ | ||
| 4019 | #define PT_RISCV_ATTRIBUTES	(PT_LOPROC + 3) | ||
| 4020 | |||
| 4021 | /* RISC-V specific values for the d_tag field. */ | ||
| 4022 | #define DT_RISCV_VARIANT_CC	(DT_LOPROC + 1) | ||
| 3958 | 4023 | ||
| 3959 | /* BPF specific declarations. */ | 4024 | /* BPF specific declarations. */ |
| 3960 | 4025 | ||
| ... | @@ -4034,13 +4099,130 @@ enum | ... | @@ -4034,13 +4099,130 @@ enum |
| 4034 | #define R_NDS32_TLS_TPOFF	102 | 4099 | #define R_NDS32_TLS_TPOFF	102 |
| 4035 | #define R_NDS32_TLS_DESC	119 | 4100 | #define R_NDS32_TLS_DESC	119 |
| 4036 | 4101 | ||
| 4102 | /* LoongArch ELF Flags */ | ||
| 4103 | #define EF_LARCH_ABI_MODIFIER_MASK 0x07 | ||
| 4104 | #define EF_LARCH_ABI_SOFT_FLOAT 0x01 | ||
| 4105 | #define EF_LARCH_ABI_SINGLE_FLOAT 0x02 | ||
| 4106 | #define EF_LARCH_ABI_DOUBLE_FLOAT 0x03 | ||
| 4107 | #define EF_LARCH_OBJABI_V1 0x40 | ||
| 4108 | |||
| 4109 | /* LoongArch specific dynamic relocations */ | ||
| 4110 | #define R_LARCH_NONE		0 | ||
| 4111 | #define R_LARCH_32		1 | ||
| 4112 | #define R_LARCH_64		2 | ||
| 4113 | #define R_LARCH_RELATIVE	3 | ||
| 4114 | #define R_LARCH_COPY		4 | ||
| 4115 | #define R_LARCH_JUMP_SLOT	5 | ||
| 4116 | #define R_LARCH_TLS_DTPMOD32	6 | ||
| 4117 | #define R_LARCH_TLS_DTPMOD64	7 | ||
| 4118 | #define R_LARCH_TLS_DTPREL32	8 | ||
| 4119 | #define R_LARCH_TLS_DTPREL64	9 | ||
| 4120 | #define R_LARCH_TLS_TPREL32	10 | ||
| 4121 | #define R_LARCH_TLS_TPREL64	11 | ||
| 4122 | #define R_LARCH_IRELATIVE	12 | ||
| 4123 | |||
| 4124 | /* Reserved for future relocs that the dynamic linker must understand. */ | ||
| 4125 | |||
| 4126 | /* used by the static linker for relocating .text. */ | ||
| 4127 | #define R_LARCH_MARK_LA 20 | ||
| 4128 | #define R_LARCH_MARK_PCREL 21 | ||
| 4129 | #define R_LARCH_SOP_PUSH_PCREL 22 | ||
| 4130 | #define R_LARCH_SOP_PUSH_ABSOLUTE 23 | ||
| 4131 | #define R_LARCH_SOP_PUSH_DUP 24 | ||
| 4132 | #define R_LARCH_SOP_PUSH_GPREL 25 | ||
| 4133 | #define R_LARCH_SOP_PUSH_TLS_TPREL 26 | ||
| 4134 | #define R_LARCH_SOP_PUSH_TLS_GOT 27 | ||
| 4135 | #define R_LARCH_SOP_PUSH_TLS_GD 28 | ||
| 4136 | #define R_LARCH_SOP_PUSH_PLT_PCREL 29 | ||
| 4137 | #define R_LARCH_SOP_ASSERT 30 | ||
| 4138 | #define R_LARCH_SOP_NOT 31 | ||
| 4139 | #define R_LARCH_SOP_SUB 32 | ||
| 4140 | #define R_LARCH_SOP_SL 33 | ||
| 4141 | #define R_LARCH_SOP_SR 34 | ||
| 4142 | #define R_LARCH_SOP_ADD 35 | ||
| 4143 | #define R_LARCH_SOP_AND 36 | ||
| 4144 | #define R_LARCH_SOP_IF_ELSE 37 | ||
| 4145 | #define R_LARCH_SOP_POP_32_S_10_5 38 | ||
| 4146 | #define R_LARCH_SOP_POP_32_U_10_12 39 | ||
| 4147 | #define R_LARCH_SOP_POP_32_S_10_12 40 | ||
| 4148 | #define R_LARCH_SOP_POP_32_S_10_16 41 | ||
| 4149 | #define R_LARCH_SOP_POP_32_S_10_16_S2 42 | ||
| 4150 | #define R_LARCH_SOP_POP_32_S_5_20 43 | ||
| 4151 | #define R_LARCH_SOP_POP_32_S_0_5_10_16_S2 44 | ||
| 4152 | #define R_LARCH_SOP_POP_32_S_0_10_10_16_S2 45 | ||
| 4153 | #define R_LARCH_SOP_POP_32_U 46 | ||
| 4154 | |||
| 4155 | /* used by the static linker for relocating non .text. */ | ||
| 4156 | #define R_LARCH_ADD8 47 | ||
| 4157 | #define R_LARCH_ADD16 48 | ||
| 4158 | #define R_LARCH_ADD24 49 | ||
| 4159 | #define R_LARCH_ADD32 50 | ||
| 4160 | #define R_LARCH_ADD64 51 | ||
| 4161 | #define R_LARCH_SUB8 52 | ||
| 4162 | #define R_LARCH_SUB16 53 | ||
| 4163 | #define R_LARCH_SUB24 54 | ||
| 4164 | #define R_LARCH_SUB32 55 | ||
| 4165 | #define R_LARCH_SUB64 56 | ||
| 4166 | #define R_LARCH_GNU_VTINHERIT 57 | ||
| 4167 | #define R_LARCH_GNU_VTENTRY 58 | ||
| 4168 | |||
| 4169 | /* reserved 59-63 */ | ||
| 4170 | |||
| 4171 | #define R_LARCH_B16 64 | ||
| 4172 | #define R_LARCH_B21 65 | ||
| 4173 | #define R_LARCH_B26 66 | ||
| 4174 | #define R_LARCH_ABS_HI20 67 | ||
| 4175 | #define R_LARCH_ABS_LO12 68 | ||
| 4176 | #define R_LARCH_ABS64_LO20 69 | ||
| 4177 | #define R_LARCH_ABS64_HI12 70 | ||
| 4178 | #define R_LARCH_PCALA_HI20 71 | ||
| 4179 | #define R_LARCH_PCALA_LO12 72 | ||
| 4180 | #define R_LARCH_PCALA64_LO20 73 | ||
| 4181 | #define R_LARCH_PCALA64_HI12 74 | ||
| 4182 | #define R_LARCH_GOT_PC_HI20 75 | ||
| 4183 | #define R_LARCH_GOT_PC_LO12 76 | ||
| 4184 | #define R_LARCH_GOT64_PC_LO20 77 | ||
| 4185 | #define R_LARCH_GOT64_PC_HI12 78 | ||
| 4186 | #define R_LARCH_GOT_HI20 79 | ||
| 4187 | #define R_LARCH_GOT_LO12 80 | ||
| 4188 | #define R_LARCH_GOT64_LO20 81 | ||
| 4189 | #define R_LARCH_GOT64_HI12 82 | ||
| 4190 | #define R_LARCH_TLS_LE_HI20 83 | ||
| 4191 | #define R_LARCH_TLS_LE_LO12 84 | ||
| 4192 | #define R_LARCH_TLS_LE64_LO20 85 | ||
| 4193 | #define R_LARCH_TLS_LE64_HI12 86 | ||
| 4194 | #define R_LARCH_TLS_IE_PC_HI20 87 | ||
| 4195 | #define R_LARCH_TLS_IE_PC_LO12 88 | ||
| 4196 | #define R_LARCH_TLS_IE64_PC_LO20 89 | ||
| 4197 | #define R_LARCH_TLS_IE64_PC_HI12 90 | ||
| 4198 | #define R_LARCH_TLS_IE_HI20 91 | ||
| 4199 | #define R_LARCH_TLS_IE_LO12 92 | ||
| 4200 | #define R_LARCH_TLS_IE64_LO20 93 | ||
| 4201 | #define R_LARCH_TLS_IE64_HI12 94 | ||
| 4202 | #define R_LARCH_TLS_LD_PC_HI20 95 | ||
| 4203 | #define R_LARCH_TLS_LD_HI20 96 | ||
| 4204 | #define R_LARCH_TLS_GD_PC_HI20 97 | ||
| 4205 | #define R_LARCH_TLS_GD_HI20 98 | ||
| 4206 | #define R_LARCH_32_PCREL 99 | ||
| 4207 | #define R_LARCH_RELAX 100 | ||
| 4208 | |||
| 4209 | /* ARC specific declarations. */ | ||
| 4210 | |||
| 4211 | /* Processor specific flags for the Ehdr e_flags field. */ | ||
| 4212 | #define EF_ARC_MACH_MSK	 0x000000ff | ||
| 4213 | #define EF_ARC_OSABI_MSK 0x00000f00 | ||
| 4214 | #define EF_ARC_ALL_MSK	 (EF_ARC_MACH_MSK | EF_ARC_OSABI_MSK) | ||
| 4215 | |||
| 4216 | /* Processor specific values for the Shdr sh_type field. */ | ||
| 4217 | #define SHT_ARC_ATTRIBUTES	(SHT_LOPROC + 1) /* ARC attributes section. */ | ||
| 4218 | |||
| 4037 | /* ARCompact/ARCv2 specific relocs. */ | 4219 | /* ARCompact/ARCv2 specific relocs. */ |
| 4038 | #define R_ARC_NONE		0x0 | 4220 | #define R_ARC_NONE		0x0 |
| 4039 | #define R_ARC_8			0x1 | 4221 | #define R_ARC_8			0x1 |
| 4040 | #define R_ARC_16		0x2 | 4222 | #define R_ARC_16		0x2 |
| 4041 | #define R_ARC_24		0x3 | 4223 | #define R_ARC_24		0x3 |
| 4042 | #define R_ARC_32		0x4 | 4224 | #define R_ARC_32		0x4 |
| 4043 | #define R_ARC_B26		0x5 | 4225 | |
| 4044 | #define R_ARC_B22_PCREL		0x6 | 4226 | #define R_ARC_B22_PCREL		0x6 |
| 4045 | #define R_ARC_H30		0x7 | 4227 | #define R_ARC_H30		0x7 |
| 4046 | #define R_ARC_N8		0x8 | 4228 | #define R_ARC_N8		0x8 |
| ... | @@ -4080,16 +4262,23 @@ enum | ... | @@ -4080,16 +4262,23 @@ enum |
| 4080 | #define R_ARC_SECTOFF_ME_2	0x2A | 4262 | #define R_ARC_SECTOFF_ME_2	0x2A |
| 4081 | #define R_ARC_SECTOFF_1		0x2B | 4263 | #define R_ARC_SECTOFF_1		0x2B |
| 4082 | #define R_ARC_SECTOFF_2		0x2C | 4264 | #define R_ARC_SECTOFF_2		0x2C |
| 4265 | #define R_ARC_SDA_12		0x2D | ||
| 4266 | #define R_ARC_SDA16_ST2		0x30 | ||
| 4267 | #define R_ARC_32_PCREL		0x31 | ||
| 4083 | #define R_ARC_PC32		0x32 | 4268 | #define R_ARC_PC32		0x32 |
| 4084 | #define R_ARC_GOTPC32		0x33 | 4269 | #define R_ARC_GOTPC32		0x33 |
| 4085 | #define R_ARC_PLT32		0x34 | 4270 | #define R_ARC_PLT32		0x34 |
| 4086 | #define R_ARC_COPY		0x35 | 4271 | #define R_ARC_COPY		0x35 |
| 4087 | #define R_ARC_GLOB_DAT		0x36 | 4272 | #define R_ARC_GLOB_DAT		0x36 |
| 4088 | #define R_ARC_JUMP_SLOT		0x37 | 4273 | #define R_ARC_JMP_SLOT		0x37 |
| 4089 | #define R_ARC_RELATIVE		0x38 | 4274 | #define R_ARC_RELATIVE		0x38 |
| 4090 | #define R_ARC_GOTOFF		0x39 | 4275 | #define R_ARC_GOTOFF		0x39 |
| 4091 | #define R_ARC_GOTPC		0x3A | 4276 | #define R_ARC_GOTPC		0x3A |
| 4092 | #define R_ARC_GOT32		0x3B | 4277 | #define R_ARC_GOT32		0x3B |
| 4278 | #define R_ARC_S21W_PCREL_PLT	0x3C | ||
| 4279 | #define R_ARC_S25H_PCREL_PLT	0x3D | ||
| 4280 | |||
| 4281 | #define R_ARC_JLI_SECTOFF	0x3F | ||
| 4093 | 4282 | ||
| 4094 | #define R_ARC_TLS_DTPMOD	0x42 | 4283 | #define R_ARC_TLS_DTPMOD	0x42 |
| 4095 | #define R_ARC_TLS_DTPOFF	0x43 | 4284 | #define R_ARC_TLS_DTPOFF	0x43 |
| ... | @@ -4098,8 +4287,48 @@ enum | ... | @@ -4098,8 +4287,48 @@ enum |
| 4098 | #define R_ARC_TLS_GD_LD	 0x46 | 4287 | #define R_ARC_TLS_GD_LD	 0x46 |
| 4099 | #define R_ARC_TLS_GD_CALL	0x47 | 4288 | #define R_ARC_TLS_GD_CALL	0x47 |
| 4100 | #define R_ARC_TLS_IE_GOT	0x48 | 4289 | #define R_ARC_TLS_IE_GOT	0x48 |
| 4101 | #define R_ARC_TLS_DTPOFF_S9	0x4a | 4290 | #define R_ARC_TLS_DTPOFF_S9	0x49 |
| 4102 | #define R_ARC_TLS_LE_S9		0x4a | 4291 | #define R_ARC_TLS_LE_S9		0x4A |
| 4103 | #define R_ARC_TLS_LE_32		0x4b | 4292 | #define R_ARC_TLS_LE_32		0x4B |
| 4293 | #define R_ARC_S25W_PCREL_PLT	0x4C | ||
| 4294 | #define R_ARC_S21H_PCREL_PLT	0x4D | ||
| 4295 | #define R_ARC_NPS_CMEM16	0x4E | ||
| 4296 | |||
| 4297 | /* OpenRISC 1000 specific relocs. */ | ||
| 4298 | #define R_OR1K_NONE		0 | ||
| 4299 | #define R_OR1K_32		1 | ||
| 4300 | #define R_OR1K_16		2 | ||
| 4301 | #define R_OR1K_8		3 | ||
| 4302 | #define R_OR1K_LO_16_IN_INSN	4 | ||
| 4303 | #define R_OR1K_HI_16_IN_INSN	5 | ||
| 4304 | #define R_OR1K_INSN_REL_26	6 | ||
| 4305 | #define R_OR1K_GNU_VTENTRY	7 | ||
| 4306 | #define R_OR1K_GNU_VTINHERIT	8 | ||
| 4307 | #define R_OR1K_32_PCREL		9 | ||
| 4308 | #define R_OR1K_16_PCREL		10 | ||
| 4309 | #define R_OR1K_8_PCREL		11 | ||
| 4310 | #define R_OR1K_GOTPC_HI16	12 | ||
| 4311 | #define R_OR1K_GOTPC_LO16	13 | ||
| 4312 | #define R_OR1K_GOT16		14 | ||
| 4313 | #define R_OR1K_PLT26		15 | ||
| 4314 | #define R_OR1K_GOTOFF_HI16	16 | ||
| 4315 | #define R_OR1K_GOTOFF_LO16	17 | ||
| 4316 | #define R_OR1K_COPY		18 | ||
| 4317 | #define R_OR1K_GLOB_DAT		19 | ||
| 4318 | #define R_OR1K_JMP_SLOT		20 | ||
| 4319 | #define R_OR1K_RELATIVE		21 | ||
| 4320 | #define R_OR1K_TLS_GD_HI16	22 | ||
| 4321 | #define R_OR1K_TLS_GD_LO16	23 | ||
| 4322 | #define R_OR1K_TLS_LDM_HI16	24 | ||
| 4323 | #define R_OR1K_TLS_LDM_LO16	25 | ||
| 4324 | #define R_OR1K_TLS_LDO_HI16	26 | ||
| 4325 | #define R_OR1K_TLS_LDO_LO16	27 | ||
| 4326 | #define R_OR1K_TLS_IE_HI16	28 | ||
| 4327 | #define R_OR1K_TLS_IE_LO16	29 | ||
| 4328 | #define R_OR1K_TLS_LE_HI16	30 | ||
| 4329 | #define R_OR1K_TLS_LE_LO16	31 | ||
| 4330 | #define R_OR1K_TLS_TPOFF	32 | ||
| 4331 | #define R_OR1K_TLS_DTPOFF	33 | ||
| 4332 | #define R_OR1K_TLS_DTPMOD	34 | ||
| 4104 | 4333 | ||
| 4105 | #endif	/* elf.h */ | 4334 | #endif	/* elf.h */ |
lib/libc/glibc/include/libc-pointer-arith.h+9-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Helper macros for pointer arithmetic. | 1 | /* Helper macros for pointer arithmetic. |
| 2 | Copyright (C) 2012-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -60,4 +60,12 @@ | ... | @@ -60,4 +60,12 @@ |
| 60 | #define PTR_ALIGN_UP(base, size) \ | 60 | #define PTR_ALIGN_UP(base, size) \ |
| 61 | ((__typeof__ (base)) ALIGN_UP ((uintptr_t) (base), (size))) | 61 | ((__typeof__ (base)) ALIGN_UP ((uintptr_t) (base), (size))) |
| 62 | 62 | ||
| 63 | /* Check if BASE is aligned on SIZE */ | ||
| 64 | #define PTR_IS_ALIGNED(base, size) \ | ||
| 65 | ((((uintptr_t) (base)) & (size - 1)) == 0) | ||
| 66 | |||
| 67 | /* Returns the ptrdiff_t difference between P1 and P2. */ | ||
| 68 | #define PTR_DIFF(p1, p2) \ | ||
| 69 | ((ptrdiff_t)((uintptr_t)(p1) - (uintptr_t)(p2))) | ||
| 70 | |||
| 63 | #endif | 71 | #endif |
lib/libc/glibc/include/libc-symbols.h+41-253| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Support macros for making weak and strong aliases for symbols, | 1 | /* Support macros for making weak and strong aliases for symbols, |
| 2 | and for using symbol sets and linker warnings with GNU ld. | 2 | and for using symbol sets and linker warnings with GNU ld. |
| 3 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -155,14 +155,6 @@ | ... | @@ -155,14 +155,6 @@ |
| 155 | extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))) \ | 155 | extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))) \ |
| 156 | __attribute_copy__ (name); | 156 | __attribute_copy__ (name); |
| 157 | 157 | ||
| 158 | /* Same as WEAK_ALIAS, but mark symbol as hidden. */ | ||
| 159 | # define weak_hidden_alias(name, aliasname) \ | ||
| 160 | _weak_hidden_alias (name, aliasname) | ||
| 161 | # define _weak_hidden_alias(name, aliasname) \ | ||
| 162 | extern __typeof (name) aliasname \ | ||
| 163 | __attribute__ ((weak, alias (#name), __visibility__ ("hidden"))) \ | ||
| 164 | __attribute_copy__ (name); | ||
| 165 | |||
| 166 | /* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */ | 158 | /* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */ |
| 167 | # define weak_extern(symbol) _weak_extern (weak symbol) | 159 | # define weak_extern(symbol) _weak_extern (weak symbol) |
| 168 | # define _weak_extern(expr) _Pragma (#expr) | 160 | # define _weak_extern(expr) _Pragma (#expr) |
| ... | @@ -245,105 +237,32 @@ requires at runtime the shared libraries from the glibc version used \ | ... | @@ -245,105 +237,32 @@ requires at runtime the shared libraries from the glibc version used \ |
| 245 | for linking") | 237 | for linking") |
| 246 | #endif | 238 | #endif |
| 247 | 239 | ||
| 248 | /* Resource Freeing Hooks: | ||
| 249 | |||
| 250 | Normally a process exits and the OS cleans up any allocated | ||
| 251 | memory. However, when tooling like mtrace or valgrind is monitoring | ||
| 252 | the process we need to free all resources that are part of the | ||
| 253 | process in order to provide the consistency required to track | ||
| 254 | memory leaks. | ||
| 255 | |||
| 256 | A single public API exists and is __libc_freeres(), and this is used | ||
| 257 | by applications like valgrind to freee resouces. | ||
| 258 | |||
| 259 | There are 3 cases: | ||
| 260 | |||
| 261 | (a) __libc_freeres | ||
| 262 | |||
| 263 | 	In this case all you need to do is define the freeing routine: | ||
| 264 | |||
| 265 | 	foo.c: | ||
| 266 | 	libfoo_freeres_fn (foo_freeres) | ||
| 267 | 	{ | ||
| 268 | 	 complex_free (mem); | ||
| 269 | 	} | ||
| 270 | |||
| 271 | 	This ensures the function is called at the right point to free | ||
| 272 | 	resources. | ||
| 273 | |||
| 274 | (b) __libc_freeres_ptr | ||
| 275 | |||
| 276 | 	The framework for (a) iterates over the list of pointers-to-free | ||
| 277 | 	in (b) and frees them. | ||
| 278 | |||
| 279 | 	foo.c: | ||
| 280 | 	libc_freeres_ptr (static char *foo_buffer); | ||
| 281 | |||
| 282 | 	Freeing these resources alaways happens last and is equivalent | ||
| 283 | 	to registering a function that does 'free (foo_buffer)'. | ||
| 284 | |||
| 285 | (c) Explicit lists of free routines to call or objects to free. | ||
| 286 | |||
| 287 | 	It is the intended goal to remove (a) and (b) which have some | ||
| 288 | 	non-determinism based on link order, and instead use explicit | ||
| 289 | 	lists of functions and frees to resolve cleanup ordering issues | ||
| 290 | 	and make it easy to debug and maintain. | ||
| 291 | |||
| 292 | 	As of today the following subsystems use (c): | ||
| 293 | |||
| 294 | 	Per-thread cleanup: | ||
| 295 | 	* malloc/thread-freeres.c | ||
| 296 | |||
| 297 | 	libdl cleanup: | ||
| 298 | 	* dlfcn/dlfreeres.c | ||
| 299 | |||
| 300 | 	libpthread cleanup: | ||
| 301 | 	* nptl/nptlfreeres.c | ||
| 302 | |||
| 303 | 	So if you need any shutdown routines to run you should add them | ||
| 304 | 	directly to the appropriate subsystem's shutdown list. */ | ||
| 305 | |||
| 306 | /* Resource pointers to free in libc.so. */ | ||
| 307 | #define libc_freeres_ptr(decl) \ | ||
| 308 | __make_section_unallocated ("__libc_freeres_ptrs, \"aw\", %nobits") \ | ||
| 309 | decl __attribute__ ((section ("__libc_freeres_ptrs" __sec_comment))) | ||
| 310 | |||
| 311 | /* Resource freeing functions from libc.so go in this section. */ | ||
| 312 | #define __libc_freeres_fn_section \ | ||
| 313 | __attribute__ ((__used__, section ("__libc_freeres_fn"))) | ||
| 314 | |||
| 315 | /* Resource freeing functions for libc.so. */ | ||
| 316 | #define libc_freeres_fn(name) \ | ||
| 317 | static void name (void) __attribute_used__ __libc_freeres_fn_section;	\ | ||
| 318 | text_set_element (__libc_subfreeres, name);				\ | ||
| 319 | static void name (void) | ||
| 320 | |||
| 321 | /* Declare SYMBOL to be TYPE (`function' or `object') of SIZE bytes | 240 | /* Declare SYMBOL to be TYPE (`function' or `object') of SIZE bytes |
| 322 | alias to ORIGINAL, when the assembler supports such declarations | 241 | alias to ORIGINAL, when the assembler supports such declarations |
| 323 | (such as in ELF). | 242 | (such as in ELF). |
| 324 | This is only necessary when defining something in assembly, or playing | 243 | This is only necessary when defining something in assembly, or playing |
| 325 | funny alias games where the size should be other than what the compiler | 244 | funny alias games where the size should be other than what the compiler |
| 326 | thinks it is. */ | 245 | thinks it is. */ |
| 327 | #define declare_symbol_alias(symbol, original, type, size) \ | 246 | #define declare_object_symbol_alias(symbol, original, size) \ |
| 328 | declare_symbol_alias_1 (symbol, original, type, size) | 247 | declare_object_symbol_alias_1 (symbol, original, size) |
| 329 | #ifdef __ASSEMBLER__ | 248 | #ifdef __ASSEMBLER__ |
| 330 | # define declare_symbol_alias_1(symbol, original, type, size) \ | 249 | # define declare_object_symbol_alias_1(symbol, original, s_size) \ |
| 331 | strong_alias (original, symbol); \ | 250 | strong_alias (original, symbol) ASM_LINE_SEP \ |
| 332 | .type C_SYMBOL_NAME (symbol), %##type; \ | 251 | .type C_SYMBOL_NAME (symbol), %object ASM_LINE_SEP \ |
| 333 | .size C_SYMBOL_NAME (symbol), size | 252 | .size C_SYMBOL_NAME (symbol), s_size ASM_LINE_SEP |
| 334 | #else /* Not __ASSEMBLER__. */ | 253 | #else /* Not __ASSEMBLER__. */ |
| 335 | # define declare_symbol_alias_1(symbol, original, type, size) \ | ||
| 336 | asm (".globl " __SYMBOL_PREFIX #symbol \ | ||
| 337 | 	"\n\t" declare_symbol_alias_1_alias (symbol, original) \ | ||
| 338 | 	"\n\t.type " __SYMBOL_PREFIX #symbol ", " \ | ||
| 339 | 	"%" #type \ | ||
| 340 | 	"\n\t.size " __SYMBOL_PREFIX #symbol ", " #size); | ||
| 341 | # ifdef HAVE_ASM_SET_DIRECTIVE | 254 | # ifdef HAVE_ASM_SET_DIRECTIVE |
| 342 | # define declare_symbol_alias_1_alias(symbol, original) \ | 255 | # define declare_object_symbol_alias_1(symbol, original, size) \ |
| 343 | ".set " __SYMBOL_PREFIX #symbol ", " __SYMBOL_PREFIX #original | 256 | asm (".global " __SYMBOL_PREFIX # symbol "\n" \ |
| 257 | 	 ".type " __SYMBOL_PREFIX # symbol ", %object\n" \ | ||
| 258 | 	 ".set " __SYMBOL_PREFIX #symbol ", " __SYMBOL_PREFIX original "\n" \ | ||
| 259 | 	 ".size " __SYMBOL_PREFIX #symbol ", " #size "\n"); | ||
| 344 | # else | 260 | # else |
| 345 | # define declare_symbol_alias_1_alias(symbol, original) \ | 261 | # define declare_object_symbol_alias_1(symbol, original, size) \ |
| 346 | __SYMBOL_PREFIX #symbol " = " __SYMBOL_PREFIX #original | 262 | asm (".global " __SYMBOL_PREFIX # symbol "\n" \ |
| 263 | 	 ".type " __SYMBOL_PREFIX # symbol ", %object\n" \ | ||
| 264 | 	 __SYMBOL_PREFIX #symbol " = " __SYMBOL_PREFIX original "\n" \ | ||
| 265 | 	 ".size " __SYMBOL_PREFIX #symbol ", " #size "\n"); | ||
| 347 | # endif /* HAVE_ASM_SET_DIRECTIVE */ | 266 | # endif /* HAVE_ASM_SET_DIRECTIVE */ |
| 348 | #endif /* __ASSEMBLER__ */ | 267 | #endif /* __ASSEMBLER__ */ |
| 349 | 268 | ||
| ... | @@ -419,7 +338,7 @@ for linking") | ... | @@ -419,7 +338,7 @@ for linking") |
| 419 | _set_symbol_version (real, #name "@@" #version) | 338 | _set_symbol_version (real, #name "@@" #version) |
| 420 | # endif | 339 | # endif |
| 421 | 340 | ||
| 422 | /* Evalutes to a string literal for VERSION in LIB. */ | 341 | /* Evaluates to a string literal for VERSION in LIB. */ |
| 423 | # define symbol_version_string(lib, version) \ | 342 | # define symbol_version_string(lib, version) \ |
| 424 | _symbol_version_stringify_1 (VERSION_##lib##_##version) | 343 | _symbol_version_stringify_1 (VERSION_##lib##_##version) |
| 425 | # define _symbol_version_stringify_1(arg) _symbol_version_stringify_2 (arg) | 344 | # define _symbol_version_stringify_1(arg) _symbol_version_stringify_2 (arg) |
| ... | @@ -532,11 +451,15 @@ for linking") | ... | @@ -532,11 +451,15 @@ for linking") |
| 532 | __attribute__ ((visibility ("hidden"), ##attrs)) | 451 | __attribute__ ((visibility ("hidden"), ##attrs)) |
| 533 | # define hidden_proto(name, attrs...) \ | 452 | # define hidden_proto(name, attrs...) \ |
| 534 | __hidden_proto (name, , __GI_##name, ##attrs) | 453 | __hidden_proto (name, , __GI_##name, ##attrs) |
| 454 | # define hidden_proto_alias(name, alias, attrs...) \ | ||
| 455 | __hidden_proto_alias (name, , alias, ##attrs) | ||
| 535 | # define hidden_tls_proto(name, attrs...) \ | 456 | # define hidden_tls_proto(name, attrs...) \ |
| 536 | __hidden_proto (name, __thread, __GI_##name, ##attrs) | 457 | __hidden_proto (name, __thread, __GI_##name, ##attrs) |
| 537 | # define __hidden_proto(name, thread, internal, attrs...)	 \ | 458 | # define __hidden_proto(name, thread, internal, attrs...)	 \ |
| 538 | extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \ | 459 | extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \ |
| 539 | __hidden_proto_hiddenattr (attrs); | 460 | __hidden_proto_hiddenattr (attrs); |
| 461 | # define __hidden_proto_alias(name, thread, internal, attrs...)	 \ | ||
| 462 | extern thread __typeof (name) internal __hidden_proto_hiddenattr (attrs); | ||
| 540 | # define __hidden_asmname(name) \ | 463 | # define __hidden_asmname(name) \ |
| 541 | __hidden_asmname1 (__USER_LABEL_PREFIX__, name) | 464 | __hidden_asmname1 (__USER_LABEL_PREFIX__, name) |
| 542 | # define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name) | 465 | # define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name) |
| ... | @@ -550,9 +473,11 @@ for linking") | ... | @@ -550,9 +473,11 @@ for linking") |
| 550 | __attribute__((alias (__hidden_asmname (#local))))	\ | 473 | __attribute__((alias (__hidden_asmname (#local))))	\ |
| 551 | __attribute_copy__ (name) | 474 | __attribute_copy__ (name) |
| 552 | # define hidden_ver(local, name)	__hidden_ver1(local, __GI_##name, name); | 475 | # define hidden_ver(local, name)	__hidden_ver1(local, __GI_##name, name); |
| 553 | # define hidden_data_ver(local, name)	hidden_ver(local, name) | ||
| 554 | # define hidden_def(name)		__hidden_ver1(__GI_##name, name, name); | 476 | # define hidden_def(name)		__hidden_ver1(__GI_##name, name, name); |
| 477 | # define hidden_def_alias(name, internal) \ | ||
| 478 | strong_alias (name, internal) | ||
| 555 | # define hidden_data_def(name)		hidden_def(name) | 479 | # define hidden_data_def(name)		hidden_def(name) |
| 480 | # define hidden_data_def_alias(name, alias) hidden_def_alias(name, alias) | ||
| 556 | # define hidden_tls_def(name)				\ | 481 | # define hidden_tls_def(name)				\ |
| 557 | __hidden_ver2 (__thread, __GI_##name, name, name); | 482 | __hidden_ver2 (__thread, __GI_##name, name, name); |
| 558 | # define hidden_weak(name) \ | 483 | # define hidden_weak(name) \ |
| ... | @@ -579,12 +504,13 @@ for linking") | ... | @@ -579,12 +504,13 @@ for linking") |
| 579 | hidden_proto doesn't make sense for assembly but the equivalent | 504 | hidden_proto doesn't make sense for assembly but the equivalent |
| 580 | is to call via the HIDDEN_JUMPTARGET macro instead of JUMPTARGET. */ | 505 | is to call via the HIDDEN_JUMPTARGET macro instead of JUMPTARGET. */ |
| 581 | # define hidden_def(name)	strong_alias (name, __GI_##name) | 506 | # define hidden_def(name)	strong_alias (name, __GI_##name) |
| 507 | # define hidden_def_alias(name, alias) strong_alias (name, alias) | ||
| 582 | # define hidden_weak(name)	hidden_def (name) | 508 | # define hidden_weak(name)	hidden_def (name) |
| 583 | # define hidden_ver(local, name) strong_alias (local, __GI_##name) | 509 | # define hidden_ver(local, name) strong_alias (local, __GI_##name) |
| 584 | # define hidden_data_def(name)	strong_data_alias (name, __GI_##name) | 510 | # define hidden_data_def(name)	strong_data_alias (name, __GI_##name) |
| 511 | # define hidden_data_def_alias(name, alias) strong_data_alias (name, alias) | ||
| 585 | # define hidden_tls_def(name)	hidden_data_def (name) | 512 | # define hidden_tls_def(name)	hidden_data_def (name) |
| 586 | # define hidden_data_weak(name)	hidden_data_def (name) | 513 | # define hidden_data_weak(name)	hidden_data_def (name) |
| 587 | # define hidden_data_ver(local, name) strong_data_alias (local, __GI_##name) | ||
| 588 | # define HIDDEN_JUMPTARGET(name) __GI_##name | 514 | # define HIDDEN_JUMPTARGET(name) __GI_##name |
| 589 | # endif | 515 | # endif |
| 590 | #else | 516 | #else |
| ... | @@ -596,12 +522,17 @@ for linking") | ... | @@ -596,12 +522,17 @@ for linking") |
| 596 | __attribute__ ((visibility ("hidden"), ##attrs)) | 522 | __attribute__ ((visibility ("hidden"), ##attrs)) |
| 597 | # define hidden_proto(name, attrs...) \ | 523 | # define hidden_proto(name, attrs...) \ |
| 598 | __hidden_proto (name, , name, ##attrs) | 524 | __hidden_proto (name, , name, ##attrs) |
| 525 | # define hidden_proto_alias(name, alias, attrs...) \ | ||
| 526 | __hidden_proto_alias (name, , alias, ##attrs) | ||
| 599 | # define hidden_tls_proto(name, attrs...) \ | 527 | # define hidden_tls_proto(name, attrs...) \ |
| 600 | __hidden_proto (name, __thread, name, ##attrs) | 528 | __hidden_proto (name, __thread, name, ##attrs) |
| 601 | # define __hidden_proto(name, thread, internal, attrs...)	 \ | 529 | # define __hidden_proto(name, thread, internal, attrs...)	 \ |
| 602 | extern thread __typeof (name) name __hidden_proto_hiddenattr (attrs); | 530 | extern thread __typeof (name) name __hidden_proto_hiddenattr (attrs); |
| 531 | # define __hidden_proto_alias(name, thread, internal, attrs...) \ | ||
| 532 | extern thread __typeof (name) internal __hidden_proto_hiddenattr (attrs); | ||
| 603 | # else | 533 | # else |
| 604 | # define hidden_proto(name, attrs...) | 534 | # define hidden_proto(name, attrs...) |
| 535 | # define hidden_proto_alias(name, alias, attrs...) | ||
| 605 | # define hidden_tls_proto(name, attrs...) | 536 | # define hidden_tls_proto(name, attrs...) |
| 606 | # endif | 537 | # endif |
| 607 | # else | 538 | # else |
| ... | @@ -609,256 +540,116 @@ for linking") | ... | @@ -609,256 +540,116 @@ for linking") |
| 609 | # endif /* Not __ASSEMBLER__ */ | 540 | # endif /* Not __ASSEMBLER__ */ |
| 610 | # define hidden_weak(name) | 541 | # define hidden_weak(name) |
| 611 | # define hidden_def(name) | 542 | # define hidden_def(name) |
| 543 | # define hidden_def_alias(name, alias) | ||
| 612 | # define hidden_ver(local, name) | 544 | # define hidden_ver(local, name) |
| 613 | # define hidden_data_weak(name) | 545 | # define hidden_data_weak(name) |
| 614 | # define hidden_data_def(name) | 546 | # define hidden_data_def(name) |
| 547 | # define hidden_data_def_alias(name, alias) | ||
| 615 | # define hidden_tls_def(name) | 548 | # define hidden_tls_def(name) |
| 616 | # define hidden_data_ver(local, name) | ||
| 617 | # define hidden_nolink(name, lib, version) | 549 | # define hidden_nolink(name, lib, version) |
| 618 | #endif | 550 | #endif |
| 619 | 551 | ||
| 620 | #if IS_IN (libc) | 552 | #if IS_IN (libc) |
| 621 | # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) | 553 | # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) |
| 554 | # define libc_hidden_proto_alias(name, alias, attrs...) \ | ||
| 555 | hidden_proto_alias (name, alias, ##attrs) | ||
| 622 | # define libc_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs) | 556 | # define libc_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs) |
| 623 | # define libc_hidden_def(name) hidden_def (name) | 557 | # define libc_hidden_def(name) hidden_def (name) |
| 624 | # define libc_hidden_weak(name) hidden_weak (name) | 558 | # define libc_hidden_weak(name) hidden_weak (name) |
| 625 | # define libc_hidden_nolink_sunrpc(name, version) hidden_nolink (name, libc, version) | 559 | # define libc_hidden_nolink_sunrpc(name, version) hidden_nolink (name, libc, version) |
| 626 | # define libc_hidden_ver(local, name) hidden_ver (local, name) | 560 | # define libc_hidden_ver(local, name) hidden_ver (local, name) |
| 627 | # define libc_hidden_data_def(name) hidden_data_def (name) | 561 | # define libc_hidden_data_def(name) hidden_data_def (name) |
| 562 | # define libc_hidden_data_def_alias(name, alias) hidden_data_def_alias (name, alias) | ||
| 628 | # define libc_hidden_tls_def(name) hidden_tls_def (name) | 563 | # define libc_hidden_tls_def(name) hidden_tls_def (name) |
| 629 | # define libc_hidden_data_weak(name) hidden_data_weak (name) | 564 | # define libc_hidden_data_weak(name) hidden_data_weak (name) |
| 630 | # define libc_hidden_data_ver(local, name) hidden_data_ver (local, name) | ||
| 631 | #else | 565 | #else |
| 632 | # define libc_hidden_proto(name, attrs...) | 566 | # define libc_hidden_proto(name, attrs...) |
| 567 | # define libc_hidden_proto_alias(name, alias, attrs...) | ||
| 633 | # define libc_hidden_tls_proto(name, attrs...) | 568 | # define libc_hidden_tls_proto(name, attrs...) |
| 634 | # define libc_hidden_def(name) | 569 | # define libc_hidden_def(name) |
| 635 | # define libc_hidden_weak(name) | 570 | # define libc_hidden_weak(name) |
| 636 | # define libc_hidden_ver(local, name) | 571 | # define libc_hidden_ver(local, name) |
| 637 | # define libc_hidden_data_def(name) | 572 | # define libc_hidden_data_def(name) |
| 573 | # define libc_hidden_data_def_alias(name, alias) | ||
| 638 | # define libc_hidden_tls_def(name) | 574 | # define libc_hidden_tls_def(name) |
| 639 | # define libc_hidden_data_weak(name) | 575 | # define libc_hidden_data_weak(name) |
| 640 | # define libc_hidden_data_ver(local, name) | ||
| 641 | #endif | 576 | #endif |
| 642 | 577 | ||
| 643 | #if IS_IN (rtld) | 578 | #if IS_IN (rtld) |
| 644 | # define rtld_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) | 579 | # define rtld_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) |
| 645 | # define rtld_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs) | ||
| 646 | # define rtld_hidden_def(name) hidden_def (name) | 580 | # define rtld_hidden_def(name) hidden_def (name) |
| 647 | # define rtld_hidden_weak(name) hidden_weak (name) | 581 | # define rtld_hidden_weak(name) hidden_weak (name) |
| 648 | # define rtld_hidden_ver(local, name) hidden_ver (local, name) | ||
| 649 | # define rtld_hidden_data_def(name) hidden_data_def (name) | 582 | # define rtld_hidden_data_def(name) hidden_data_def (name) |
| 650 | # define rtld_hidden_tls_def(name) hidden_tls_def (name) | ||
| 651 | # define rtld_hidden_data_weak(name) hidden_data_weak (name) | ||
| 652 | # define rtld_hidden_data_ver(local, name) hidden_data_ver (local, name) | ||
| 653 | #else | 583 | #else |
| 654 | # define rtld_hidden_proto(name, attrs...) | 584 | # define rtld_hidden_proto(name, attrs...) |
| 655 | # define rtld_hidden_tls_proto(name, attrs...) | ||
| 656 | # define rtld_hidden_def(name) | 585 | # define rtld_hidden_def(name) |
| 657 | # define rtld_hidden_weak(name) | 586 | # define rtld_hidden_weak(name) |
| 658 | # define rtld_hidden_ver(local, name) | ||
| 659 | # define rtld_hidden_data_def(name) | 587 | # define rtld_hidden_data_def(name) |
| 660 | # define rtld_hidden_tls_def(name) | ||
| 661 | # define rtld_hidden_data_weak(name) | ||
| 662 | # define rtld_hidden_data_ver(local, name) | ||
| 663 | #endif | 588 | #endif |
| 664 | 589 | ||
| 665 | #if IS_IN (libm) | 590 | #if IS_IN (libm) |
| 666 | # define libm_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) | 591 | # define libm_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) |
| 667 | # define libm_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs) | ||
| 668 | # define libm_hidden_def(name) hidden_def (name) | 592 | # define libm_hidden_def(name) hidden_def (name) |
| 669 | # define libm_hidden_weak(name) hidden_weak (name) | 593 | # define libm_hidden_weak(name) hidden_weak (name) |
| 670 | # define libm_hidden_ver(local, name) hidden_ver (local, name) | 594 | # define libm_hidden_ver(local, name) hidden_ver (local, name) |
| 671 | # define libm_hidden_data_def(name) hidden_data_def (name) | ||
| 672 | # define libm_hidden_tls_def(name) hidden_tls_def (name) | ||
| 673 | # define libm_hidden_data_weak(name) hidden_data_weak (name) | ||
| 674 | # define libm_hidden_data_ver(local, name) hidden_data_ver (local, name) | ||
| 675 | #else | 595 | #else |
| 676 | # define libm_hidden_proto(name, attrs...) | 596 | # define libm_hidden_proto(name, attrs...) |
| 677 | # define libm_hidden_tls_proto(name, attrs...) | ||
| 678 | # define libm_hidden_def(name) | 597 | # define libm_hidden_def(name) |
| 679 | # define libm_hidden_weak(name) | 598 | # define libm_hidden_weak(name) |
| 680 | # define libm_hidden_ver(local, name) | 599 | # define libm_hidden_ver(local, name) |
| 681 | # define libm_hidden_data_def(name) | ||
| 682 | # define libm_hidden_tls_def(name) | ||
| 683 | # define libm_hidden_data_weak(name) | ||
| 684 | # define libm_hidden_data_ver(local, name) | ||
| 685 | #endif | 600 | #endif |
| 686 | 601 | ||
| 687 | #if IS_IN (libmvec) | 602 | #if IS_IN (libmvec) |
| 688 | # define libmvec_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) | ||
| 689 | # define libmvec_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs) | ||
| 690 | # define libmvec_hidden_def(name) hidden_def (name) | 603 | # define libmvec_hidden_def(name) hidden_def (name) |
| 691 | # define libmvec_hidden_weak(name) hidden_weak (name) | ||
| 692 | # define libmvec_hidden_ver(local, name) hidden_ver (local, name) | ||
| 693 | # define libmvec_hidden_data_def(name) hidden_data_def (name) | ||
| 694 | # define libmvec_hidden_tls_def(name) hidden_tls_def (name) | ||
| 695 | # define libmvec_hidden_data_weak(name) hidden_data_weak (name) | ||
| 696 | # define libmvec_hidden_data_ver(local, name) hidden_data_ver (local, name) | ||
| 697 | #else | 604 | #else |
| 698 | # define libmvec_hidden_proto(name, attrs...) | ||
| 699 | # define libmvec_hidden_tls_proto(name, attrs...) | ||
| 700 | # define libmvec_hidden_def(name) | 605 | # define libmvec_hidden_def(name) |
| 701 | # define libmvec_hidden_weak(name) | ||
| 702 | # define libmvec_hidden_ver(local, name) | ||
| 703 | # define libmvec_hidden_data_def(name) | ||
| 704 | # define libmvec_hidden_tls_def(name) | ||
| 705 | # define libmvec_hidden_data_weak(name) | ||
| 706 | # define libmvec_hidden_data_ver(local, name) | ||
| 707 | #endif | 606 | #endif |
| 708 | 607 | ||
| 709 | #if IS_IN (libresolv) | 608 | #if IS_IN (libresolv) |
| 710 | # define libresolv_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) | 609 | # define libresolv_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) |
| 711 | # define libresolv_hidden_tls_proto(name, attrs...) \ | ||
| 712 | hidden_tls_proto (name, ##attrs) | ||
| 713 | # define libresolv_hidden_def(name) hidden_def (name) | 610 | # define libresolv_hidden_def(name) hidden_def (name) |
| 714 | # define libresolv_hidden_weak(name) hidden_weak (name) | ||
| 715 | # define libresolv_hidden_ver(local, name) hidden_ver (local, name) | ||
| 716 | # define libresolv_hidden_data_def(name) hidden_data_def (name) | 611 | # define libresolv_hidden_data_def(name) hidden_data_def (name) |
| 717 | # define libresolv_hidden_tls_def(name) hidden_tls_def (name) | ||
| 718 | # define libresolv_hidden_data_weak(name) hidden_data_weak (name) | ||
| 719 | # define libresolv_hidden_data_ver(local, name) hidden_data_ver (local, name) | ||
| 720 | #else | 612 | #else |
| 721 | # define libresolv_hidden_proto(name, attrs...) | 613 | # define libresolv_hidden_proto(name, attrs...) |
| 722 | # define libresolv_hidden_tls_proto(name, attrs...) | ||
| 723 | # define libresolv_hidden_def(name) | 614 | # define libresolv_hidden_def(name) |
| 724 | # define libresolv_hidden_weak(name) | ||
| 725 | # define libresolv_hidden_ver(local, name) | ||
| 726 | # define libresolv_hidden_data_def(name) | 615 | # define libresolv_hidden_data_def(name) |
| 727 | # define libresolv_hidden_tls_def(name) | ||
| 728 | # define libresolv_hidden_data_weak(name) | ||
| 729 | # define libresolv_hidden_data_ver(local, name) | ||
| 730 | #endif | 616 | #endif |
| 731 | 617 | ||
| 732 | #if IS_IN (libpthread) | 618 | #if IS_IN (libpthread) |
| 733 | # define libpthread_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) | 619 | # define libpthread_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) |
| 734 | # define libpthread_hidden_tls_proto(name, attrs...) \ | ||
| 735 | hidden_tls_proto (name, ##attrs) | ||
| 736 | # define libpthread_hidden_def(name) hidden_def (name) | 620 | # define libpthread_hidden_def(name) hidden_def (name) |
| 737 | # define libpthread_hidden_weak(name) hidden_weak (name) | ||
| 738 | # define libpthread_hidden_ver(local, name) hidden_ver (local, name) | ||
| 739 | # define libpthread_hidden_data_def(name) hidden_data_def (name) | ||
| 740 | # define libpthread_hidden_tls_def(name) hidden_tls_def (name) | ||
| 741 | # define libpthread_hidden_data_weak(name) hidden_data_weak (name) | ||
| 742 | # define libpthread_hidden_data_ver(local, name) hidden_data_ver (local, name) | ||
| 743 | #else | 621 | #else |
| 744 | # define libpthread_hidden_proto(name, attrs...) | 622 | # define libpthread_hidden_proto(name, attrs...) |
| 745 | # define libpthread_hidden_tls_proto(name, attrs...) | ||
| 746 | # define libpthread_hidden_def(name) | 623 | # define libpthread_hidden_def(name) |
| 747 | # define libpthread_hidden_weak(name) | ||
| 748 | # define libpthread_hidden_ver(local, name) | ||
| 749 | # define libpthread_hidden_data_def(name) | ||
| 750 | # define libpthread_hidden_tls_def(name) | ||
| 751 | # define libpthread_hidden_data_weak(name) | ||
| 752 | # define libpthread_hidden_data_ver(local, name) | ||
| 753 | #endif | 624 | #endif |
| 754 | 625 | ||
| 755 | #if IS_IN (librt) | 626 | #if IS_IN (librt) |
| 756 | # define librt_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) | 627 | # define librt_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) |
| 757 | # define librt_hidden_tls_proto(name, attrs...) \ | ||
| 758 | hidden_tls_proto (name, ##attrs) | ||
| 759 | # define librt_hidden_def(name) hidden_def (name) | ||
| 760 | # define librt_hidden_weak(name) hidden_weak (name) | ||
| 761 | # define librt_hidden_ver(local, name) hidden_ver (local, name) | 628 | # define librt_hidden_ver(local, name) hidden_ver (local, name) |
| 762 | # define librt_hidden_data_def(name) hidden_data_def (name) | ||
| 763 | # define librt_hidden_tls_def(name) hidden_tls_def (name) | ||
| 764 | # define librt_hidden_data_weak(name) hidden_data_weak (name) | ||
| 765 | # define librt_hidden_data_ver(local, name) hidden_data_ver (local, name) | ||
| 766 | #else | 629 | #else |
| 767 | # define librt_hidden_proto(name, attrs...) | 630 | # define librt_hidden_proto(name, attrs...) |
| 768 | # define librt_hidden_tls_proto(name, attrs...) | ||
| 769 | # define librt_hidden_def(name) | ||
| 770 | # define librt_hidden_weak(name) | ||
| 771 | # define librt_hidden_ver(local, name) | 631 | # define librt_hidden_ver(local, name) |
| 772 | # define librt_hidden_data_def(name) | ||
| 773 | # define librt_hidden_tls_def(name) | ||
| 774 | # define librt_hidden_data_weak(name) | ||
| 775 | # define librt_hidden_data_ver(local, name) | ||
| 776 | #endif | ||
| 777 | |||
| 778 | #if IS_IN (libdl) | ||
| 779 | # define libdl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) | ||
| 780 | # define libdl_hidden_tls_proto(name, attrs...) \ | ||
| 781 | hidden_tls_proto (name, ##attrs) | ||
| 782 | # define libdl_hidden_def(name) hidden_def (name) | ||
| 783 | # define libdl_hidden_weak(name) hidden_weak (name) | ||
| 784 | # define libdl_hidden_ver(local, name) hidden_ver (local, name) | ||
| 785 | # define libdl_hidden_data_def(name) hidden_data_def (name) | ||
| 786 | # define libdl_hidden_tls_def(name) hidden_tls_def (name) | ||
| 787 | # define libdl_hidden_data_weak(name) hidden_data_weak (name) | ||
| 788 | # define libdl_hidden_data_ver(local, name) hidden_data_ver (local, name) | ||
| 789 | #else | ||
| 790 | # define libdl_hidden_proto(name, attrs...) | ||
| 791 | # define libdl_hidden_tls_proto(name, attrs...) | ||
| 792 | # define libdl_hidden_def(name) | ||
| 793 | # define libdl_hidden_weak(name) | ||
| 794 | # define libdl_hidden_ver(local, name) | ||
| 795 | # define libdl_hidden_data_def(name) | ||
| 796 | # define libdl_hidden_tls_def(name) | ||
| 797 | # define libdl_hidden_data_weak(name) | ||
| 798 | # define libdl_hidden_data_ver(local, name) | ||
| 799 | #endif | 632 | #endif |
| 800 | 633 | ||
| 801 | #if IS_IN (libnsl) | 634 | #if IS_IN (libnsl) |
| 802 | # define libnsl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) | 635 | # define libnsl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) |
| 803 | # define libnsl_hidden_tls_proto(name, attrs...) \ | ||
| 804 | hidden_tls_proto (name, ##attrs) | ||
| 805 | # define libnsl_hidden_nolink_def(name, version) hidden_nolink (name, libnsl, version) | 636 | # define libnsl_hidden_nolink_def(name, version) hidden_nolink (name, libnsl, version) |
| 806 | # define libnsl_hidden_weak(name) hidden_weak (name) | ||
| 807 | # define libnsl_hidden_ver(local, name) hidden_ver (local, name) | ||
| 808 | # define libnsl_hidden_data_def(name) hidden_data_def (name) | ||
| 809 | # define libnsl_hidden_tls_def(name) hidden_tls_def (name) | ||
| 810 | # define libnsl_hidden_data_weak(name) hidden_data_weak (name) | ||
| 811 | # define libnsl_hidden_data_ver(local, name) hidden_data_ver (local, name) | ||
| 812 | #else | 637 | #else |
| 813 | # define libnsl_hidden_proto(name, attrs...) | 638 | # define libnsl_hidden_proto(name, attrs...) |
| 814 | # define libnsl_hidden_tls_proto(name, attrs...) | ||
| 815 | # define libnsl_hidden_weak(name) | ||
| 816 | # define libnsl_hidden_ver(local, name) | ||
| 817 | # define libnsl_hidden_data_def(name) | ||
| 818 | # define libnsl_hidden_tls_def(name) | ||
| 819 | # define libnsl_hidden_data_weak(name) | ||
| 820 | # define libnsl_hidden_data_ver(local, name) | ||
| 821 | #endif | 639 | #endif |
| 822 | 640 | ||
| 823 | #define libc_hidden_builtin_proto(name, attrs...) libc_hidden_proto (name, ##attrs) | 641 | #define libc_hidden_builtin_proto(name, attrs...) libc_hidden_proto (name, ##attrs) |
| 824 | #define libc_hidden_builtin_def(name) libc_hidden_def (name) | 642 | #define libc_hidden_builtin_def(name) libc_hidden_def (name) |
| 825 | #define libc_hidden_builtin_weak(name) libc_hidden_weak (name) | ||
| 826 | #define libc_hidden_builtin_ver(local, name) libc_hidden_ver (local, name) | ||
| 827 | 643 | ||
| 828 | #define libc_hidden_ldbl_proto(name, attrs...) libc_hidden_proto (name, ##attrs) | 644 | #define libc_hidden_ldbl_proto(name, attrs...) libc_hidden_proto (name, ##attrs) |
| 829 | #ifdef __ASSEMBLER__ | 645 | #ifdef __ASSEMBLER__ |
| 830 | # define HIDDEN_BUILTIN_JUMPTARGET(name) HIDDEN_JUMPTARGET(name) | 646 | # define HIDDEN_BUILTIN_JUMPTARGET(name) HIDDEN_JUMPTARGET(name) |
| 831 | #endif | 647 | #endif |
| 832 | 648 | ||
| 833 | #if IS_IN (libutil) | ||
| 834 | # define libutil_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) | ||
| 835 | # define libutil_hidden_tls_proto(name, attrs...) \ | ||
| 836 | hidden_tls_proto (name, ##attrs) | ||
| 837 | # define libutil_hidden_def(name) hidden_def (name) | ||
| 838 | # define libutil_hidden_weak(name) hidden_weak (name) | ||
| 839 | # define libutil_hidden_ver(local, name) hidden_ver (local, name) | ||
| 840 | # define libutil_hidden_data_def(name) hidden_data_def (name) | ||
| 841 | # define libutil_hidden_tls_def(name) hidden_tls_def (name) | ||
| 842 | # define libutil_hidden_data_weak(name) hidden_data_weak (name) | ||
| 843 | # define libutil_hidden_data_ver(local, name) hidden_data_ver (local, name) | ||
| 844 | #else | ||
| 845 | # define libutil_hidden_proto(name, attrs...) | ||
| 846 | # define libutil_hidden_tls_proto(name, attrs...) | ||
| 847 | # define libutil_hidden_def(name) | ||
| 848 | # define libutil_hidden_weak(name) | ||
| 849 | # define libutil_hidden_ver(local, name) | ||
| 850 | # define libutil_hidden_data_def(name) | ||
| 851 | # define libutil_hidden_tls_def(name) | ||
| 852 | # define libutil_hidden_data_weak(name) | ||
| 853 | # define libutil_hidden_data_ver(local, name) | ||
| 854 | #endif | ||
| 855 | |||
| 856 | #if IS_IN (libanl) | 649 | #if IS_IN (libanl) |
| 857 | # define libanl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) | 650 | # define libanl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) |
| 858 | # define libanl_hidden_def(name) hidden_def (name) | ||
| 859 | #else | 651 | #else |
| 860 | # define libanl_hidden_proto(name, attrs...) | 652 | # define libanl_hidden_proto(name, attrs...) |
| 861 | # define libanl_hidden_def(name) | ||
| 862 | #endif | 653 | #endif |
| 863 | 654 | ||
| 864 | /* Get some dirty hacks. */ | 655 | /* Get some dirty hacks. */ |
| ... | @@ -869,11 +660,8 @@ for linking") | ... | @@ -869,11 +660,8 @@ for linking") |
| 869 | #ifndef __ASSEMBLER__ | 660 | #ifndef __ASSEMBLER__ |
| 870 | # define attribute_compat_text_section \ | 661 | # define attribute_compat_text_section \ |
| 871 | __attribute__ ((section (".text.compat"))) | 662 | __attribute__ ((section (".text.compat"))) |
| 872 | # define attribute_compat_data_section \ | ||
| 873 | __attribute__ ((section (".data.compat"))) | ||
| 874 | #else | 663 | #else |
| 875 | # define compat_text_section .section ".text.compat", "ax"; | 664 | # define compat_text_section .section ".text.compat", "ax"; |
| 876 | # define compat_data_section .section ".data.compat", "aw"; | ||
| 877 | #endif | 665 | #endif |
| 878 | 666 | ||
| 879 | /* Helper / base macros for indirect function symbols. */ | 667 | /* Helper / base macros for indirect function symbols. */ |
| ... | @@ -924,7 +712,7 @@ for linking") | ... | @@ -924,7 +712,7 @@ for linking") |
| 924 | 712 | ||
| 925 | If you have an implementation for foo which e.g. uses a special hardware | 713 | If you have an implementation for foo which e.g. uses a special hardware |
| 926 | feature which isn't available on all machines where this libc.so will be | 714 | feature which isn't available on all machines where this libc.so will be |
| 927 | used but decideable if available at runtime e.g. via hwcaps, you can provide | 715 | used but decidable if available at runtime e.g. via hwcaps, you can provide |
| 928 | two or multiple implementations of foo: | 716 | two or multiple implementations of foo: |
| 929 | 717 | ||
| 930 | int __foo_default (int __bar) | 718 | int __foo_default (int __bar) |
| ... | @@ -977,7 +765,7 @@ for linking") | ... | @@ -977,7 +765,7 @@ for linking") |
| 977 | 			 : __foo_default); | 765 | 			 : __foo_default); |
| 978 | 766 | ||
| 979 | This will define the ifunc'ed symbol foo like above. The redirection of foo | 767 | This will define the ifunc'ed symbol foo like above. The redirection of foo |
| 980 | in header file is needed to omit an additional defintion of __GI_foo which | 768 | in header file is needed to omit an additional definition of __GI_foo which |
| 981 | would end in a linker error while linking libc.so. You have to specify | 769 | would end in a linker error while linking libc.so. You have to specify |
| 982 | __redirect_foo as first parameter which is used within libc_ifunc_redirected | 770 | __redirect_foo as first parameter which is used within libc_ifunc_redirected |
| 983 | macro in conjunction with typeof to define the ifunc'ed symbol foo. | 771 | macro in conjunction with typeof to define the ifunc'ed symbol foo. |
lib/libc/glibc/include/signal.h+2-4| ... | @@ -14,10 +14,8 @@ libc_hidden_proto (__sigpause) | ... | @@ -14,10 +14,8 @@ libc_hidden_proto (__sigpause) |
| 14 | libc_hidden_proto (raise) | 14 | libc_hidden_proto (raise) |
| 15 | libc_hidden_proto (__libc_current_sigrtmin) | 15 | libc_hidden_proto (__libc_current_sigrtmin) |
| 16 | libc_hidden_proto (__libc_current_sigrtmax) | 16 | libc_hidden_proto (__libc_current_sigrtmax) |
| 17 | extern const char * const __sys_siglist[_NSIG]; | 17 | extern const char * const __sys_siglist[_NSIG] attribute_hidden; |
| 18 | libc_hidden_proto (__sys_siglist) | 18 | extern const char * const __sys_sigabbrev[_NSIG] attribute_hidden; |
| 19 | extern const char * const __sys_sigabbrev[_NSIG]; | ||
| 20 | libc_hidden_proto (__sys_sigabbrev) | ||
| 21 | 19 | ||
| 22 | /* Now define the internal interfaces. */ | 20 | /* Now define the internal interfaces. */ |
| 23 | extern __sighandler_t __bsd_signal (int __sig, __sighandler_t __handler); | 21 | extern __sighandler_t __bsd_signal (int __sig, __sighandler_t __handler); |
lib/libc/glibc/include/stap-probe.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Macros for defining Systemtap <sys/sdt.h> static probe points. | 1 | /* Macros for defining Systemtap <sys/sdt.h> static probe points. |
| 2 | Copyright (C) 2012-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/include/stdlib.h+53-2| ... | @@ -1,6 +1,7 @@ | ... | @@ -1,6 +1,7 @@ |
| 1 | #ifndef _STDLIB_H | 1 | #ifndef _STDLIB_H |
| 2 | 2 | ||
| 3 | #ifndef _ISOMAC | 3 | #ifndef _ISOMAC |
| 4 | # include <stdbool.h> | ||
| 4 | # include <stddef.h> | 5 | # include <stddef.h> |
| 5 | #endif | 6 | #endif |
| 6 | 7 | ||
| ... | @@ -35,6 +36,45 @@ libc_hidden_proto (__strtod_l) | ... | @@ -35,6 +36,45 @@ libc_hidden_proto (__strtod_l) |
| 35 | libc_hidden_proto (__strtof_l) | 36 | libc_hidden_proto (__strtof_l) |
| 36 | libc_hidden_proto (__strtold_l) | 37 | libc_hidden_proto (__strtold_l) |
| 37 | 38 | ||
| 39 | extern __typeof (strtol) __isoc23_strtol __attribute_copy__ (strtol); | ||
| 40 | extern __typeof (strtoul) __isoc23_strtoul __attribute_copy__ (strtoul); | ||
| 41 | extern __typeof (strtoll) __isoc23_strtoll __attribute_copy__ (strtoll); | ||
| 42 | extern __typeof (strtoull) __isoc23_strtoull __attribute_copy__ (strtoull); | ||
| 43 | extern __typeof (strtol_l) __isoc23_strtol_l __attribute_copy__ (strtol_l); | ||
| 44 | extern __typeof (strtoul_l) __isoc23_strtoul_l __attribute_copy__ (strtoul_l); | ||
| 45 | extern __typeof (strtoll_l) __isoc23_strtoll_l __attribute_copy__ (strtoll_l); | ||
| 46 | extern __typeof (strtoull_l) __isoc23_strtoull_l __attribute_copy__ (strtoull_l); | ||
| 47 | libc_hidden_proto (__isoc23_strtol) | ||
| 48 | libc_hidden_proto (__isoc23_strtoul) | ||
| 49 | libc_hidden_proto (__isoc23_strtoll) | ||
| 50 | libc_hidden_proto (__isoc23_strtoull) | ||
| 51 | libc_hidden_proto (__isoc23_strtol_l) | ||
| 52 | libc_hidden_proto (__isoc23_strtoul_l) | ||
| 53 | libc_hidden_proto (__isoc23_strtoll_l) | ||
| 54 | libc_hidden_proto (__isoc23_strtoull_l) | ||
| 55 | |||
| 56 | #if __GLIBC_USE (C2X_STRTOL) | ||
| 57 | /* Redirect internal uses of these functions to the C2X versions; the | ||
| 58 | redirection in the installed header does not work with | ||
| 59 | libc_hidden_proto. */ | ||
| 60 | # undef strtol | ||
| 61 | # define strtol __isoc23_strtol | ||
| 62 | # undef strtoul | ||
| 63 | # define strtoul __isoc23_strtoul | ||
| 64 | # undef strtoll | ||
| 65 | # define strtoll __isoc23_strtoll | ||
| 66 | # undef strtoull | ||
| 67 | # define strtoull __isoc23_strtoull | ||
| 68 | # undef strtol_l | ||
| 69 | # define strtol_l __isoc23_strtol_l | ||
| 70 | # undef strtoul_l | ||
| 71 | # define strtoul_l __isoc23_strtoul_l | ||
| 72 | # undef strtoll_l | ||
| 73 | # define strtoll_l __isoc23_strtoll_l | ||
| 74 | # undef strtoull_l | ||
| 75 | # define strtoull_l __isoc23_strtoull_l | ||
| 76 | #endif | ||
| 77 | |||
| 38 | libc_hidden_proto (exit) | 78 | libc_hidden_proto (exit) |
| 39 | libc_hidden_proto (abort) | 79 | libc_hidden_proto (abort) |
| 40 | libc_hidden_proto (getenv) | 80 | libc_hidden_proto (getenv) |
| ... | @@ -144,6 +184,15 @@ libc_hidden_proto (__ptsname_r) | ... | @@ -144,6 +184,15 @@ libc_hidden_proto (__ptsname_r) |
| 144 | libc_hidden_proto (grantpt) | 184 | libc_hidden_proto (grantpt) |
| 145 | libc_hidden_proto (unlockpt) | 185 | libc_hidden_proto (unlockpt) |
| 146 | 186 | ||
| 187 | __typeof (arc4random) __arc4random; | ||
| 188 | libc_hidden_proto (__arc4random); | ||
| 189 | __typeof (arc4random_buf) __arc4random_buf; | ||
| 190 | libc_hidden_proto (__arc4random_buf); | ||
| 191 | __typeof (arc4random_uniform) __arc4random_uniform; | ||
| 192 | libc_hidden_proto (__arc4random_uniform); | ||
| 193 | extern void __arc4random_buf_internal (void *buffer, size_t len) | ||
| 194 | attribute_hidden; | ||
| 195 | |||
| 147 | extern double __strtod_internal (const char *__restrict __nptr, | 196 | extern double __strtod_internal (const char *__restrict __nptr, |
| 148 | 				 char **__restrict __endptr, int __group) | 197 | 				 char **__restrict __endptr, int __group) |
| 149 | __THROW __nonnull ((1)) __wur; | 198 | __THROW __nonnull ((1)) __wur; |
| ... | @@ -193,23 +242,25 @@ extern long double ____strtold_l_internal (const char *__restrict __nptr, | ... | @@ -193,23 +242,25 @@ extern long double ____strtold_l_internal (const char *__restrict __nptr, |
| 193 | extern long int ____strtol_l_internal (const char *__restrict __nptr, | 242 | extern long int ____strtol_l_internal (const char *__restrict __nptr, |
| 194 | 				 char **__restrict __endptr, | 243 | 				 char **__restrict __endptr, |
| 195 | 				 int __base, int __group, | 244 | 				 int __base, int __group, |
| 196 | 				 locale_t __loc); | 245 | 				 bool __bin_cst, locale_t __loc); |
| 197 | extern unsigned long int ____strtoul_l_internal (const char * | 246 | extern unsigned long int ____strtoul_l_internal (const char * |
| 198 | 						 __restrict __nptr, | 247 | 						 __restrict __nptr, |
| 199 | 						 char **__restrict __endptr, | 248 | 						 char **__restrict __endptr, |
| 200 | 						 int __base, int __group, | 249 | 						 int __base, int __group, |
| 250 | 						 bool __bin_cst, | ||
| 201 | 						 locale_t __loc); | 251 | 						 locale_t __loc); |
| 202 | __extension__ | 252 | __extension__ |
| 203 | extern long long int ____strtoll_l_internal (const char *__restrict __nptr, | 253 | extern long long int ____strtoll_l_internal (const char *__restrict __nptr, |
| 204 | 					 char **__restrict __endptr, | 254 | 					 char **__restrict __endptr, |
| 205 | 					 int __base, int __group, | 255 | 					 int __base, int __group, |
| 206 | 					 locale_t __loc); | 256 | 					 bool __bin_cst, locale_t __loc); |
| 207 | __extension__ | 257 | __extension__ |
| 208 | extern unsigned long long int ____strtoull_l_internal (const char * | 258 | extern unsigned long long int ____strtoull_l_internal (const char * |
| 209 | 						 __restrict __nptr, | 259 | 						 __restrict __nptr, |
| 210 | 						 char ** | 260 | 						 char ** |
| 211 | 						 __restrict __endptr, | 261 | 						 __restrict __endptr, |
| 212 | 						 int __base, int __group, | 262 | 						 int __base, int __group, |
| 263 | 						 bool __bin_cst, | ||
| 213 | 						 locale_t __loc); | 264 | 						 locale_t __loc); |
| 214 | 265 | ||
| 215 | libc_hidden_proto (____strtof_l_internal) | 266 | libc_hidden_proto (____strtof_l_internal) |
lib/libc/glibc/include/sys/cdefs.h+21| ... | @@ -1,5 +1,12 @@ | ... | @@ -1,5 +1,12 @@ |
| 1 | #ifndef _SYS_CDEFS_H | 1 | #ifndef _SYS_CDEFS_H |
| 2 | 2 | ||
| 3 | /* This is outside of _ISOMAC to enforce that _Static_assert always | ||
| 4 | uses the two-argument form. This can be removed once the minimum | ||
| 5 | GCC version used to compile glibc is GCC 9.1. */ | ||
| 6 | #ifndef __cplusplus | ||
| 7 | # define _Static_assert(expr, diagnostic) _Static_assert (expr, diagnostic) | ||
| 8 | #endif | ||
| 9 | |||
| 3 | #include <misc/sys/cdefs.h> | 10 | #include <misc/sys/cdefs.h> |
| 4 | 11 | ||
| 5 | #ifndef _ISOMAC | 12 | #ifndef _ISOMAC |
| ... | @@ -33,6 +40,20 @@ rtld_hidden_proto (__chk_fail) | ... | @@ -33,6 +40,20 @@ rtld_hidden_proto (__chk_fail) |
| 33 | 40 | ||
| 34 | #endif | 41 | #endif |
| 35 | 42 | ||
| 43 | #if defined SHARED | ||
| 44 | #if IS_IN (libc) && __USE_FORTIFY_LEVEL > 0 && defined __fortify_function | ||
| 45 | |||
| 46 | #undef __REDIRECT_FORTIFY | ||
| 47 | #define __REDIRECT_FORTIFY(name, proto, alias) \ | ||
| 48 | __REDIRECT(name, proto, __GI_##alias) | ||
| 49 | |||
| 50 | #undef __REDIRECT_FORTIFY_NTH | ||
| 51 | #define __REDIRECT_FORTIFY_NTH(name, proto, alias) \ | ||
| 52 | __REDIRECT_NTH(name, proto, __GI_##alias) | ||
| 53 | |||
| 54 | #endif | ||
| 55 | #endif /* defined SHARED */ | ||
| 56 | |||
| 36 | #endif /* !defined _ISOMAC */ | 57 | #endif /* !defined _ISOMAC */ |
| 37 | 58 | ||
| 38 | #endif | 59 | #endif |
lib/libc/glibc/include/sys/select.h+4| ... | @@ -3,6 +3,10 @@ | ... | @@ -3,6 +3,10 @@ |
| 3 | 3 | ||
| 4 | #ifndef _ISOMAC | 4 | #ifndef _ISOMAC |
| 5 | /* Now define the internal interfaces. */ | 5 | /* Now define the internal interfaces. */ |
| 6 | |||
| 7 | #include <bits/select-decl.h> | ||
| 8 | libc_hidden_proto (__fdelt_chk) | ||
| 9 | |||
| 6 | # if __TIMESIZE == 64 | 10 | # if __TIMESIZE == 64 |
| 7 | # define __pselect64 __pselect | 11 | # define __pselect64 __pselect |
| 8 | # define __select64 __select | 12 | # define __select64 __select |
lib/libc/glibc/include/sys/stat.h+2| ... | @@ -66,10 +66,12 @@ hidden_proto (__fstatat64_time64); | ... | @@ -66,10 +66,12 @@ hidden_proto (__fstatat64_time64); |
| 66 | extern int __chmod (const char *__file, __mode_t __mode); | 66 | extern int __chmod (const char *__file, __mode_t __mode); |
| 67 | libc_hidden_proto (__chmod) | 67 | libc_hidden_proto (__chmod) |
| 68 | extern int __fchmod (int __fd, __mode_t __mode); | 68 | extern int __fchmod (int __fd, __mode_t __mode); |
| 69 | extern int __fchmodat (int __fd, const char *__file, mode_t __mode, int __flag); | ||
| 69 | libc_hidden_proto (fchmodat) | 70 | libc_hidden_proto (fchmodat) |
| 70 | extern __mode_t __umask (__mode_t __mask); | 71 | extern __mode_t __umask (__mode_t __mask); |
| 71 | extern int __mkdir (const char *__path, __mode_t __mode); | 72 | extern int __mkdir (const char *__path, __mode_t __mode); |
| 72 | libc_hidden_proto (__mkdir) | 73 | libc_hidden_proto (__mkdir) |
| 74 | extern int __mkdirat (int __fd, const char *__path, mode_t __mode); | ||
| 73 | 75 | ||
| 74 | extern int __mknodat (int fd, const char *path, mode_t mode, dev_t dev); | 76 | extern int __mknodat (int fd, const char *path, mode_t mode, dev_t dev); |
| 75 | libc_hidden_proto (__mknodat); | 77 | libc_hidden_proto (__mknodat); |
lib/libc/glibc/io/bits/statx.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* statx-related definitions and declarations. Generic version. | 1 | /* statx-related definitions and declarations. Generic version. |
| 2 | Copyright (C) 2018-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2018-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/io/fcntl.h+5-12| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1991-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1991-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -167,10 +167,6 @@ typedef __pid_t pid_t; | ... | @@ -167,10 +167,6 @@ typedef __pid_t pid_t; |
| 167 | 					 effective IDs, not real IDs. */ | 167 | 					 effective IDs, not real IDs. */ |
| 168 | #endif | 168 | #endif |
| 169 | 169 | ||
| 170 | |||
| 171 | /* fcntl was a simple symbol until glibc 2.27 inclusive. glibc 2.28 onwards | ||
| 172 | * re-defines it to fcntl64 (via #define) if _FILE_OFFSET_BITS == 64. */ | ||
| 173 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 28) || __GLIBC__ > 2 | ||
| 174 | /* Do the file control operation described by CMD on FD. | 170 | /* Do the file control operation described by CMD on FD. |
| 175 | The remaining arguments are interpreted depending on CMD. | 171 | The remaining arguments are interpreted depending on CMD. |
| 176 | 172 | ||
| ... | @@ -191,19 +187,16 @@ extern int fcntl64 (int __fd, int __cmd, ...); | ... | @@ -191,19 +187,16 @@ extern int fcntl64 (int __fd, int __cmd, ...); |
| 191 | # endif | 187 | # endif |
| 192 | #else /* __USE_TIME_BITS64 */ | 188 | #else /* __USE_TIME_BITS64 */ |
| 193 | # ifdef __REDIRECT | 189 | # ifdef __REDIRECT |
| 194 | extern int __REDIRECT (fcntl, (int __fd, int __request, ...), | 190 | extern int __REDIRECT_NTH (fcntl, (int __fd, int __request, ...), |
| 195 | 		 __fcntl_time64) __THROW; | 191 | 			 __fcntl_time64); |
| 196 | extern int __REDIRECT (fcntl64, (int __fd, int __request, ...), | 192 | extern int __REDIRECT_NTH (fcntl64, (int __fd, int __request, ...), |
| 197 | 		 __fcntl_time64) __THROW; | 193 | 			 __fcntl_time64); |
| 198 | # else | 194 | # else |
| 199 | extern int __fcntl_time64 (int __fd, int __request, ...) __THROW; | 195 | extern int __fcntl_time64 (int __fd, int __request, ...) __THROW; |
| 200 | # define fcntl64 __fcntl_time64 | 196 | # define fcntl64 __fcntl_time64 |
| 201 | # define fcntl __fcntl_time64 | 197 | # define fcntl __fcntl_time64 |
| 202 | # endif | 198 | # endif |
| 203 | #endif | 199 | #endif |
| 204 | #else /* glibc 2.27 or lower */ | ||
| 205 | extern int fcntl (int __fd, int __cmd, ...); | ||
| 206 | #endif | ||
| 207 | 200 | ||
| 208 | /* Open FILE and return a new file descriptor for it, or -1 on error. | 201 | /* Open FILE and return a new file descriptor for it, or -1 on error. |
| 209 | OFLAG determines the type of access used. If O_CREAT or O_TMPFILE is set | 202 | OFLAG determines the type of access used. If O_CREAT or O_TMPFILE is set |
lib/libc/glibc/io/mknod.c+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1995-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/io/sys/stat.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1991-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1991-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/locale/bits/types/__locale_t.h+1-2| ... | @@ -1,7 +1,6 @@ | ... | @@ -1,7 +1,6 @@ |
| 1 | /* Definition of struct __locale_struct and __locale_t. | 1 | /* Definition of struct __locale_struct and __locale_t. |
| 2 | Copyright (C) 1997-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1997-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. | ||
| 5 | 4 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 7 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
lib/libc/glibc/locale/bits/types/locale_t.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Definition of locale_t. | 1 | /* Definition of locale_t. |
| 2 | Copyright (C) 2017-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/misc/sys/cdefs.h+104-16| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | /* Copyright (C) 1992-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 2 | Copyright The GNU Toolchain Authors. | ||
| 2 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 3 | 4 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -26,8 +27,8 @@ | ... | @@ -26,8 +27,8 @@ |
| 26 | /* The GNU libc does not support any K&R compilers or the traditional mode | 27 | /* The GNU libc does not support any K&R compilers or the traditional mode |
| 27 | of ISO C compilers anymore. Check for some of the combinations not | 28 | of ISO C compilers anymore. Check for some of the combinations not |
| 28 | supported anymore. */ | 29 | supported anymore. */ |
| 29 | #if defined __GNUC__ && !defined __STDC__ | 30 | #if defined __GNUC__ && !defined __STDC__ && !defined __cplusplus |
| 30 | # error "You need a ISO C conforming compiler to use the glibc headers" | 31 | # error "You need a ISO C or C++ conforming compiler to use the glibc headers" |
| 31 | #endif | 32 | #endif |
| 32 | 33 | ||
| 33 | /* Some user header file might have defined this before. */ | 34 | /* Some user header file might have defined this before. */ |
| ... | @@ -80,7 +81,7 @@ | ... | @@ -80,7 +81,7 @@ |
| 80 | # define __NTH(fct)	__attribute__ ((__nothrow__ __LEAF)) fct | 81 | # define __NTH(fct)	__attribute__ ((__nothrow__ __LEAF)) fct |
| 81 | # define __NTHNL(fct) __attribute__ ((__nothrow__)) fct | 82 | # define __NTHNL(fct) __attribute__ ((__nothrow__)) fct |
| 82 | # else | 83 | # else |
| 83 | # if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major >= 4) | 84 | # if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major__ >= 4) |
| 84 | # if __cplusplus >= 201103L | 85 | # if __cplusplus >= 201103L |
| 85 | # define __THROW	noexcept (true) | 86 | # define __THROW	noexcept (true) |
| 86 | # else | 87 | # else |
| ... | @@ -97,6 +98,12 @@ | ... | @@ -97,6 +98,12 @@ |
| 97 | # endif | 98 | # endif |
| 98 | # endif | 99 | # endif |
| 99 | 100 | ||
| 101 | # if __GNUC_PREREQ (4, 3) || __glibc_has_attribute (__cold__) | ||
| 102 | # define __COLD	__attribute__ ((__cold__)) | ||
| 103 | # else | ||
| 104 | # define __COLD | ||
| 105 | # endif | ||
| 106 | |||
| 100 | #else	/* Not GCC or clang. */ | 107 | #else	/* Not GCC or clang. */ |
| 101 | 108 | ||
| 102 | # if (defined __cplusplus						\ | 109 | # if (defined __cplusplus						\ |
| ... | @@ -109,6 +116,7 @@ | ... | @@ -109,6 +116,7 @@ |
| 109 | # define __THROW | 116 | # define __THROW |
| 110 | # define __THROWNL | 117 | # define __THROWNL |
| 111 | # define __NTH(fct)	fct | 118 | # define __NTH(fct)	fct |
| 119 | # define __COLD | ||
| 112 | 120 | ||
| 113 | #endif	/* GCC || clang. */ | 121 | #endif	/* GCC || clang. */ |
| 114 | 122 | ||
| ... | @@ -142,7 +150,8 @@ | ... | @@ -142,7 +150,8 @@ |
| 142 | #define __bos0(ptr) __builtin_object_size (ptr, 0) | 150 | #define __bos0(ptr) __builtin_object_size (ptr, 0) |
| 143 | 151 | ||
| 144 | /* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. */ | 152 | /* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. */ |
| 145 | #if __USE_FORTIFY_LEVEL == 3 && __glibc_clang_prereq (9, 0) | 153 | #if __USE_FORTIFY_LEVEL == 3 && (__glibc_clang_prereq (9, 0)		 \ |
| 154 | 				 || __GNUC_PREREQ (12, 0)) | ||
| 146 | # define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0) | 155 | # define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0) |
| 147 | # define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1) | 156 | # define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1) |
| 148 | #else | 157 | #else |
| ... | @@ -150,6 +159,55 @@ | ... | @@ -150,6 +159,55 @@ |
| 150 | # define __glibc_objsize(__o) __bos (__o) | 159 | # define __glibc_objsize(__o) __bos (__o) |
| 151 | #endif | 160 | #endif |
| 152 | 161 | ||
| 162 | #if __USE_FORTIFY_LEVEL > 0 | ||
| 163 | /* Compile time conditions to choose between the regular, _chk and _chk_warn | ||
| 164 | variants. These conditions should get evaluated to constant and optimized | ||
| 165 | away. */ | ||
| 166 | |||
| 167 | #define __glibc_safe_len_cond(__l, __s, __osz) ((__l) <= (__osz) / (__s)) | ||
| 168 | #define __glibc_unsigned_or_positive(__l) \ | ||
| 169 | ((__typeof (__l)) 0 < (__typeof (__l)) -1				 \ | ||
| 170 | || (__builtin_constant_p (__l) && (__l) > 0)) | ||
| 171 | |||
| 172 | /* Length is known to be safe at compile time if the __L * __S <= __OBJSZ | ||
| 173 | condition can be folded to a constant and if it is true, or unknown (-1) */ | ||
| 174 | #define __glibc_safe_or_unknown_len(__l, __s, __osz) \ | ||
| 175 | ((__builtin_constant_p (__osz) && (__osz) == (__SIZE_TYPE__) -1)	 \ | ||
| 176 | || (__glibc_unsigned_or_positive (__l)				 \ | ||
| 177 | && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \ | ||
| 178 | 						 (__s), (__osz)))	 \ | ||
| 179 | && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), (__s), (__osz)))) | ||
| 180 | |||
| 181 | /* Conversely, we know at compile time that the length is unsafe if the | ||
| 182 | __L * __S <= __OBJSZ condition can be folded to a constant and if it is | ||
| 183 | false. */ | ||
| 184 | #define __glibc_unsafe_len(__l, __s, __osz) \ | ||
| 185 | (__glibc_unsigned_or_positive (__l)					 \ | ||
| 186 | && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \ | ||
| 187 | 						 __s, __osz))		 \ | ||
| 188 | && !__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz)) | ||
| 189 | |||
| 190 | /* Fortify function f. __f_alias, __f_chk and __f_chk_warn must be | ||
| 191 | declared. */ | ||
| 192 | |||
| 193 | #define __glibc_fortify(f, __l, __s, __osz, ...) \ | ||
| 194 | (__glibc_safe_or_unknown_len (__l, __s, __osz)			 \ | ||
| 195 | ? __ ## f ## _alias (__VA_ARGS__)					 \ | ||
| 196 | : (__glibc_unsafe_len (__l, __s, __osz)				 \ | ||
| 197 | ? __ ## f ## _chk_warn (__VA_ARGS__, __osz)			 \ | ||
| 198 | : __ ## f ## _chk (__VA_ARGS__, __osz))) | ||
| 199 | |||
| 200 | /* Fortify function f, where object size argument passed to f is the number of | ||
| 201 | elements and not total size. */ | ||
| 202 | |||
| 203 | #define __glibc_fortify_n(f, __l, __s, __osz, ...) \ | ||
| 204 | (__glibc_safe_or_unknown_len (__l, __s, __osz)			 \ | ||
| 205 | ? __ ## f ## _alias (__VA_ARGS__)					 \ | ||
| 206 | : (__glibc_unsafe_len (__l, __s, __osz)				 \ | ||
| 207 | ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s))		 \ | ||
| 208 | : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s)))) | ||
| 209 | #endif | ||
| 210 | |||
| 153 | #if __GNUC_PREREQ (4,3) | 211 | #if __GNUC_PREREQ (4,3) |
| 154 | # define __warnattr(msg) __attribute__((__warning__ (msg))) | 212 | # define __warnattr(msg) __attribute__((__warning__ (msg))) |
| 155 | # define __errordecl(name, msg) \ | 213 | # define __errordecl(name, msg) \ |
| ... | @@ -210,6 +268,14 @@ | ... | @@ -210,6 +268,14 @@ |
| 210 | # define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) | 268 | # define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) |
| 211 | # define __ASMNAME2(prefix, cname) __STRING (prefix) cname | 269 | # define __ASMNAME2(prefix, cname) __STRING (prefix) cname |
| 212 | 270 | ||
| 271 | #ifndef __REDIRECT_FORTIFY | ||
| 272 | #define __REDIRECT_FORTIFY __REDIRECT | ||
| 273 | #endif | ||
| 274 | |||
| 275 | #ifndef __REDIRECT_FORTIFY_NTH | ||
| 276 | #define __REDIRECT_FORTIFY_NTH __REDIRECT_NTH | ||
| 277 | #endif | ||
| 278 | |||
| 213 | /* | 279 | /* |
| 214 | #elif __SOME_OTHER_COMPILER__ | 280 | #elif __SOME_OTHER_COMPILER__ |
| 215 | 281 | ||
| ... | @@ -243,6 +309,15 @@ | ... | @@ -243,6 +309,15 @@ |
| 243 | # define __attribute_alloc_size__(params) /* Ignore. */ | 309 | # define __attribute_alloc_size__(params) /* Ignore. */ |
| 244 | #endif | 310 | #endif |
| 245 | 311 | ||
| 312 | /* Tell the compiler which argument to an allocation function | ||
| 313 | indicates the alignment of the allocation. */ | ||
| 314 | #if __GNUC_PREREQ (4, 9) || __glibc_has_attribute (__alloc_align__) | ||
| 315 | # define __attribute_alloc_align__(param) \ | ||
| 316 | __attribute__ ((__alloc_align__ param)) | ||
| 317 | #else | ||
| 318 | # define __attribute_alloc_align__(param) /* Ignore. */ | ||
| 319 | #endif | ||
| 320 | |||
| 246 | /* At some point during the gcc 2.96 development the `pure' attribute | 321 | /* At some point during the gcc 2.96 development the `pure' attribute |
| 247 | for functions was introduced. We don't want to use it unconditionally | 322 | for functions was introduced. We don't want to use it unconditionally |
| 248 | (although this would be possible) since it generates warnings. */ | 323 | (although this would be possible) since it generates warnings. */ |
| ... | @@ -318,16 +393,18 @@ | ... | @@ -318,16 +393,18 @@ |
| 318 | #endif | 393 | #endif |
| 319 | 394 | ||
| 320 | /* The nonnull function attribute marks pointer parameters that | 395 | /* The nonnull function attribute marks pointer parameters that |
| 321 | must not be NULL. */ | 396 | must not be NULL. This has the name __nonnull in glibc, |
| 322 | #ifndef __nonnull | 397 | and __attribute_nonnull__ in files shared with Gnulib to avoid |
| 398 | collision with a different __nonnull in DragonFlyBSD 5.9. */ | ||
| 399 | #ifndef __attribute_nonnull__ | ||
| 323 | # if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__) | 400 | # if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__) |
| 324 | # define __nonnull(params) __attribute__ ((__nonnull__ params)) | 401 | # define __attribute_nonnull__(params) __attribute__ ((__nonnull__ params)) |
| 325 | # else | 402 | # else |
| 326 | # define __nonnull(params) | 403 | # define __attribute_nonnull__(params) |
| 327 | # endif | 404 | # endif |
| 328 | #elif !defined __GLIBC__ | 405 | #endif |
| 329 | # undef __nonnull | 406 | #ifndef __nonnull |
| 330 | # define __nonnull(params) _GL_ATTRIBUTE_NONNULL (params) | 407 | # define __nonnull(params) __attribute_nonnull__ (params) |
| 331 | #endif | 408 | #endif |
| 332 | 409 | ||
| 333 | /* The returns_nonnull function attribute marks the return type of the function | 410 | /* The returns_nonnull function attribute marks the return type of the function |
| ... | @@ -493,9 +570,9 @@ | ... | @@ -493,9 +570,9 @@ |
| 493 | [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })] | 570 | [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })] |
| 494 | #endif | 571 | #endif |
| 495 | 572 | ||
| 496 | /* The #ifndef lets Gnulib avoid including these on non-glibc | 573 | /* Gnulib avoids including these, as they don't work on non-glibc or |
| 497 | platforms, where the includes typically do not exist. */ | 574 | older glibc platforms. */ |
| 498 | #ifdef __GLIBC__ | 575 | #ifndef __GNULIB_CDEFS |
| 499 | # include <bits/wordsize.h> | 576 | # include <bits/wordsize.h> |
| 500 | # include <bits/long-double.h> | 577 | # include <bits/long-double.h> |
| 501 | #endif | 578 | #endif |
| ... | @@ -507,6 +584,8 @@ | ... | @@ -507,6 +584,8 @@ |
| 507 | # define __LDBL_REDIR(name, proto) ... unused__ldbl_redir | 584 | # define __LDBL_REDIR(name, proto) ... unused__ldbl_redir |
| 508 | # define __LDBL_REDIR_DECL(name) \ | 585 | # define __LDBL_REDIR_DECL(name) \ |
| 509 | extern __typeof (name) name __asm (__ASMNAME ("__" #name "ieee128")); | 586 | extern __typeof (name) name __asm (__ASMNAME ("__" #name "ieee128")); |
| 587 | # define __REDIRECT_LDBL(name, proto, alias) \ | ||
| 588 | name proto __asm (__ASMNAME ("__" #alias "ieee128")) | ||
| 510 | 589 | ||
| 511 | /* Alias name defined automatically, with leading underscores. */ | 590 | /* Alias name defined automatically, with leading underscores. */ |
| 512 | # define __LDBL_REDIR2_DECL(name) \ | 591 | # define __LDBL_REDIR2_DECL(name) \ |
| ... | @@ -524,7 +603,6 @@ | ... | @@ -524,7 +603,6 @@ |
| 524 | __LDBL_REDIR1_NTH (name, proto, __##alias##ieee128) | 603 | __LDBL_REDIR1_NTH (name, proto, __##alias##ieee128) |
| 525 | 604 | ||
| 526 | /* Unused. */ | 605 | /* Unused. */ |
| 527 | # define __REDIRECT_LDBL(name, proto, alias) ... unused__redirect_ldbl | ||
| 528 | # define __LDBL_REDIR_NTH(name, proto) ... unused__ldbl_redir_nth | 606 | # define __LDBL_REDIR_NTH(name, proto) ... unused__ldbl_redir_nth |
| 529 | 607 | ||
| 530 | # else | 608 | # else |
| ... | @@ -603,12 +681,22 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf | ... | @@ -603,12 +681,22 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf |
| 603 | size-index is not provided: | 681 | size-index is not provided: |
| 604 | access (access-mode, <ref-index> [, <size-index>]) */ | 682 | access (access-mode, <ref-index> [, <size-index>]) */ |
| 605 | # define __attr_access(x) __attribute__ ((__access__ x)) | 683 | # define __attr_access(x) __attribute__ ((__access__ x)) |
| 684 | /* For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may | ||
| 685 | use the access attribute to get object sizes from function definition | ||
| 686 | arguments, so we can't use them on functions we fortify. Drop the object | ||
| 687 | size hints for such functions. */ | ||
| 688 | # if __USE_FORTIFY_LEVEL == 3 | ||
| 689 | # define __fortified_attr_access(a, o, s) __attribute__ ((__access__ (a, o))) | ||
| 690 | # else | ||
| 691 | # define __fortified_attr_access(a, o, s) __attr_access ((a, o, s)) | ||
| 692 | # endif | ||
| 606 | # if __GNUC_PREREQ (11, 0) | 693 | # if __GNUC_PREREQ (11, 0) |
| 607 | # define __attr_access_none(argno) __attribute__ ((__access__ (__none__, argno))) | 694 | # define __attr_access_none(argno) __attribute__ ((__access__ (__none__, argno))) |
| 608 | # else | 695 | # else |
| 609 | # define __attr_access_none(argno) | 696 | # define __attr_access_none(argno) |
| 610 | # endif | 697 | # endif |
| 611 | #else | 698 | #else |
| 699 | # define __fortified_attr_access(a, o, s) | ||
| 612 | # define __attr_access(x) | 700 | # define __attr_access(x) |
| 613 | # define __attr_access_none(argno) | 701 | # define __attr_access_none(argno) |
| 614 | #endif | 702 | #endif |
lib/libc/glibc/misc/sys/select.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* `fd_set' type and related macros, and `select'/`pselect' declarations. | 1 | /* `fd_set' type and related macros, and `select'/`pselect' declarations. |
| 2 | Copyright (C) 1996-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1996-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/posix/bits/cpu-set.h+1-1| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993 | 1 | /* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993 |
| 2 | scheduling interface. | 2 | scheduling interface. |
| 3 | Copyright (C) 1996-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 1996-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/posix/bits/types.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* bits/types.h -- definitions of __*_t types underlying *_t types. | 1 | /* bits/types.h -- definitions of __*_t types underlying *_t types. |
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/posix/sys/types.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1991-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1991-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/signal/signal.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1991-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1991-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/stdlib/alloca.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1992-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/stdlib/bits/stdlib-float.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Floating-point inline functions for stdlib.h. | 1 | /* Floating-point inline functions for stdlib.h. |
| 2 | Copyright (C) 2012-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/stdlib/errno.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1991-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1991-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/stdlib/exit.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1991-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1991-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/stdlib/stdlib.h+139-4| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | /* Copyright (C) 1991-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1991-2023 Free Software Foundation, Inc. |
| 2 | Copyright The GNU Toolchain Authors. | ||
| 2 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 3 | 4 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -207,6 +208,71 @@ extern unsigned long long int strtoull (const char *__restrict __nptr, | ... | @@ -207,6 +208,71 @@ extern unsigned long long int strtoull (const char *__restrict __nptr, |
| 207 | __THROW __nonnull ((1)); | 208 | __THROW __nonnull ((1)); |
| 208 | #endif /* ISO C99 or use MISC. */ | 209 | #endif /* ISO C99 or use MISC. */ |
| 209 | 210 | ||
| 211 | /* Versions of the above functions that handle '0b' and '0B' prefixes | ||
| 212 | in base 0 or 2. */ | ||
| 213 | #if __GLIBC_USE (C2X_STRTOL) | ||
| 214 | # ifdef __REDIRECT | ||
| 215 | extern long int __REDIRECT_NTH (strtol, (const char *__restrict __nptr, | ||
| 216 | 					 char **__restrict __endptr, | ||
| 217 | 					 int __base), __isoc23_strtol) | ||
| 218 | __nonnull ((1)); | ||
| 219 | extern unsigned long int __REDIRECT_NTH (strtoul, | ||
| 220 | 					 (const char *__restrict __nptr, | ||
| 221 | 					 char **__restrict __endptr, | ||
| 222 | 					 int __base), __isoc23_strtoul) | ||
| 223 | __nonnull ((1)); | ||
| 224 | # ifdef __USE_MISC | ||
| 225 | __extension__ | ||
| 226 | extern long long int __REDIRECT_NTH (strtoq, (const char *__restrict __nptr, | ||
| 227 | 					 char **__restrict __endptr, | ||
| 228 | 					 int __base), __isoc23_strtoll) | ||
| 229 | __nonnull ((1)); | ||
| 230 | __extension__ | ||
| 231 | extern unsigned long long int __REDIRECT_NTH (strtouq, | ||
| 232 | 					 (const char *__restrict __nptr, | ||
| 233 | 					 char **__restrict __endptr, | ||
| 234 | 					 int __base), __isoc23_strtoull) | ||
| 235 | __nonnull ((1)); | ||
| 236 | # endif | ||
| 237 | __extension__ | ||
| 238 | extern long long int __REDIRECT_NTH (strtoll, (const char *__restrict __nptr, | ||
| 239 | 					 char **__restrict __endptr, | ||
| 240 | 					 int __base), __isoc23_strtoll) | ||
| 241 | __nonnull ((1)); | ||
| 242 | __extension__ | ||
| 243 | extern unsigned long long int __REDIRECT_NTH (strtoull, | ||
| 244 | 					 (const char *__restrict __nptr, | ||
| 245 | 					 char **__restrict __endptr, | ||
| 246 | 					 int __base), __isoc23_strtoull) | ||
| 247 | __nonnull ((1)); | ||
| 248 | # else | ||
| 249 | extern long int __isoc23_strtol (const char *__restrict __nptr, | ||
| 250 | 				 char **__restrict __endptr, int __base) | ||
| 251 | __THROW __nonnull ((1)); | ||
| 252 | extern unsigned long int __isoc23_strtoul (const char *__restrict __nptr, | ||
| 253 | 					 char **__restrict __endptr, | ||
| 254 | 					 int __base) | ||
| 255 | __THROW __nonnull ((1)); | ||
| 256 | __extension__ | ||
| 257 | extern long long int __isoc23_strtoll (const char *__restrict __nptr, | ||
| 258 | 				 char **__restrict __endptr, int __base) | ||
| 259 | __THROW __nonnull ((1)); | ||
| 260 | __extension__ | ||
| 261 | extern unsigned long long int __isoc23_strtoull (const char *__restrict __nptr, | ||
| 262 | 						 char **__restrict __endptr, | ||
| 263 | 						 int __base) | ||
| 264 | __THROW __nonnull ((1)); | ||
| 265 | # define strtol __isoc23_strtol | ||
| 266 | # define strtoul __isoc23_strtoul | ||
| 267 | # ifdef __USE_MISC | ||
| 268 | # define strtoq __isoc23_strtoll | ||
| 269 | # define strtouq __isoc23_strtoull | ||
| 270 | # endif | ||
| 271 | # define strtoll __isoc23_strtoll | ||
| 272 | # define strtoull __isoc23_strtoull | ||
| 273 | # endif | ||
| 274 | #endif | ||
| 275 | |||
| 210 | /* Convert a floating-point number to a string. */ | 276 | /* Convert a floating-point number to a string. */ |
| 211 | #if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) | 277 | #if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) |
| 212 | extern int strfromd (char *__dest, size_t __size, const char *__format, | 278 | extern int strfromd (char *__dest, size_t __size, const char *__format, |
| ... | @@ -292,6 +358,60 @@ extern unsigned long long int strtoull_l (const char *__restrict __nptr, | ... | @@ -292,6 +358,60 @@ extern unsigned long long int strtoull_l (const char *__restrict __nptr, |
| 292 | 					 int __base, locale_t __loc) | 358 | 					 int __base, locale_t __loc) |
| 293 | __THROW __nonnull ((1, 4)); | 359 | __THROW __nonnull ((1, 4)); |
| 294 | 360 | ||
| 361 | /* Versions of the above functions that handle '0b' and '0B' prefixes | ||
| 362 | in base 0 or 2. */ | ||
| 363 | # if __GLIBC_USE (C2X_STRTOL) | ||
| 364 | # ifdef __REDIRECT | ||
| 365 | extern long int __REDIRECT_NTH (strtol_l, (const char *__restrict __nptr, | ||
| 366 | 					 char **__restrict __endptr, | ||
| 367 | 					 int __base, locale_t __loc), | ||
| 368 | 				__isoc23_strtol_l) | ||
| 369 | __nonnull ((1, 4)); | ||
| 370 | extern unsigned long int __REDIRECT_NTH (strtoul_l, | ||
| 371 | 					 (const char *__restrict __nptr, | ||
| 372 | 					 char **__restrict __endptr, | ||
| 373 | 					 int __base, locale_t __loc), | ||
| 374 | 					 __isoc23_strtoul_l) | ||
| 375 | __nonnull ((1, 4)); | ||
| 376 | __extension__ | ||
| 377 | extern long long int __REDIRECT_NTH (strtoll_l, (const char *__restrict __nptr, | ||
| 378 | 						 char **__restrict __endptr, | ||
| 379 | 						 int __base, | ||
| 380 | 						 locale_t __loc), | ||
| 381 | 				 __isoc23_strtoll_l) | ||
| 382 | __nonnull ((1, 4)); | ||
| 383 | __extension__ | ||
| 384 | extern unsigned long long int __REDIRECT_NTH (strtoull_l, | ||
| 385 | 					 (const char *__restrict __nptr, | ||
| 386 | 					 char **__restrict __endptr, | ||
| 387 | 					 int __base, locale_t __loc), | ||
| 388 | 					 __isoc23_strtoull_l) | ||
| 389 | __nonnull ((1, 4)); | ||
| 390 | # else | ||
| 391 | extern long int __isoc23_strtol_l (const char *__restrict __nptr, | ||
| 392 | 				 char **__restrict __endptr, int __base, | ||
| 393 | 				 locale_t __loc) __THROW __nonnull ((1, 4)); | ||
| 394 | extern unsigned long int __isoc23_strtoul_l (const char *__restrict __nptr, | ||
| 395 | 					 char **__restrict __endptr, | ||
| 396 | 					 int __base, locale_t __loc) | ||
| 397 | __THROW __nonnull ((1, 4)); | ||
| 398 | __extension__ | ||
| 399 | extern long long int __isoc23_strtoll_l (const char *__restrict __nptr, | ||
| 400 | 					 char **__restrict __endptr, | ||
| 401 | 					 int __base, locale_t __loc) | ||
| 402 | __THROW __nonnull ((1, 4)); | ||
| 403 | __extension__ | ||
| 404 | extern unsigned long long int __isoc23_strtoull_l (const char *__restrict __nptr, | ||
| 405 | 						 char **__restrict __endptr, | ||
| 406 | 						 int __base, locale_t __loc) | ||
| 407 | __THROW __nonnull ((1, 4)); | ||
| 408 | # define strtol_l __isoc23_strtol_l | ||
| 409 | # define strtoul_l __isoc23_strtoul_l | ||
| 410 | # define strtoll_l __isoc23_strtoll_l | ||
| 411 | # define strtoull_l __isoc23_strtoull_l | ||
| 412 | # endif | ||
| 413 | # endif | ||
| 414 | |||
| 295 | extern double strtod_l (const char *__restrict __nptr, | 415 | extern double strtod_l (const char *__restrict __nptr, |
| 296 | 			char **__restrict __endptr, locale_t __loc) | 416 | 			char **__restrict __endptr, locale_t __loc) |
| 297 | __THROW __nonnull ((1, 3)); | 417 | __THROW __nonnull ((1, 3)); |
| ... | @@ -532,6 +652,19 @@ extern int seed48_r (unsigned short int __seed16v[3], | ... | @@ -532,6 +652,19 @@ extern int seed48_r (unsigned short int __seed16v[3], |
| 532 | extern int lcong48_r (unsigned short int __param[7], | 652 | extern int lcong48_r (unsigned short int __param[7], |
| 533 | 		 struct drand48_data *__buffer) | 653 | 		 struct drand48_data *__buffer) |
| 534 | __THROW __nonnull ((1, 2)); | 654 | __THROW __nonnull ((1, 2)); |
| 655 | |||
| 656 | /* Return a random integer between zero and 2**32-1 (inclusive). */ | ||
| 657 | extern __uint32_t arc4random (void) | ||
| 658 | __THROW __wur; | ||
| 659 | |||
| 660 | /* Fill the buffer with random data. */ | ||
| 661 | extern void arc4random_buf (void *__buf, size_t __size) | ||
| 662 | __THROW __nonnull ((1)); | ||
| 663 | |||
| 664 | /* Return a random number between zero (inclusive) and the specified | ||
| 665 | limit (exclusive). */ | ||
| 666 | extern __uint32_t arc4random_uniform (__uint32_t __upper_bound) | ||
| 667 | __THROW __wur; | ||
| 535 | # endif	/* Use misc. */ | 668 | # endif	/* Use misc. */ |
| 536 | #endif	/* Use misc or X/Open. */ | 669 | #endif	/* Use misc or X/Open. */ |
| 537 | 670 | ||
| ... | @@ -589,7 +722,8 @@ extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) | ... | @@ -589,7 +722,8 @@ extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) |
| 589 | #ifdef __USE_ISOC11 | 722 | #ifdef __USE_ISOC11 |
| 590 | /* ISO C variant of aligned allocation. */ | 723 | /* ISO C variant of aligned allocation. */ |
| 591 | extern void *aligned_alloc (size_t __alignment, size_t __size) | 724 | extern void *aligned_alloc (size_t __alignment, size_t __size) |
| 592 | __THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur; | 725 | __THROW __attribute_malloc__ __attribute_alloc_align__ ((1)) |
| 726 | __attribute_alloc_size__ ((2)) __wur; | ||
| 593 | #endif | 727 | #endif |
| 594 | 728 | ||
| 595 | /* Abort execution and generate a core-dump. */ | 729 | /* Abort execution and generate a core-dump. */ |
| ... | @@ -943,7 +1077,8 @@ extern size_t mbstowcs (wchar_t *__restrict __pwcs, | ... | @@ -943,7 +1077,8 @@ extern size_t mbstowcs (wchar_t *__restrict __pwcs, |
| 943 | extern size_t wcstombs (char *__restrict __s, | 1077 | extern size_t wcstombs (char *__restrict __s, |
| 944 | 			const wchar_t *__restrict __pwcs, size_t __n) | 1078 | 			const wchar_t *__restrict __pwcs, size_t __n) |
| 945 | __THROW | 1079 | __THROW |
| 946 | __attr_access ((__write_only__, 1, 3)) __attr_access ((__read_only__, 2)); | 1080 | __fortified_attr_access (__write_only__, 1, 3) |
| 1081 | __attr_access ((__read_only__, 2)); | ||
| 947 | 1082 | ||
| 948 | #ifdef __USE_MISC | 1083 | #ifdef __USE_MISC |
| 949 | /* Determine whether the string value of RESPONSE matches the affirmation | 1084 | /* Determine whether the string value of RESPONSE matches the affirmation |
| ... | @@ -997,7 +1132,7 @@ extern char *ptsname (int __fd) __THROW __wur; | ... | @@ -997,7 +1132,7 @@ extern char *ptsname (int __fd) __THROW __wur; |
| 997 | terminal associated with the master FD is open on in BUF. | 1132 | terminal associated with the master FD is open on in BUF. |
| 998 | Return 0 on success, otherwise an error number. */ | 1133 | Return 0 on success, otherwise an error number. */ |
| 999 | extern int ptsname_r (int __fd, char *__buf, size_t __buflen) | 1134 | extern int ptsname_r (int __fd, char *__buf, size_t __buflen) |
| 1000 | __THROW __nonnull ((2)) __attr_access ((__write_only__, 2, 3)); | 1135 | __THROW __nonnull ((2)) __fortified_attr_access (__write_only__, 2, 3); |
| 1001 | 1136 | ||
| 1002 | /* Open a master pseudo terminal and return its file descriptor. */ | 1137 | /* Open a master pseudo terminal and return its file descriptor. */ |
| 1003 | extern int getpt (void); | 1138 | extern int getpt (void); |
lib/libc/glibc/string/bits/endian.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Endian macros for string.h functions | 1 | /* Endian macros for string.h functions |
| 2 | Copyright (C) 1992-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/string/endian.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1992-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/aarch64/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for AArch64. | 1 | /* Special .init and .fini section support for AArch64. |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 |
lib/libc/glibc/sysdeps/aarch64/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for AArch64. | 1 | /* Special .init and .fini section support for AArch64. |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 |
lib/libc/glibc/sysdeps/aarch64/dl-sysdep.h deleted-25| ... | @@ -1,25 +0,0 @@ | ||
| 1 | /* Copyright (C) 2002-2021 Free Software Foundation, Inc. | ||
| 2 | |||
| 3 | This file is part of the GNU C Library. | ||
| 4 | |||
| 5 | The GNU C Library is free software; you can redistribute it and/or | ||
| 6 | modify it under the terms of the GNU Lesser General Public License as | ||
| 7 | published by the Free Software Foundation; either version 2.1 of the | ||
| 8 | License, or (at your option) any later version. | ||
| 9 | |||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | Lesser General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU Lesser General Public | ||
| 16 | License along with the GNU C Library; if not, see | ||
| 17 | <https://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | #include_next <dl-sysdep.h> | ||
| 20 | |||
| 21 | /* _dl_argv cannot be attribute_relro, because _dl_start_user | ||
| 22 | might write into it after _dl_start returns. */ | ||
| 23 | #define DL_ARGV_NOT_RELRO 1 | ||
| 24 | |||
| 25 | #define DL_EXTERN_PROTECTED_DATA | ||
lib/libc/glibc/sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2002-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2002-2023 Free Software Foundation, Inc. |
| 2 | 2 | ||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 |
lib/libc/glibc/sysdeps/aarch64/start.S+22-5| ... | @@ -1,11 +1,28 @@ | ... | @@ -1,11 +1,28 @@ |
| 1 | /* Copyright (C) 1995-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 2 | 2 | ||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public License as | 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | published by the Free Software Foundation; either version 2.1 of the | 7 | License as published by the Free Software Foundation; either |
| 8 | License, or (at your option) any later version. | 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | |||
| 10 | In addition to the permissions in the GNU Lesser General Public | ||
| 11 | License, the Free Software Foundation gives you unlimited | ||
| 12 | permission to link the compiled version of this file with other | ||
| 13 | programs, and to distribute those programs without any restriction | ||
| 14 | coming from the use of this file. (The GNU Lesser General Public | ||
| 15 | License restrictions do apply in other respects; for example, they | ||
| 16 | cover modification of the file, and distribution when not linked | ||
| 17 | into another program.) | ||
| 18 | |||
| 19 | Note that people who make modified versions of this file are not | ||
| 20 | obligated to grant this special exception for their modified | ||
| 21 | versions; it is their choice whether to do so. The GNU Lesser | ||
| 22 | General Public License gives permission to release a modified | ||
| 23 | version without this exception; this exception also makes it | ||
| 24 | possible to release a modified version which carries forward this | ||
| 25 | exception. | ||
| 9 | 26 | ||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | 27 | The GNU C Library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 28 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| ... | @@ -13,7 +30,7 @@ | ... | @@ -13,7 +30,7 @@ |
| 13 | Lesser General Public License for more details. | 30 | Lesser General Public License for more details. |
| 14 | 31 | ||
| 15 | You should have received a copy of the GNU Lesser General Public | 32 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with the GNU C Library. If not, see | 33 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ | 34 | <https://www.gnu.org/licenses/>. */ |
| 18 | 35 | ||
| 19 | #include <sysdep.h> | 36 | #include <sysdep.h> |
lib/libc/glibc/sysdeps/aarch64/sysdep.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1997-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1997-2023 Free Software Foundation, Inc. |
| 2 | 2 | ||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 |
lib/libc/glibc/sysdeps/alpha/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for Alpha. | 1 | /* Special .init and .fini section support for Alpha. |
| 2 | Copyright (C) 2001-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2001-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/alpha/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for Alpha. | 1 | /* Special .init and .fini section support for Alpha. |
| 2 | Copyright (C) 2001-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2001-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/alpha/dl-sysdep.h deleted-23| ... | @@ -1,23 +0,0 @@ | ||
| 1 | /* System-specific settings for dynamic linker code. Alpha version. | ||
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | ||
| 3 | This file is part of the GNU C Library. | ||
| 4 | |||
| 5 | The GNU C Library is free software; you can redistribute it and/or | ||
| 6 | modify it under the terms of the GNU Lesser General Public | ||
| 7 | License as published by the Free Software Foundation; either | ||
| 8 | version 2.1 of the License, or (at your option) any later version. | ||
| 9 | |||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | Lesser General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU Lesser General Public | ||
| 16 | License along with the GNU C Library. If not, see | ||
| 17 | <https://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | #include_next <dl-sysdep.h> | ||
| 20 | |||
| 21 | /* _dl_argv cannot be attribute_relro, because _dl_start_user | ||
| 22 | might write into it after _dl_start returns. */ | ||
| 23 | #define DL_ARGV_NOT_RELRO 1 | ||
lib/libc/glibc/sysdeps/alpha/start.S+1-2| ... | @@ -1,7 +1,6 @@ | ... | @@ -1,7 +1,6 @@ |
| 1 | /* Startup code for Alpha/ELF. | 1 | /* Startup code for Alpha/ELF. |
| 2 | Copyright (C) 1993-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1993-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Richard Henderson <rth@tamu.edu> | ||
| 5 | 4 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 7 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
lib/libc/glibc/sysdeps/arc/sysdep.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembler macros for ARC. | 1 | /* Assembler macros for ARC. |
| 2 | Copyright (C) 2020-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/arm/arm-features.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Macros to test for CPU features on ARM. Generic ARM version. | 1 | /* Macros to test for CPU features on ARM. Generic ARM version. |
| 2 | Copyright (C) 2012-2022 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/arm/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for ARM. | 1 | /* Special .init and .fini section support for ARM. |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/arm/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for ARM. | 1 | /* Special .init and .fini section support for ARM. |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/arm/dl-sysdep.h deleted-25| ... | @@ -1,25 +0,0 @@ | ||
| 1 | /* System-specific settings for dynamic linker code. Alpha version. | ||
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | ||
| 3 | This file is part of the GNU C Library. | ||
| 4 | |||
| 5 | The GNU C Library is free software; you can redistribute it and/or | ||
| 6 | modify it under the terms of the GNU Lesser General Public | ||
| 7 | License as published by the Free Software Foundation; either | ||
| 8 | version 2.1 of the License, or (at your option) any later version. | ||
| 9 | |||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | Lesser General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU Lesser General Public | ||
| 16 | License along with the GNU C Library. If not, see | ||
| 17 | <https://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | #include_next <dl-sysdep.h> | ||
| 20 | |||
| 21 | /* _dl_argv cannot be attribute_relro, because _dl_start_user | ||
| 22 | might write into it after _dl_start returns. */ | ||
| 23 | #define DL_ARGV_NOT_RELRO 1 | ||
| 24 | |||
| 25 | #define DL_EXTERN_PROTECTED_DATA | ||
lib/libc/glibc/sysdeps/arm/start.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Startup code for ARM & ELF | 1 | /* Startup code for ARM & ELF |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/arm/sysdep.h+1-45| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembler macros for ARM. | 1 | /* Assembler macros for ARM. |
| 2 | Copyright (C) 1997-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1997-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -293,47 +293,3 @@ | ... | @@ -293,47 +293,3 @@ |
| 293 | #else | 293 | #else |
| 294 | # define PC_OFS 8 | 294 | # define PC_OFS 8 |
| 295 | #endif | 295 | #endif |
| 296 | |||
| 297 | /* Pointer mangling support. */ | ||
| 298 | #if (IS_IN (rtld) \ | ||
| 299 | || (!defined SHARED && (IS_IN (libc) || IS_IN (libpthread)))) | ||
| 300 | # ifdef __ASSEMBLER__ | ||
| 301 | # define PTR_MANGLE_LOAD(guard, tmp)					\ | ||
| 302 | LDR_HIDDEN (guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard_local), 0) | ||
| 303 | # define PTR_MANGLE(dst, src, guard, tmp)				\ | ||
| 304 | PTR_MANGLE_LOAD(guard, tmp);						\ | ||
| 305 | PTR_MANGLE2(dst, src, guard) | ||
| 306 | /* Use PTR_MANGLE2 for efficiency if guard is already loaded. */ | ||
| 307 | # define PTR_MANGLE2(dst, src, guard)		\ | ||
| 308 | eor dst, src, guard | ||
| 309 | # define PTR_DEMANGLE(dst, src, guard, tmp)	\ | ||
| 310 | PTR_MANGLE (dst, src, guard, tmp) | ||
| 311 | # define PTR_DEMANGLE2(dst, src, guard)	\ | ||
| 312 | PTR_MANGLE2 (dst, src, guard) | ||
| 313 | # else | ||
| 314 | extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; | ||
| 315 | # define PTR_MANGLE(var) \ | ||
| 316 | (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local) | ||
| 317 | # define PTR_DEMANGLE(var) PTR_MANGLE (var) | ||
| 318 | # endif | ||
| 319 | #else | ||
| 320 | # ifdef __ASSEMBLER__ | ||
| 321 | # define PTR_MANGLE_LOAD(guard, tmp)					\ | ||
| 322 | LDR_GLOBAL (guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard), 0); | ||
| 323 | # define PTR_MANGLE(dst, src, guard, tmp)				\ | ||
| 324 | PTR_MANGLE_LOAD(guard, tmp);						\ | ||
| 325 | PTR_MANGLE2(dst, src, guard) | ||
| 326 | /* Use PTR_MANGLE2 for efficiency if guard is already loaded. */ | ||
| 327 | # define PTR_MANGLE2(dst, src, guard)		\ | ||
| 328 | eor dst, src, guard | ||
| 329 | # define PTR_DEMANGLE(dst, src, guard, tmp)	\ | ||
| 330 | PTR_MANGLE (dst, src, guard, tmp) | ||
| 331 | # define PTR_DEMANGLE2(dst, src, guard)	\ | ||
| 332 | PTR_MANGLE2 (dst, src, guard) | ||
| 333 | # else | ||
| 334 | extern uintptr_t __pointer_chk_guard attribute_relro; | ||
| 335 | # define PTR_MANGLE(var) \ | ||
| 336 | (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard) | ||
| 337 | # define PTR_DEMANGLE(var) PTR_MANGLE (var) | ||
| 338 | # endif | ||
| 339 | #endif |
lib/libc/glibc/sysdeps/csky/sysdep.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembler macros for C-SKY. | 1 | /* Assembler macros for C-SKY. |
| 2 | Copyright (C) 2018-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2018-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/generic/dl-dtprocnum.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Configuration of lookup functions. | 1 | /* Configuration of lookup functions. |
| 2 | Copyright (C) 2000-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/generic/dl-sysdep.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* System-specific settings for dynamic linker code. Generic version. | 1 | /* System-specific settings for dynamic linker code. Generic version. |
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/generic/dwarf2.h+1-3| ... | @@ -1,8 +1,6 @@ | ... | @@ -1,8 +1,6 @@ |
| 1 | /* Declarations and definitions of codes relating to the DWARF2 symbolic | 1 | /* Declarations and definitions of codes relating to the DWARF2 symbolic |
| 2 | debugging information format. | 2 | debugging information format. |
| 3 | Copyright (C) 1992-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 4 | Contributed by Gary Funck (gary@intrepid.com). Derived from the | ||
| 5 | DWARF 1 implementation written by Ron Guilmette (rfg@monkeys.com). | ||
| 6 | 4 | ||
| 7 | This file is part of the GNU C Library. | 5 | This file is part of the GNU C Library. |
| 8 | 6 |
lib/libc/glibc/sysdeps/generic/libc-lock.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* libc-internal interface for mutex locks. Stub version. | 1 | /* libc-internal interface for mutex locks. Stub version. |
| 2 | Copyright (C) 1996-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1996-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/generic/libc-symver.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Symbol version management. | 1 | /* Symbol version management. |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/generic/single-thread.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Single thread optimization, generic version. | 1 | /* Single thread optimization, generic version. |
| 2 | Copyright (C) 2019-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2019-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/generic/symbol-hacks.h+2-1| ... | @@ -1,6 +1,7 @@ | ... | @@ -1,6 +1,7 @@ |
| 1 | /* Some compiler optimizations may transform loops into memset/memmove | 1 | /* Some compiler optimizations may transform loops into memset/memmove |
| 2 | calls and without proper declaration it may generate PLT calls. */ | 2 | calls and without proper declaration it may generate PLT calls. */ |
| 3 | #if !defined __ASSEMBLER__ && IS_IN (libc) && defined SHARED | 3 | #if !defined __ASSEMBLER__ && IS_IN (libc) && defined SHARED \ |
| 4 | && !defined LIBC_NONSHARED | ||
| 4 | asm ("memmove = __GI_memmove"); | 5 | asm ("memmove = __GI_memmove"); |
| 5 | asm ("memset = __GI_memset"); | 6 | asm ("memset = __GI_memset"); |
| 6 | asm ("memcpy = __GI_memcpy"); | 7 | asm ("memcpy = __GI_memcpy"); |
lib/libc/glibc/sysdeps/generic/sysdep.h+2-2| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Generic asm macros used on many machines. | 1 | /* Generic asm macros used on many machines. |
| 2 | Copyright (C) 1991-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1991-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -35,7 +35,7 @@ | ... | @@ -35,7 +35,7 @@ |
| 35 | # endif | 35 | # endif |
| 36 | #endif | 36 | #endif |
| 37 | 37 | ||
| 38 | /* Makros to generate eh_frame unwind information. */ | 38 | /* Macros to generate eh_frame unwind information. */ |
| 39 | #ifdef __ASSEMBLER__ | 39 | #ifdef __ASSEMBLER__ |
| 40 | # define cfi_startproc			.cfi_startproc | 40 | # define cfi_startproc			.cfi_startproc |
| 41 | # define cfi_endproc			.cfi_endproc | 41 | # define cfi_endproc			.cfi_endproc |
lib/libc/glibc/sysdeps/generic/tls.h+6-16| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Definition for thread-local data handling. Generic version. | 1 | /* Definition for thread-local data handling. Generic version. |
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -19,6 +19,11 @@ | ... | @@ -19,6 +19,11 @@ |
| 19 | /* An architecture-specific version of this file has to defined a | 19 | /* An architecture-specific version of this file has to defined a |
| 20 | number of symbols: | 20 | number of symbols: |
| 21 | 21 | ||
| 22 | TCB_ALIGNMENT | ||
| 23 | |||
| 24 | Alignment of THREAD_SELF (struct pthread *) and the thread | ||
| 25 | pointer. | ||
| 26 | |||
| 22 | TLS_TCB_AT_TP or TLS_DTV_AT_TP | 27 | TLS_TCB_AT_TP or TLS_DTV_AT_TP |
| 23 | 28 | ||
| 24 | The presence of one of these symbols signals which variant of | 29 | The presence of one of these symbols signals which variant of |
| ... | @@ -43,15 +48,6 @@ | ... | @@ -43,15 +48,6 @@ |
| 43 | dynamic linker itself. There are no threads in use at that time. | 48 | dynamic linker itself. There are no threads in use at that time. |
| 44 | 49 | ||
| 45 | 50 | ||
| 46 | TLS_TCB_ALIGN | ||
| 47 | |||
| 48 | Alignment requirements for the TCB structure. | ||
| 49 | |||
| 50 | TLS_INIT_TCB_ALIGN | ||
| 51 | |||
| 52 | Similarly, but for the structure used at startup time. | ||
| 53 | |||
| 54 | |||
| 55 | INSTALL_DTV(tcb, init_dtv) | 51 | INSTALL_DTV(tcb, init_dtv) |
| 56 | 52 | ||
| 57 | This macro must install the given initial DTV into the thread control | 53 | This macro must install the given initial DTV into the thread control |
| ... | @@ -71,10 +67,4 @@ | ... | @@ -71,10 +67,4 @@ |
| 71 | This macro returns the address of the DTV of the current thread. | 67 | This macro returns the address of the DTV of the current thread. |
| 72 | This normally is done using the thread register which points | 68 | This normally is done using the thread register which points |
| 73 | to the dtv or the TCB (from which the DTV can found). | 69 | to the dtv or the TCB (from which the DTV can found). |
| 74 | |||
| 75 | |||
| 76 | THREAD_GSCOPE_IN_TCB | ||
| 77 | |||
| 78 | This should be set to 1 if the global scope flag is stored within the TCB. | ||
| 79 | When set to 0, GL(_dl_thread_gscope_count) will be defined to store it. | ||
| 80 | */ | 70 | */ |
lib/libc/glibc/sysdeps/hppa/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for HPPA | 1 | /* Special .init and .fini section support for HPPA |
| 2 | Copyright (C) 2000-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/hppa/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for HPPA | 1 | /* Special .init and .fini section support for HPPA |
| 2 | Copyright (C) 2000-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/hppa/entry.h-5| ... | @@ -1,6 +1,4 @@ | ... | @@ -1,6 +1,4 @@ |
| 1 | #ifndef __ASSEMBLY__ | ||
| 2 | extern void _start (void); | 1 | extern void _start (void); |
| 3 | #endif | ||
| 4 | 2 | ||
| 5 | /* Lives in libgcc.so and canonicalizes function pointers for comparison. */ | 3 | /* Lives in libgcc.so and canonicalizes function pointers for comparison. */ |
| 6 | extern unsigned int __canonicalize_funcptr_for_compare (unsigned int fptr); | 4 | extern unsigned int __canonicalize_funcptr_for_compare (unsigned int fptr); |
| ... | @@ -8,6 +6,3 @@ extern unsigned int __canonicalize_funcptr_for_compare (unsigned int fptr); | ... | @@ -8,6 +6,3 @@ extern unsigned int __canonicalize_funcptr_for_compare (unsigned int fptr); |
| 8 | /* The function's entry point is stored in the first word of the | 6 | /* The function's entry point is stored in the first word of the |
| 9 | function descriptor (plabel) of _start(). */ | 7 | function descriptor (plabel) of _start(). */ |
| 10 | #define ENTRY_POINT __canonicalize_funcptr_for_compare((unsigned int)_start) | 8 | #define ENTRY_POINT __canonicalize_funcptr_for_compare((unsigned int)_start) |
| 11 | |||
| 12 | /* We have to provide a special declaration. */ | ||
| 13 | #define ENTRY_POINT_DECL(class) class void _start (void); |
lib/libc/glibc/sysdeps/hppa/nptl/bits/pthreadtypes-arch.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2005-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2005-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/hppa/start.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* ELF startup code for HPPA. | 1 | /* ELF startup code for HPPA. |
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/hppa/sysdep.h+1-2| ... | @@ -1,7 +1,6 @@ | ... | @@ -1,7 +1,6 @@ |
| 1 | /* Assembler macros for HP/PA. | 1 | /* Assembler macros for HP/PA. |
| 2 | Copyright (C) 1999-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999. | ||
| 5 | 4 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 7 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
lib/libc/glibc/sysdeps/htl/bits/pthread.h+2-2| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Pthread data structures. Generic version. | 1 | /* Pthread data structures. Generic version. |
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
| 19 | #ifndef _BITS_PTHREAD_H | 19 | #ifndef _BITS_PTHREAD_H |
| 20 | #define _BITS_PTHREAD_H	1 | 20 | #define _BITS_PTHREAD_H	1 |
| 21 | 21 | ||
| 22 | typedef int __pthread_t; | 22 | #include <bits/types/__pthread_t.h> |
| 23 | 23 | ||
| 24 | /* Return true if __T1 and __T2 both name the same thread. Otherwise, | 24 | /* Return true if __T1 and __T2 both name the same thread. Otherwise, |
| 25 | false. */ | 25 | false. */ |
lib/libc/glibc/sysdeps/htl/bits/thread-shared-types.h+2-2| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Common threading primitives definitions for both POSIX and C11. | 1 | /* Common threading primitives definitions for both POSIX and C11. |
| 2 | Copyright (C) 2017-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -21,9 +21,9 @@ | ... | @@ -21,9 +21,9 @@ |
| 21 | 21 | ||
| 22 | #include <bits/pthreadtypes-arch.h> | 22 | #include <bits/pthreadtypes-arch.h> |
| 23 | #include <bits/types/struct___pthread_once.h> | 23 | #include <bits/types/struct___pthread_once.h> |
| 24 | #include <bits/types/__thrd_t.h> | ||
| 24 | 25 | ||
| 25 | typedef int __tss_t; | 26 | typedef int __tss_t; |
| 26 | typedef int __thrd_t; | ||
| 27 | 27 | ||
| 28 | typedef union | 28 | typedef union |
| 29 | { | 29 | { |
lib/libc/glibc/sysdeps/htl/libc-lockP.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Private libc-internal interface for mutex locks. | 1 | /* Private libc-internal interface for mutex locks. |
| 2 | Copyright (C) 2015-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2015-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/htl/pthread.h+7-7| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Posix threads. Hurd version. | 1 | /* Posix threads. Hurd version. |
| 2 | Copyright (C) 2000-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -623,7 +623,7 @@ extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *__restrict | ... | @@ -623,7 +623,7 @@ extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *__restrict |
| 623 | 					 int *__restrict __pshared) | 623 | 					 int *__restrict __pshared) |
| 624 | 	__THROW __nonnull ((1, 2)); | 624 | 	__THROW __nonnull ((1, 2)); |
| 625 | 625 | ||
| 626 | /* Set the value of the process shared atrribute in *ATTR to | 626 | /* Set the value of the process shared attribute in *ATTR to |
| 627 | PSHARED. */ | 627 | PSHARED. */ |
| 628 | extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, | 628 | extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, |
| 629 | 					 int __pshared) | 629 | 					 int __pshared) |
| ... | @@ -645,7 +645,7 @@ extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, | ... | @@ -645,7 +645,7 @@ extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, |
| 645 | # include <bits/types/struct___pthread_rwlock.h> | 645 | # include <bits/types/struct___pthread_rwlock.h> |
| 646 | 646 | ||
| 647 | # define PTHREAD_RWLOCK_INITIALIZER __PTHREAD_RWLOCK_INITIALIZER | 647 | # define PTHREAD_RWLOCK_INITIALIZER __PTHREAD_RWLOCK_INITIALIZER |
| 648 | /* Create a rwlock object with attributes given by ATTR and strore the | 648 | /* Create a rwlock object with attributes given by ATTR and store the |
| 649 | result in *RWLOCK. */ | 649 | result in *RWLOCK. */ |
| 650 | extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, | 650 | extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, |
| 651 | 				const pthread_rwlockattr_t *__restrict __attr) | 651 | 				const pthread_rwlockattr_t *__restrict __attr) |
| ... | @@ -709,7 +709,7 @@ extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) | ... | @@ -709,7 +709,7 @@ extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) |
| 709 | 709 | ||
| 710 | 710 | ||
| 711 | 711 | ||
| 712 | /* Cancelation. */ | 712 | /* Cancellation. */ |
| 713 | 713 | ||
| 714 | /* Register a cleanup handler. */ | 714 | /* Register a cleanup handler. */ |
| 715 | extern void pthread_cleanup_push (void (*__routine) (void *), void *__arg); | 715 | extern void pthread_cleanup_push (void (*__routine) (void *), void *__arg); |
| ... | @@ -769,7 +769,7 @@ extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *__restri | ... | @@ -769,7 +769,7 @@ extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *__restri |
| 769 | 					 int *__restrict __pshared) | 769 | 					 int *__restrict __pshared) |
| 770 | 	__THROW __nonnull ((1, 2)); | 770 | 	__THROW __nonnull ((1, 2)); |
| 771 | 771 | ||
| 772 | /* Set the value of the process shared atrribute in *ATTR to | 772 | /* Set the value of the process shared attribute in *ATTR to |
| 773 | PSHARED. */ | 773 | PSHARED. */ |
| 774 | extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, | 774 | extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, |
| 775 | 					 int __pshared) | 775 | 					 int __pshared) |
| ... | @@ -878,12 +878,12 @@ extern int pthread_getcpuclockid (pthread_t __thr, __clockid_t *__clock) | ... | @@ -878,12 +878,12 @@ extern int pthread_getcpuclockid (pthread_t __thr, __clockid_t *__clock) |
| 878 | 878 | ||
| 879 | /* Scheduling. */ | 879 | /* Scheduling. */ |
| 880 | 880 | ||
| 881 | /* Return thread THREAD's scheduling paramters. */ | 881 | /* Return thread THREAD's scheduling parameters. */ |
| 882 | extern int pthread_getschedparam (pthread_t __thr, int *__restrict __policy, | 882 | extern int pthread_getschedparam (pthread_t __thr, int *__restrict __policy, |
| 883 | 				 struct sched_param *__restrict __param) | 883 | 				 struct sched_param *__restrict __param) |
| 884 | 	__THROW __nonnull ((2, 3)); | 884 | 	__THROW __nonnull ((2, 3)); |
| 885 | 885 | ||
| 886 | /* Set thread THREAD's scheduling paramters. */ | 886 | /* Set thread THREAD's scheduling parameters. */ |
| 887 | extern int pthread_setschedparam (pthread_t __thr, int __policy, | 887 | extern int pthread_setschedparam (pthread_t __thr, int __policy, |
| 888 | 				 const struct sched_param *__param) | 888 | 				 const struct sched_param *__param) |
| 889 | 	__THROW __nonnull ((3)); | 889 | 	__THROW __nonnull ((3)); |
lib/libc/glibc/sysdeps/i386/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for x86. | 1 | /* Special .init and .fini section support for x86. |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/i386/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for x86. | 1 | /* Special .init and .fini section support for x86. |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/i386/htl/bits/pthreadtypes-arch.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Machine-specific pthread type layouts. Hurd i386 version. | 1 | /* Machine-specific pthread type layouts. Hurd i386 version. |
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/i386/start.S+10-5| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Startup code compliant to the ELF i386 ABI. | 1 | /* Startup code compliant to the ELF i386 ABI. |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -98,11 +98,10 @@ ENTRY (_start) | ... | @@ -98,11 +98,10 @@ ENTRY (_start) |
| 98 | 	pushl main@GOT(%ebx) | 98 | 	pushl main@GOT(%ebx) |
| 99 | # else | 99 | # else |
| 100 | 	/* Avoid relocation in static PIE since _start is called before | 100 | 	/* Avoid relocation in static PIE since _start is called before |
| 101 | 	 it is relocated. Don't use "leal main@GOTOFF(%ebx), %eax" | 101 | 	 it is relocated. This also avoid rely on linker optimization to |
| 102 | 	 since main may be in a shared object. Linker will convert | 102 | 	 transform 'movl main@GOT(%ebx), %eax' to 'leal main@GOTOFF(%ebx)' |
| 103 | 	 "movl main@GOT(%ebx), %eax" to "leal main@GOTOFF(%ebx), %eax" | ||
| 104 | 	 if main is defined locally. */ | 103 | 	 if main is defined locally. */ |
| 105 | 	movl main@GOT(%ebx), %eax | 104 | 	leal __wrap_main@GOTOFF(%ebx), %eax |
| 106 | 	pushl %eax | 105 | 	pushl %eax |
| 107 | # endif | 106 | # endif |
| 108 | 107 | ||
| ... | @@ -130,6 +129,12 @@ ENTRY (_start) | ... | @@ -130,6 +129,12 @@ ENTRY (_start) |
| 130 | 1:	movl	(%esp), %ebx | 129 | 1:	movl	(%esp), %ebx |
| 131 | 	ret | 130 | 	ret |
| 132 | #endif | 131 | #endif |
| 132 | |||
| 133 | #if defined PIC && !defined SHARED | ||
| 134 | __wrap_main: | ||
| 135 | 	_CET_ENDBR | ||
| 136 | 	jmp	main@PLT | ||
| 137 | #endif | ||
| 133 | END (_start) | 138 | END (_start) |
| 134 | 139 | ||
| 135 | /* To fulfill the System V/i386 ABI we need this symbol. Yuck, it's so | 140 | /* To fulfill the System V/i386 ABI we need this symbol. Yuck, it's so |
lib/libc/glibc/sysdeps/i386/symbol-hacks.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Hacks needed for symbol manipulation. i386 version. | 1 | /* Hacks needed for symbol manipulation. i386 version. |
| 2 | Copyright (C) 2017-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/i386/sysdep.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembler macros for i386. | 1 | /* Assembler macros for i386. |
| 2 | Copyright (C) 1991-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1991-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/ia64/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for IA64. | 1 | /* Special .init and .fini section support for IA64. |
| 2 | Copyright (C) 2000-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/ia64/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for ARM. | 1 | /* Special .init and .fini section support for ARM. |
| 2 | Copyright (C) 2000-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/ia64/dl-dtprocnum.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Configuration of lookup functions. IA-64 version. | 1 | /* Configuration of lookup functions. IA-64 version. |
| 2 | Copyright (C) 2000-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/ia64/dl-sysdep.h deleted-23| ... | @@ -1,23 +0,0 @@ | ||
| 1 | /* System-specific settings for dynamic linker code. IA-64 version. | ||
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | ||
| 3 | This file is part of the GNU C Library. | ||
| 4 | |||
| 5 | The GNU C Library is free software; you can redistribute it and/or | ||
| 6 | modify it under the terms of the GNU Lesser General Public | ||
| 7 | License as published by the Free Software Foundation; either | ||
| 8 | version 2.1 of the License, or (at your option) any later version. | ||
| 9 | |||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | Lesser General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU Lesser General Public | ||
| 16 | License along with the GNU C Library; if not, see | ||
| 17 | <https://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | #include_next <dl-sysdep.h> | ||
| 20 | |||
| 21 | /* _dl_argv cannot be attribute_relro, because _dl_start_user | ||
| 22 | might write into it after _dl_start returns. */ | ||
| 23 | #define DL_ARGV_NOT_RELRO 1 | ||
lib/libc/glibc/sysdeps/ia64/entry.h-5| ... | @@ -1,13 +1,8 @@ | ... | @@ -1,13 +1,8 @@ |
| 1 | #include <link.h> | 1 | #include <link.h> |
| 2 | #include <dl-fptr.h> | 2 | #include <dl-fptr.h> |
| 3 | 3 | ||
| 4 | #ifndef __ASSEMBLY__ | ||
| 5 | extern void _start (void); | 4 | extern void _start (void); |
| 6 | #endif | ||
| 7 | 5 | ||
| 8 | /* The function's entry point is stored in the first word of the | 6 | /* The function's entry point is stored in the first word of the |
| 9 | function descriptor (plabel) of _start(). */ | 7 | function descriptor (plabel) of _start(). */ |
| 10 | #define ENTRY_POINT ELF_PTR_TO_FDESC (_start)->ip | 8 | #define ENTRY_POINT ELF_PTR_TO_FDESC (_start)->ip |
| 11 | |||
| 12 | /* We have to provide a special declaration. */ | ||
| 13 | #define ENTRY_POINT_DECL(class) class void _start (void); |
lib/libc/glibc/sysdeps/ia64/start.S+1-2| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Copyright (C) 1999-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999. | ||
| 4 | 3 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
lib/libc/glibc/sysdeps/ia64/sysdep.h+1-2| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Copyright (C) 2000-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | Contributed by David Mosberger-Tang <davidm@hpl.hp.com> | ||
| 4 | 3 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
lib/libc/glibc/sysdeps/m68k/coldfire/sysdep.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembler macros for Coldfire. | 1 | /* Assembler macros for Coldfire. |
| 2 | Copyright (C) 1998-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1998-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/m68k/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for m68k. | 1 | /* Special .init and .fini section support for m68k. |
| 2 | Copyright (C) 2012-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/m68k/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for m68k. | 1 | /* Special .init and .fini section support for m68k. |
| 2 | Copyright (C) 2012-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/m68k/m680x0/sysdep.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembler macros for m680x0. | 1 | /* Assembler macros for m680x0. |
| 2 | Copyright (C) 2010-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2010-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/m68k/nptl/bits/pthreadtypes-arch.h+1-2| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Copyright (C) 2010-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2010-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010. | ||
| 4 | 3 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
lib/libc/glibc/sysdeps/m68k/start.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Startup code compliant to the ELF m68k ABI. | 1 | /* Startup code compliant to the ELF m68k ABI. |
| 2 | Copyright (C) 1996-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1996-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/m68k/symbol-hacks.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Hacks needed for symbol manipulation. m68k version. | 1 | /* Hacks needed for symbol manipulation. m68k version. |
| 2 | Copyright (C) 2017-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/m68k/sysdep.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembler macros for m68k. | 1 | /* Assembler macros for m68k. |
| 2 | Copyright (C) 1998-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1998-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/mach/i386/sysdep.h deleted-59| ... | @@ -1,59 +0,0 @@ | ||
| 1 | /* Copyright (C) 1991-2021 Free Software Foundation, Inc. | ||
| 2 | |||
| 3 | This file is part of the GNU C Library. | ||
| 4 | |||
| 5 | The GNU C Library is free software; you can redistribute it and/or | ||
| 6 | modify it under the terms of the GNU Lesser General Public | ||
| 7 | License as published by the Free Software Foundation; either | ||
| 8 | version 2.1 of the License, or (at your option) any later version. | ||
| 9 | |||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | Lesser General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU Lesser General Public | ||
| 16 | License along with the GNU C Library; if not, see | ||
| 17 | <https://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | #ifndef _MACH_I386_SYSDEP_H | ||
| 20 | #define _MACH_I386_SYSDEP_H 1 | ||
| 21 | |||
| 22 | /* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */ | ||
| 23 | #include <dl-sysdep.h> | ||
| 24 | #include <tls.h> | ||
| 25 | |||
| 26 | #define LOSE asm volatile ("hlt") | ||
| 27 | |||
| 28 | #define SNARF_ARGS(entry_sp, argc, argv, envp)				 \ | ||
| 29 | do									 \ | ||
| 30 | {									 \ | ||
| 31 | char **p;								 \ | ||
| 32 | argc = (int) *entry_sp;						 \ | ||
| 33 | argv = (char **) (entry_sp + 1);					 \ | ||
| 34 | p = argv;								 \ | ||
| 35 | while (*p++ != NULL)						 \ | ||
| 36 | 	;								 \ | ||
| 37 | if (p >= (char **) argv[0])					 \ | ||
| 38 | 	--p;								 \ | ||
| 39 | envp = p;							 \ | ||
| 40 | } while (0) | ||
| 41 | |||
| 42 | #define RETURN_TO(sp, pc, retval) \ | ||
| 43 | asm volatile ("movl %0, %%esp; jmp %*%1 # %2" \ | ||
| 44 | 		: : "g" (sp), "r" (pc), "a" (retval)) | ||
| 45 | |||
| 46 | |||
| 47 | #define STACK_GROWTH_DOWN | ||
| 48 | |||
| 49 | /* Get the machine-independent Mach definitions. */ | ||
| 50 | #include <sysdeps/mach/sysdep.h> | ||
| 51 | |||
| 52 | |||
| 53 | /* This should be rearranged, but at the moment this file provides | ||
| 54 | the most useful definitions for assembler syntax details. */ | ||
| 55 | #undef ENTRY | ||
| 56 | #undef ALIGN | ||
| 57 | #include <sysdeps/unix/i386/sysdep.h> | ||
| 58 | |||
| 59 | #endif /* mach/i386/sysdep.h */ | ||
lib/libc/glibc/sysdeps/mach/libc-lock.h+4-5| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* libc-internal interface for mutex locks. Mach cthreads version. | 1 | /* libc-internal interface for mutex locks. Mach cthreads version. |
| 2 | Copyright (C) 1996-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1996-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -34,9 +34,8 @@ typedef struct | ... | @@ -34,9 +34,8 @@ typedef struct |
| 34 | 34 | ||
| 35 | typedef __libc_lock_recursive_t __rtld_lock_recursive_t; | 35 | typedef __libc_lock_recursive_t __rtld_lock_recursive_t; |
| 36 | 36 | ||
| 37 | extern char __libc_lock_self0[0]; | ||
| 38 | #define __libc_lock_owner_self() \ | 37 | #define __libc_lock_owner_self() \ |
| 39 | (__LIBC_NO_TLS () ? (void *)&__libc_lock_self0 : THREAD_SELF) | 38 | (__LIBC_NO_TLS () ? (void *) 1 : THREAD_SELF) |
| 40 | 39 | ||
| 41 | #else | 40 | #else |
| 42 | typedef struct __libc_lock_opaque__ __libc_lock_t; | 41 | typedef struct __libc_lock_opaque__ __libc_lock_t; |
| ... | @@ -71,14 +70,14 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; | ... | @@ -71,14 +70,14 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; |
| 71 | 70 | ||
| 72 | /* Lock the named lock variable. */ | 71 | /* Lock the named lock variable. */ |
| 73 | #define __libc_lock_lock(NAME) \ | 72 | #define __libc_lock_lock(NAME) \ |
| 74 | ({ lll_lock ((NAME), 0); 0; }) | 73 | ({ lll_lock ((NAME), LLL_PRIVATE); 0; }) |
| 75 | 74 | ||
| 76 | /* Lock the named lock variable. */ | 75 | /* Lock the named lock variable. */ |
| 77 | #define __libc_lock_trylock(NAME) lll_trylock (NAME) | 76 | #define __libc_lock_trylock(NAME) lll_trylock (NAME) |
| 78 | 77 | ||
| 79 | /* Unlock the named lock variable. */ | 78 | /* Unlock the named lock variable. */ |
| 80 | #define __libc_lock_unlock(NAME) \ | 79 | #define __libc_lock_unlock(NAME) \ |
| 81 | ({ lll_unlock ((NAME), 0); 0; }) | 80 | ({ lll_unlock ((NAME), LLL_PRIVATE); 0; }) |
| 82 | 81 | ||
| 83 | #define __libc_lock_define_recursive(CLASS,NAME) \ | 82 | #define __libc_lock_define_recursive(CLASS,NAME) \ |
| 84 | CLASS __libc_lock_recursive_t NAME; | 83 | CLASS __libc_lock_recursive_t NAME; |
lib/libc/glibc/sysdeps/mach/sysdep.h+3-2| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1994-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1994-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -30,6 +30,7 @@ | ... | @@ -30,6 +30,7 @@ |
| 30 | /* For ELF we need to add the `.type' directive to make shared libraries | 30 | /* For ELF we need to add the `.type' directive to make shared libraries |
| 31 | work right. */ | 31 | work right. */ |
| 32 | #undef ENTRY | 32 | #undef ENTRY |
| 33 | #undef ENTRY2 | ||
| 33 | #define ENTRY(name) \ | 34 | #define ENTRY(name) \ |
| 34 | .globl name; \ | 35 | .globl name; \ |
| 35 | .align ALIGN; \ | 36 | .align ALIGN; \ |
| ... | @@ -44,7 +45,7 @@ | ... | @@ -44,7 +45,7 @@ |
| 44 | 45 | ||
| 45 | #ifndef __ASSEMBLER__ | 46 | #ifndef __ASSEMBLER__ |
| 46 | #define FATAL_PREPARE_INCLUDE <mach/mig_support.h> | 47 | #define FATAL_PREPARE_INCLUDE <mach/mig_support.h> |
| 47 | #define FATAL_PREPARE __mig_dealloc_reply_port (MACH_PORT_NULL) | 48 | #define FATAL_PREPARE __mig_dealloc_reply_port (__mig_get_reply_port ()) |
| 48 | #endif | 49 | #endif |
| 49 | 50 | ||
| 50 | /* sysdeps/mach/MACHINE/sysdep.h should define the following macros. */ | 51 | /* sysdeps/mach/MACHINE/sysdep.h should define the following macros. */ |
lib/libc/glibc/sysdeps/microblaze/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for MicroBlaze. | 1 | /* Special .init and .fini section support for MicroBlaze. |
| 2 | Copyright (C) 2012-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/microblaze/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for MicroBlaze. | 1 | /* Special .init and .fini section support for MicroBlaze. |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/microblaze/start.S+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1995-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 2 | 2 | ||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 |
lib/libc/glibc/sysdeps/microblaze/sysdep.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1997-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1997-2023 Free Software Foundation, Inc. |
| 2 | 2 | ||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 |
lib/libc/glibc/sysdeps/mips/dl-dtprocnum.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Configuration of lookup functions. MIPS version. | 1 | /* Configuration of lookup functions. MIPS version. |
| 2 | Copyright (C) 2000-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/mips/mips32/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for MIPS (o32). | 1 | /* Special .init and .fini section support for MIPS (o32). |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/mips/mips32/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for MIPS (o32). | 1 | /* Special .init and .fini section support for MIPS (o32). |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/mips/mips64/n32/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for MIPS (n32). | 1 | /* Special .init and .fini section support for MIPS (n32). |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/mips/mips64/n32/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for MIPS (n32). | 1 | /* Special .init and .fini section support for MIPS (n32). |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/mips/mips64/n64/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for MIPS (n64). | 1 | /* Special .init and .fini section support for MIPS (n64). |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/mips/mips64/n64/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for MIPS (n64). | 1 | /* Special .init and .fini section support for MIPS (n64). |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/mips/nptl/bits/pthreadtypes-arch.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Machine-specific pthread type layouts. MIPS version. | 1 | /* Machine-specific pthread type layouts. MIPS version. |
| 2 | Copyright (C) 2005-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/mips/start.S+2-2| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Startup code compliant to the ELF Mips ABI. | 1 | /* Startup code compliant to the ELF Mips ABI. |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -60,7 +60,7 @@ | ... | @@ -60,7 +60,7 @@ |
| 60 | 		... | 60 | 		... |
| 61 | 					NULL | 61 | 					NULL |
| 62 | ra ($31)	The return address register is set to zero so that programs | 62 | ra ($31)	The return address register is set to zero so that programs |
| 63 | 		that search backword through stack frames recognize the last | 63 | 		that search backward through stack frames recognize the last |
| 64 | 		stack frame. | 64 | 		stack frame. |
| 65 | */ | 65 | */ |
| 66 | 66 |
lib/libc/glibc/sysdeps/nios2/sysdep.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembler macros for Nios II. | 1 | /* Assembler macros for Nios II. |
| 2 | Copyright (C) 2015-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2015-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/nptl/bits/pthreadtypes.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Declaration of common pthread types for all architectures. | 1 | /* Declaration of common pthread types for all architectures. |
| 2 | Copyright (C) 2017-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/nptl/bits/thread-shared-types.h+5-19| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Common threading primitives definitions for both POSIX and C11. | 1 | /* Common threading primitives definitions for both POSIX and C11. |
| 2 | Copyright (C) 2017-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -43,6 +43,8 @@ | ... | @@ -43,6 +43,8 @@ |
| 43 | 43 | ||
| 44 | #include <bits/pthreadtypes-arch.h> | 44 | #include <bits/pthreadtypes-arch.h> |
| 45 | 45 | ||
| 46 | #include <bits/atomic_wide_counter.h> | ||
| 47 | |||
| 46 | 48 | ||
| 47 | /* Common definition of pthread_mutex_t. */ | 49 | /* Common definition of pthread_mutex_t. */ |
| 48 | 50 | ||
| ... | @@ -91,24 +93,8 @@ typedef struct __pthread_internal_slist | ... | @@ -91,24 +93,8 @@ typedef struct __pthread_internal_slist |
| 91 | 93 | ||
| 92 | struct __pthread_cond_s | 94 | struct __pthread_cond_s |
| 93 | { | 95 | { |
| 94 | __extension__ union | 96 | __atomic_wide_counter __wseq; |
| 95 | { | 97 | __atomic_wide_counter __g1_start; |
| 96 | __extension__ unsigned long long int __wseq; | ||
| 97 | struct | ||
| 98 | { | ||
| 99 | unsigned int __low; | ||
| 100 | unsigned int __high; | ||
| 101 | } __wseq32; | ||
| 102 | }; | ||
| 103 | __extension__ union | ||
| 104 | { | ||
| 105 | __extension__ unsigned long long int __g1_start; | ||
| 106 | struct | ||
| 107 | { | ||
| 108 | unsigned int __low; | ||
| 109 | unsigned int __high; | ||
| 110 | } __g1_start32; | ||
| 111 | }; | ||
| 112 | unsigned int __g_refs[2] __LOCK_ALIGNMENT; | 98 | unsigned int __g_refs[2] __LOCK_ALIGNMENT; |
| 113 | unsigned int __g_size[2]; | 99 | unsigned int __g_size[2]; |
| 114 | unsigned int __g1_orig_size; | 100 | unsigned int __g1_orig_size; |
lib/libc/glibc/sysdeps/nptl/libc-lock.h+8-2| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* libc-internal interface for mutex locks. NPTL version. | 1 | /* libc-internal interface for mutex locks. NPTL version. |
| 2 | Copyright (C) 1996-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1996-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -22,6 +22,7 @@ | ... | @@ -22,6 +22,7 @@ |
| 22 | #include <pthread.h> | 22 | #include <pthread.h> |
| 23 | #define __need_NULL | 23 | #define __need_NULL |
| 24 | #include <stddef.h> | 24 | #include <stddef.h> |
| 25 | #include <libc-lock-arch.h> | ||
| 25 | 26 | ||
| 26 | 27 | ||
| 27 | /* Mutex type. */ | 28 | /* Mutex type. */ |
| ... | @@ -29,7 +30,12 @@ | ... | @@ -29,7 +30,12 @@ |
| 29 | # if (!IS_IN (libc) && !IS_IN (libpthread)) || !defined _LIBC | 30 | # if (!IS_IN (libc) && !IS_IN (libpthread)) || !defined _LIBC |
| 30 | typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t; | 31 | typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t; |
| 31 | # else | 32 | # else |
| 32 | typedef struct { int lock; int cnt; void *owner; } __libc_lock_recursive_t; | 33 | typedef struct |
| 34 | { | ||
| 35 | int lock __LIBC_LOCK_ALIGNMENT; | ||
| 36 | int cnt; | ||
| 37 | void *owner; | ||
| 38 | } __libc_lock_recursive_t; | ||
| 33 | # endif | 39 | # endif |
| 34 | #else | 40 | #else |
| 35 | typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; | 41 | typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; |
lib/libc/glibc/sysdeps/nptl/libc-lockP.h+3-2| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Private libc-internal interface for mutex locks. NPTL version. | 1 | /* Private libc-internal interface for mutex locks. NPTL version. |
| 2 | Copyright (C) 1996-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1996-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -32,9 +32,10 @@ | ... | @@ -32,9 +32,10 @@ |
| 32 | ld.so might be used on old kernels with a different libc.so. */ | 32 | ld.so might be used on old kernels with a different libc.so. */ |
| 33 | #include <lowlevellock.h> | 33 | #include <lowlevellock.h> |
| 34 | #include <tls.h> | 34 | #include <tls.h> |
| 35 | #include <libc-lock-arch.h> | ||
| 35 | 36 | ||
| 36 | /* Mutex type. */ | 37 | /* Mutex type. */ |
| 37 | typedef int __libc_lock_t; | 38 | typedef int __libc_lock_t __LIBC_LOCK_ALIGNMENT; |
| 38 | typedef struct { pthread_mutex_t mutex; } __rtld_lock_recursive_t; | 39 | typedef struct { pthread_mutex_t mutex; } __rtld_lock_recursive_t; |
| 39 | typedef pthread_rwlock_t __libc_rwlock_t; | 40 | typedef pthread_rwlock_t __libc_rwlock_t; |
| 40 | 41 |
lib/libc/glibc/sysdeps/nptl/pthread.h+6-6| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2002-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2002-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -516,7 +516,7 @@ extern int pthread_once (pthread_once_t *__once_control, | ... | @@ -516,7 +516,7 @@ extern int pthread_once (pthread_once_t *__once_control, |
| 516 | exception in C++ code. If cancellation is implemented by unwinding | 516 | exception in C++ code. If cancellation is implemented by unwinding |
| 517 | this is necessary to have the compiler generate the unwind information. */ | 517 | this is necessary to have the compiler generate the unwind information. */ |
| 518 | 518 | ||
| 519 | /* Set cancelability state of current thread to STATE, returning old | 519 | /* Set cancellability state of current thread to STATE, returning old |
| 520 | state in *OLDSTATE if OLDSTATE is not NULL. */ | 520 | state in *OLDSTATE if OLDSTATE is not NULL. */ |
| 521 | extern int pthread_setcancelstate (int __state, int *__oldstate); | 521 | extern int pthread_setcancelstate (int __state, int *__oldstate); |
| 522 | 522 | ||
| ... | @@ -933,7 +933,7 @@ extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, | ... | @@ -933,7 +933,7 @@ extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, |
| 933 | # ifdef __USE_GNU | 933 | # ifdef __USE_GNU |
| 934 | # ifdef __REDIRECT_NTH | 934 | # ifdef __REDIRECT_NTH |
| 935 | extern int __REDIRECT_NTH (pthread_mutexattr_getrobust_np, | 935 | extern int __REDIRECT_NTH (pthread_mutexattr_getrobust_np, |
| 936 | 			 (pthread_mutex_t *, int *), | 936 | 			 (pthread_mutexattr_t *, int *), |
| 937 | 			 pthread_mutexattr_getrobust) __nonnull ((1)) | 937 | 			 pthread_mutexattr_getrobust) __nonnull ((1)) |
| 938 | __attribute_deprecated_msg__ ("\ | 938 | __attribute_deprecated_msg__ ("\ |
| 939 | pthread_mutexattr_getrobust_np is deprecated, use pthread_mutexattr_getrobust"); | 939 | pthread_mutexattr_getrobust_np is deprecated, use pthread_mutexattr_getrobust"); |
| ... | @@ -949,7 +949,7 @@ extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, | ... | @@ -949,7 +949,7 @@ extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, |
| 949 | # ifdef __USE_GNU | 949 | # ifdef __USE_GNU |
| 950 | # ifdef __REDIRECT_NTH | 950 | # ifdef __REDIRECT_NTH |
| 951 | extern int __REDIRECT_NTH (pthread_mutexattr_setrobust_np, | 951 | extern int __REDIRECT_NTH (pthread_mutexattr_setrobust_np, |
| 952 | 			 (pthread_mutex_t *, int), | 952 | 			 (pthread_mutexattr_t *, int), |
| 953 | 			 pthread_mutexattr_setrobust) __nonnull ((1)) | 953 | 			 pthread_mutexattr_setrobust) __nonnull ((1)) |
| 954 | __attribute_deprecated_msg__ ("\ | 954 | __attribute_deprecated_msg__ ("\ |
| 955 | pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust"); | 955 | pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust"); |
| ... | @@ -981,7 +981,7 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) | ... | @@ -981,7 +981,7 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) |
| 981 | __THROWNL __nonnull ((1)); | 981 | __THROWNL __nonnull ((1)); |
| 982 | 982 | ||
| 983 | # ifdef __USE_XOPEN2K | 983 | # ifdef __USE_XOPEN2K |
| 984 | /* Try to acquire read lock for RWLOCK or return after specfied time. */ | 984 | /* Try to acquire read lock for RWLOCK or return after specified time. */ |
| 985 | # ifndef __USE_TIME_BITS64 | 985 | # ifndef __USE_TIME_BITS64 |
| 986 | extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, | 986 | extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, |
| 987 | 				 const struct timespec *__restrict | 987 | 				 const struct timespec *__restrict |
| ... | @@ -1028,7 +1028,7 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) | ... | @@ -1028,7 +1028,7 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) |
| 1028 | __THROWNL __nonnull ((1)); | 1028 | __THROWNL __nonnull ((1)); |
| 1029 | 1029 | ||
| 1030 | # ifdef __USE_XOPEN2K | 1030 | # ifdef __USE_XOPEN2K |
| 1031 | /* Try to acquire write lock for RWLOCK or return after specfied time. */ | 1031 | /* Try to acquire write lock for RWLOCK or return after specified time. */ |
| 1032 | # ifndef __USE_TIME_BITS64 | 1032 | # ifndef __USE_TIME_BITS64 |
| 1033 | extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, | 1033 | extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, |
| 1034 | 				 const struct timespec *__restrict | 1034 | 				 const struct timespec *__restrict |
lib/libc/glibc/sysdeps/powerpc/powerpc32/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for PowerPC. | 1 | /* Special .init and .fini section support for PowerPC. |
| 2 | Copyright (C) 2012-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/powerpc/powerpc32/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for PowerPC. | 1 | /* Special .init and .fini section support for PowerPC. |
| 2 | Copyright (C) 2012-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/powerpc/powerpc32/start.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Startup code for programs linked with GNU libc. | 1 | /* Startup code for programs linked with GNU libc. |
| 2 | Copyright (C) 1998-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1998-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/powerpc/powerpc32/symbol-hacks.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Hacks needed for symbol manipulation. powerpc version. | 1 | /* Hacks needed for symbol manipulation. powerpc version. |
| 2 | Copyright (C) 2017-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/powerpc/powerpc32/sysdep.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembly macros for 32-bit PowerPC. | 1 | /* Assembly macros for 32-bit PowerPC. |
| 2 | Copyright (C) 1999-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/powerpc/powerpc64/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for PowerPC64. | 1 | /* Special .init and .fini section support for PowerPC64. |
| 2 | Copyright (C) 2012-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/powerpc/powerpc64/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for PowerPC64. | 1 | /* Special .init and .fini section support for PowerPC64. |
| 2 | Copyright (C) 2012-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/powerpc/powerpc64/dl-dtprocnum.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Configuration of lookup functions. PowerPC64 version. | 1 | /* Configuration of lookup functions. PowerPC64 version. |
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/powerpc/powerpc64/entry.h deleted-37| ... | @@ -1,37 +0,0 @@ | ||
| 1 | /* Finding the entry point and start of text. PowerPC64 version. | ||
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | ||
| 3 | This file is part of the GNU C Library. | ||
| 4 | |||
| 5 | The GNU C Library is free software; you can redistribute it and/or | ||
| 6 | modify it under the terms of the GNU Lesser General Public | ||
| 7 | License as published by the Free Software Foundation; either | ||
| 8 | version 2.1 of the License, or (at your option) any later version. | ||
| 9 | |||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | Lesser General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU Lesser General Public | ||
| 16 | License along with the GNU C Library; if not, see | ||
| 17 | <https://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | |||
| 20 | #ifndef __ASSEMBLY__ | ||
| 21 | extern void _start (void); | ||
| 22 | #endif | ||
| 23 | |||
| 24 | #define ENTRY_POINT _start | ||
| 25 | |||
| 26 | #if _CALL_ELF != 2 | ||
| 27 | /* We have to provide a special declaration. */ | ||
| 28 | #define ENTRY_POINT_DECL(class) class void _start (void); | ||
| 29 | |||
| 30 | /* Use the address of ._start as the lowest address for which we need | ||
| 31 | to keep profiling records. We can't copy the ia64 scheme as our | ||
| 32 | entry poiny address is really the address of the function | ||
| 33 | descriptor, not the actual function entry. */ | ||
| 34 | #define TEXT_START \ | ||
| 35 | ({ extern unsigned long int _start_as_data[] asm ("_start"); \ | ||
| 36 | _start_as_data[0]; }) | ||
| 37 | #endif | ||
lib/libc/glibc/sysdeps/powerpc/powerpc64/start.S+3-2| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Startup code for programs linked with GNU libc. PowerPC64 version. | 1 | /* Startup code for programs linked with GNU libc. PowerPC64 version. |
| 2 | Copyright (C) 1998-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1998-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -74,7 +74,8 @@ ENTRY (_start) | ... | @@ -74,7 +74,8 @@ ENTRY (_start) |
| 74 | 74 | ||
| 75 | /* put the address of start_addresses in r8... ** | 75 | /* put the address of start_addresses in r8... ** |
| 76 | ** PPC64 ABI uses R13 for thread local, so we leave it alone */ | 76 | ** PPC64 ABI uses R13 for thread local, so we leave it alone */ |
| 77 | 	ld	r8,.L01@toc(r2) | 77 | 	addis	r8,r2,.L01@toc@ha |
| 78 | 	ld	r8,.L01@toc@l(r8) | ||
| 78 | 79 | ||
| 79 | /* and continue in libc-start, in glibc. */ | 80 | /* and continue in libc-start, in glibc. */ |
| 80 | 	b	JUMPTARGET(__libc_start_main) | 81 | 	b	JUMPTARGET(__libc_start_main) |
lib/libc/glibc/sysdeps/powerpc/powerpc64/sysdep.h+11-7| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembly macros for 64-bit PowerPC. | 1 | /* Assembly macros for 64-bit PowerPC. |
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -275,12 +275,14 @@ LT_LABELSUFFIX(name,_name_end): ; \ | ... | @@ -275,12 +275,14 @@ LT_LABELSUFFIX(name,_name_end): ; \ |
| 275 | /* Allocate frame and save register */ | 275 | /* Allocate frame and save register */ |
| 276 | #define NVOLREG_SAVE \ | 276 | #define NVOLREG_SAVE \ |
| 277 | stdu r1,-SCV_FRAME_SIZE(r1); \ | 277 | stdu r1,-SCV_FRAME_SIZE(r1); \ |
| 278 | cfi_adjust_cfa_offset(SCV_FRAME_SIZE); \ | ||
| 278 | std r31,SCV_FRAME_NVOLREG_SAVE(r1); \ | 279 | std r31,SCV_FRAME_NVOLREG_SAVE(r1); \ |
| 279 | cfi_adjust_cfa_offset(SCV_FRAME_SIZE); | 280 | cfi_rel_offset(r31,SCV_FRAME_NVOLREG_SAVE); |
| 280 | 281 | ||
| 281 | /* Restore register and destroy frame */ | 282 | /* Restore register and destroy frame */ |
| 282 | #define NVOLREG_RESTORE	\ | 283 | #define NVOLREG_RESTORE	\ |
| 283 | ld r31,SCV_FRAME_NVOLREG_SAVE(r1); \ | 284 | ld r31,SCV_FRAME_NVOLREG_SAVE(r1); \ |
| 285 | cfi_restore(r31); \ | ||
| 284 | addi r1,r1,SCV_FRAME_SIZE; \ | 286 | addi r1,r1,SCV_FRAME_SIZE; \ |
| 285 | cfi_adjust_cfa_offset(-SCV_FRAME_SIZE); | 287 | cfi_adjust_cfa_offset(-SCV_FRAME_SIZE); |
| 286 | 288 | ||
| ... | @@ -331,13 +333,13 @@ LT_LABELSUFFIX(name,_name_end): ; \ | ... | @@ -331,13 +333,13 @@ LT_LABELSUFFIX(name,_name_end): ; \ |
| 331 | 333 | ||
| 332 | #define DO_CALL_SCV \ | 334 | #define DO_CALL_SCV \ |
| 333 | mflr r9; \ | 335 | mflr r9; \ |
| 334 | std r9,FRAME_LR_SAVE(r1); \ | 336 | std r9,SCV_FRAME_SIZE+FRAME_LR_SAVE(r1); \ |
| 335 | cfi_offset(lr,FRAME_LR_SAVE); \ | 337 | cfi_rel_offset(lr,SCV_FRAME_SIZE+FRAME_LR_SAVE); \ |
| 336 | .machine "push"; \ | 338 | .machine "push"; \ |
| 337 | .machine "power9"; \ | 339 | .machine "power9"; \ |
| 338 | scv 0; \ | 340 | scv 0; \ |
| 339 | .machine "pop"; \ | 341 | .machine "pop"; \ |
| 340 | ld r9,FRAME_LR_SAVE(r1); \ | 342 | ld r9,SCV_FRAME_SIZE+FRAME_LR_SAVE(r1); \ |
| 341 | mtlr r9; \ | 343 | mtlr r9; \ |
| 342 | cfi_restore(lr); | 344 | cfi_restore(lr); |
| 343 | 345 | ||
| ... | @@ -467,14 +469,16 @@ LT_LABELSUFFIX(name,_name_end): ; \ | ... | @@ -467,14 +469,16 @@ LT_LABELSUFFIX(name,_name_end): ; \ |
| 467 | 	.tc _rtld_global_ro[TC],_rtld_global_ro | 469 | 	.tc _rtld_global_ro[TC],_rtld_global_ro |
| 468 | # endif | 470 | # endif |
| 469 | # define __GLRO(rOUT, var, offset)		\ | 471 | # define __GLRO(rOUT, var, offset)		\ |
| 470 | 	ld	rOUT,.LC__ ## var@toc(r2);	\ | 472 | 	addis	rOUT,r2,.LC__ ## var@toc@ha;	\ |
| 473 | 	ld	rOUT,.LC__ ## var@toc@l(rOUT);	\ | ||
| 471 | 	lwz	rOUT,offset(rOUT) | 474 | 	lwz	rOUT,offset(rOUT) |
| 472 | #else | 475 | #else |
| 473 | # define __GLRO_DEF(var)			\ | 476 | # define __GLRO_DEF(var)			\ |
| 474 | .LC__ ## var:					\ | 477 | .LC__ ## var:					\ |
| 475 | 	.tc _ ## var[TC],_ ## var | 478 | 	.tc _ ## var[TC],_ ## var |
| 476 | # define __GLRO(rOUT, var, offset)		\ | 479 | # define __GLRO(rOUT, var, offset)		\ |
| 477 | 	ld	rOUT,.LC__ ## var@toc(r2);	\ | 480 | 	addis	rOUT,r2,.LC__ ## var@toc@ha;	\ |
| 481 | 	ld	rOUT,.LC__ ## var@toc@l(rOUT);	\ | ||
| 478 | 	lwz	rOUT,0(rOUT) | 482 | 	lwz	rOUT,0(rOUT) |
| 479 | #endif | 483 | #endif |
| 480 | 484 |
lib/libc/glibc/sysdeps/powerpc/sysdep.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1999-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/riscv/nptl/bits/pthreadtypes-arch.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Machine-specific pthread type layouts. RISC-V version. | 1 | /* Machine-specific pthread type layouts. RISC-V version. |
| 2 | Copyright (C) 2011-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/riscv/start.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Startup code compliant to the ELF RISC-V ABI. | 1 | /* Startup code compliant to the ELF RISC-V ABI. |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/s390/s390-32/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for S/390. | 1 | /* Special .init and .fini section support for S/390. |
| 2 | Copyright (C) 2000-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/s390/s390-32/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for S/390. | 1 | /* Special .init and .fini section support for S/390. |
| 2 | Copyright (C) 2000-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/s390/s390-32/dl-sysdep.h deleted-23| ... | @@ -1,23 +0,0 @@ | ||
| 1 | /* System-specific settings for dynamic linker code. S/390 version. | ||
| 2 | Copyright (C) 2014-2021 Free Software Foundation, Inc. | ||
| 3 | This file is part of the GNU C Library. | ||
| 4 | |||
| 5 | The GNU C Library is free software; you can redistribute it and/or | ||
| 6 | modify it under the terms of the GNU Lesser General Public | ||
| 7 | License as published by the Free Software Foundation; either | ||
| 8 | version 2.1 of the License, or (at your option) any later version. | ||
| 9 | |||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | Lesser General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU Lesser General Public | ||
| 16 | License along with the GNU C Library. If not, see | ||
| 17 | <https://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | #include_next <dl-sysdep.h> | ||
| 20 | |||
| 21 | /* _dl_argv cannot be attribute_relro, because _dl_start_user | ||
| 22 | might write into it after _dl_start returns. */ | ||
| 23 | #define DL_ARGV_NOT_RELRO 1 | ||
lib/libc/glibc/sysdeps/s390/s390-32/start.S+2-3| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Startup code compliant to the ELF s390 ABI. | 1 | /* Startup code compliant to the ELF s390 ABI. |
| 2 | Copyright (C) 2000-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 3 | Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). | ||
| 4 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 5 | 4 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -81,7 +80,7 @@ _start: | ... | @@ -81,7 +80,7 @@ _start: |
| 81 | 80 | ||
| 82 | 	/* Usually the auxiliary vector can be expected directly after | 81 | 	/* Usually the auxiliary vector can be expected directly after |
| 83 | 	 the environment variables. But we have to skip extra zeros | 82 | 	 the environment variables. But we have to skip extra zeros |
| 84 | 	 because the loader might have removed unsecure variables for | 83 | 	 because the loader might have removed insecure variables for |
| 85 | 	 setuid programs. */ | 84 | 	 setuid programs. */ |
| 86 | 85 | ||
| 87 | .L26:	l	%r5,0(%r6) | 86 | .L26:	l	%r5,0(%r6) |
lib/libc/glibc/sysdeps/s390/s390-32/symbol-hacks.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Hacks needed for symbol manipulation. s390 version. | 1 | /* Hacks needed for symbol manipulation. s390 version. |
| 2 | Copyright (C) 2017-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/s390/s390-32/sysdep.h+1-2| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Assembler macros for s390. | 1 | /* Assembler macros for s390. |
| 2 | Copyright (C) 2000-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 3 | Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). | ||
| 4 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 5 | 4 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/s390/s390-64/crti.S+1-2| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Special .init and .fini section support for 64 bit S/390. | 1 | /* Special .init and .fini section support for 64 bit S/390. |
| 2 | Copyright (C) 2001-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2001-2023 Free Software Foundation, Inc. |
| 3 | Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). | ||
| 4 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 5 | 4 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/s390/s390-64/crtn.S+1-2| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Special .init and .fini section support for 64 bit S/390. | 1 | /* Special .init and .fini section support for 64 bit S/390. |
| 2 | Copyright (C) 2001-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2001-2023 Free Software Foundation, Inc. |
| 3 | Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). | ||
| 4 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 5 | 4 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/s390/s390-64/start.S+29-2| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Startup code compliant to the 64 bit S/390 ELF ABI. | 1 | /* Startup code compliant to the 64 bit S/390 ELF ABI. |
| 2 | Copyright (C) 2001-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2001-2023 Free Software Foundation, Inc. |
| 3 | Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). | ||
| 4 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 5 | 4 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -85,10 +84,25 @@ _start: | ... | @@ -85,10 +84,25 @@ _start: |
| 85 | 84 | ||
| 86 | 	/* Ok, now branch to the libc main routine. */ | 85 | 	/* Ok, now branch to the libc main routine. */ |
| 87 | #ifdef PIC | 86 | #ifdef PIC |
| 87 | # ifdef SHARED | ||
| 88 | 	/* Used for dynamic linked position independent executable. | ||
| 89 | 	 => Scrt1.o */ | ||
| 88 | 	larl	%r2,main@GOTENT		# load pointer to main | 90 | 	larl	%r2,main@GOTENT		# load pointer to main |
| 89 | 	lg	%r2,0(%r2) | 91 | 	lg	%r2,0(%r2) |
| 92 | # else | ||
| 93 | 	/* Used for dynamic linked position dependent executable. | ||
| 94 | 	 => crt1.o (glibc configured without --disable-default-pie: | ||
| 95 | 	 PIC is defined) | ||
| 96 | 	 Or for static linked position independent executable. | ||
| 97 | 	 => rcrt1.o (only available if glibc configured without | ||
| 98 | 	 --disable-default-pie: PIC is defined) */ | ||
| 99 | 	larl	%r2,__wrap_main | ||
| 100 | # endif | ||
| 90 | 	brasl	%r14,__libc_start_main@plt | 101 | 	brasl	%r14,__libc_start_main@plt |
| 91 | #else | 102 | #else |
| 103 | 	/* Used for dynamic/static linked position dependent executable. | ||
| 104 | 	 => crt1.o (glibc configured with --disable-default-pie: | ||
| 105 | 	 PIC and SHARED are not defined) */ | ||
| 92 | 	larl	%r2,main		# load pointer to main | 106 | 	larl	%r2,main		# load pointer to main |
| 93 | 	brasl	%r14,__libc_start_main | 107 | 	brasl	%r14,__libc_start_main |
| 94 | #endif | 108 | #endif |
| ... | @@ -98,6 +112,19 @@ _start: | ... | @@ -98,6 +112,19 @@ _start: |
| 98 | 112 | ||
| 99 | 	cfi_endproc | 113 | 	cfi_endproc |
| 100 | 114 | ||
| 115 | #if defined PIC && !defined SHARED | ||
| 116 | 	/* When main is not defined in the executable but in a shared library | ||
| 117 | 	 then a wrapper is needed in crt1.o of the static-pie enabled libc, | ||
| 118 | 	 because crt1.o and rcrt1.o share code and the later must avoid the | ||
| 119 | 	 use of GOT relocations before __libc_start_main is called. */ | ||
| 120 | __wrap_main: | ||
| 121 | 	cfi_startproc | ||
| 122 | 	larl	%r1,main@GOTENT		# load pointer to main | ||
| 123 | 	lg	%r1,0(%r1) | ||
| 124 | 	br	%r1 | ||
| 125 | 	cfi_endproc | ||
| 126 | #endif | ||
| 127 | |||
| 101 | 	/* Define a symbol for the first piece of initialized data. */ | 128 | 	/* Define a symbol for the first piece of initialized data. */ |
| 102 | 	.data | 129 | 	.data |
| 103 | 	.globl __data_start | 130 | 	.globl __data_start |
lib/libc/glibc/sysdeps/s390/s390-64/sysdep.h+1-2| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Assembler macros for 64 bit S/390. | 1 | /* Assembler macros for 64 bit S/390. |
| 2 | Copyright (C) 2001-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2001-2023 Free Software Foundation, Inc. |
| 3 | Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). | ||
| 4 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 5 | 4 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/sh/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for SH. | 1 | /* Special .init and .fini section support for SH. |
| 2 | Copyright (C) 2000-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/sh/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for SH. | 1 | /* Special .init and .fini section support for SH. |
| 2 | Copyright (C) 2000-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/sh/start.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Startup code for SH & ELF. | 1 | /* Startup code for SH & ELF. |
| 2 | Copyright (C) 1999-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/sh/sysdep.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembler macros for SH. | 1 | /* Assembler macros for SH. |
| 2 | Copyright (C) 1999-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/sparc/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for sparc. | 1 | /* Special .init and .fini section support for sparc. |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/sparc/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for sparc. | 1 | /* Special .init and .fini section support for sparc. |
| 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/sparc/dl-dtprocnum.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Configuration of lookup functions. SPARC version. | 1 | /* Configuration of lookup functions. SPARC version. |
| 2 | Copyright (C) 2000-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/sparc/dl-sysdep.h deleted-23| ... | @@ -1,23 +0,0 @@ | ||
| 1 | /* System-specific settings for dynamic linker code. SPARC version. | ||
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | ||
| 3 | This file is part of the GNU C Library. | ||
| 4 | |||
| 5 | The GNU C Library is free software; you can redistribute it and/or | ||
| 6 | modify it under the terms of the GNU Lesser General Public | ||
| 7 | License as published by the Free Software Foundation; either | ||
| 8 | version 2.1 of the License, or (at your option) any later version. | ||
| 9 | |||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | Lesser General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU Lesser General Public | ||
| 16 | License along with the GNU C Library; if not, see | ||
| 17 | <https://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | #include_next <dl-sysdep.h> | ||
| 20 | |||
| 21 | /* _dl_argv cannot be attribute_relro, because _dl_start_user | ||
| 22 | might write into it after _dl_start returns. */ | ||
| 23 | #define DL_ARGV_NOT_RELRO 1 | ||
lib/libc/glibc/sysdeps/sparc/sparc32/start.S+1-2| ... | @@ -1,7 +1,6 @@ | ... | @@ -1,7 +1,6 @@ |
| 1 | /* Startup code for elf32-sparc | 1 | /* Startup code for elf32-sparc |
| 2 | Copyright (C) 1997-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1997-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997. | ||
| 5 | 4 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 7 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
lib/libc/glibc/sysdeps/sparc/sparc64/start.S+1-2| ... | @@ -1,7 +1,6 @@ | ... | @@ -1,7 +1,6 @@ |
| 1 | /* Startup code for elf64-sparc | 1 | /* Startup code for elf64-sparc |
| 2 | Copyright (C) 1997-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1997-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997. | ||
| 5 | 4 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 7 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
lib/libc/glibc/sysdeps/sparc/sysdep.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2011-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2011-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/arm/sysdep.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1997-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1997-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/i386/sysdep.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1991-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1991-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/mips/mips32/sysdep.h+1-2| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Copyright (C) 1992-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | Contributed by Brendan Kehoe (brendan@zen.org). | ||
| 4 | 3 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
lib/libc/glibc/sysdeps/unix/mips/mips64/sysdep.h+1-2| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Copyright (C) 1992-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | Contributed by Alexandre Oliva <aoliva@redhat.com>. | ||
| 4 | 3 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
lib/libc/glibc/sysdeps/unix/mips/sysdep.h+1-2| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Copyright (C) 1992-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | Contributed by Brendan Kehoe (brendan@zen.org). | ||
| 4 | 3 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
lib/libc/glibc/sysdeps/unix/powerpc/sysdep.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1991-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1991-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sh/sysdep.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1999-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysdep.h+21-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1991-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1991-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -57,6 +57,26 @@ | ... | @@ -57,6 +57,26 @@ |
| 57 | #define INTERNAL_SYSCALL_CALL(...) \ | 57 | #define INTERNAL_SYSCALL_CALL(...) \ |
| 58 | __INTERNAL_SYSCALL_DISP (__INTERNAL_SYSCALL, __VA_ARGS__) | 58 | __INTERNAL_SYSCALL_DISP (__INTERNAL_SYSCALL, __VA_ARGS__) |
| 59 | 59 | ||
| 60 | #define __INTERNAL_SYSCALL_NCS0(name) \ | ||
| 61 | INTERNAL_SYSCALL_NCS (name, 0) | ||
| 62 | #define __INTERNAL_SYSCALL_NCS1(name, a1) \ | ||
| 63 | INTERNAL_SYSCALL_NCS (name, 1, a1) | ||
| 64 | #define __INTERNAL_SYSCALL_NCS2(name, a1, a2) \ | ||
| 65 | INTERNAL_SYSCALL_NCS (name, 2, a1, a2) | ||
| 66 | #define __INTERNAL_SYSCALL_NCS3(name, a1, a2, a3) \ | ||
| 67 | INTERNAL_SYSCALL_NCS (name, 3, a1, a2, a3) | ||
| 68 | #define __INTERNAL_SYSCALL_NCS4(name, a1, a2, a3, a4) \ | ||
| 69 | INTERNAL_SYSCALL_NCS (name, 4, a1, a2, a3, a4) | ||
| 70 | #define __INTERNAL_SYSCALL_NCS5(name, a1, a2, a3, a4, a5) \ | ||
| 71 | INTERNAL_SYSCALL_NCS (name, 5, a1, a2, a3, a4, a5) | ||
| 72 | #define __INTERNAL_SYSCALL_NCS6(name, a1, a2, a3, a4, a5, a6) \ | ||
| 73 | INTERNAL_SYSCALL_NCS (name, 6, a1, a2, a3, a4, a5, a6) | ||
| 74 | #define __INTERNAL_SYSCALL_NCS7(name, a1, a2, a3, a4, a5, a6, a7) \ | ||
| 75 | INTERNAL_SYSCALL_NCS (name, 7, a1, a2, a3, a4, a5, a6, a7) | ||
| 76 | |||
| 77 | #define INTERNAL_SYSCALL_NCS_CALL(...) \ | ||
| 78 | __INTERNAL_SYSCALL_DISP (__INTERNAL_SYSCALL_NCS, __VA_ARGS__) | ||
| 79 | |||
| 60 | #define __INLINE_SYSCALL0(name) \ | 80 | #define __INLINE_SYSCALL0(name) \ |
| 61 | INLINE_SYSCALL (name, 0) | 81 | INLINE_SYSCALL (name, 0) |
| 62 | #define __INLINE_SYSCALL1(name, a1) \ | 82 | #define __INLINE_SYSCALL1(name, a1) \ |
lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/kernel-features.h+1-1| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Set flags signalling availability of kernel features based on given | 1 | /* Set flags signalling availability of kernel features based on given |
| 2 | kernel version number. AArch64 version. | 2 | kernel version number. AArch64 version. |
| 3 | Copyright (C) 2018-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 2018-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sys/elf.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1996-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1996-2023 Free Software Foundation, Inc. |
| 2 | 2 | ||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 |
lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sysdep.h+4-48| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2005-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2005-2023 Free Software Foundation, Inc. |
| 2 | 2 | ||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| ... | @@ -21,7 +21,8 @@ | ... | @@ -21,7 +21,8 @@ |
| 21 | 21 | ||
| 22 | #include <sysdeps/unix/sysdep.h> | 22 | #include <sysdeps/unix/sysdep.h> |
| 23 | #include <sysdeps/aarch64/sysdep.h> | 23 | #include <sysdeps/aarch64/sysdep.h> |
| 24 | #include <sysdeps/unix/sysv/linux/generic/sysdep.h> | 24 | #include <sysdeps/unix/sysdep.h> |
| 25 | #include <sysdeps/unix/sysv/linux/sysdep.h> | ||
| 25 | 26 | ||
| 26 | /* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */ | 27 | /* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */ |
| 27 | #include <dl-sysdep.h> | 28 | #include <dl-sysdep.h> |
| ... | @@ -164,7 +165,7 @@ | ... | @@ -164,7 +165,7 @@ |
| 164 | # define HAVE_CLOCK_GETTIME64_VSYSCALL	"__kernel_clock_gettime" | 165 | # define HAVE_CLOCK_GETTIME64_VSYSCALL	"__kernel_clock_gettime" |
| 165 | # define HAVE_GETTIMEOFDAY_VSYSCALL	"__kernel_gettimeofday" | 166 | # define HAVE_GETTIMEOFDAY_VSYSCALL	"__kernel_gettimeofday" |
| 166 | 167 | ||
| 167 | # define SINGLE_THREAD_BY_GLOBAL		1 | 168 | # define HAVE_CLONE3_WRAPPER		1 |
| 168 | 169 | ||
| 169 | # undef INTERNAL_SYSCALL_RAW | 170 | # undef INTERNAL_SYSCALL_RAW |
| 170 | # define INTERNAL_SYSCALL_RAW(name, nr, args...)		\ | 171 | # define INTERNAL_SYSCALL_RAW(name, nr, args...)		\ |
| ... | @@ -235,49 +236,4 @@ | ... | @@ -235,49 +236,4 @@ |
| 235 | 236 | ||
| 236 | #endif	/* __ASSEMBLER__ */ | 237 | #endif	/* __ASSEMBLER__ */ |
| 237 | 238 | ||
| 238 | /* Pointer mangling is supported for AArch64. */ | ||
| 239 | #if (IS_IN (rtld) \ | ||
| 240 | || (!defined SHARED && (IS_IN (libc) \ | ||
| 241 | 			 || IS_IN (libpthread)))) | ||
| 242 | # ifdef __ASSEMBLER__ | ||
| 243 | /* Note, dst, src, guard, and tmp are all register numbers rather than | ||
| 244 | register names so they will work with both ILP32 and LP64. */ | ||
| 245 | # define PTR_MANGLE(dst, src, guard, tmp) \ | ||
| 246 | LDST_PCREL (ldr, guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard_local)); \ | ||
| 247 | PTR_MANGLE2 (dst, src, guard) | ||
| 248 | /* Use PTR_MANGLE2 for efficiency if guard is already loaded. */ | ||
| 249 | # define PTR_MANGLE2(dst, src, guard)\ | ||
| 250 | eor x##dst, x##src, x##guard | ||
| 251 | # define PTR_DEMANGLE(dst, src, guard, tmp)\ | ||
| 252 | PTR_MANGLE (dst, src, guard, tmp) | ||
| 253 | # define PTR_DEMANGLE2(dst, src, guard)\ | ||
| 254 | PTR_MANGLE2 (dst, src, guard) | ||
| 255 | # else | ||
| 256 | extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; | ||
| 257 | # define PTR_MANGLE(var) \ | ||
| 258 | (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local) | ||
| 259 | # define PTR_DEMANGLE(var) PTR_MANGLE (var) | ||
| 260 | # endif | ||
| 261 | #else | ||
| 262 | # ifdef __ASSEMBLER__ | ||
| 263 | /* Note, dst, src, guard, and tmp are all register numbers rather than | ||
| 264 | register names so they will work with both ILP32 and LP64. */ | ||
| 265 | # define PTR_MANGLE(dst, src, guard, tmp) \ | ||
| 266 | LDST_GLOBAL (ldr, guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard)); \ | ||
| 267 | PTR_MANGLE2 (dst, src, guard) | ||
| 268 | /* Use PTR_MANGLE2 for efficiency if guard is already loaded. */ | ||
| 269 | # define PTR_MANGLE2(dst, src, guard)\ | ||
| 270 | eor x##dst, x##src, x##guard | ||
| 271 | # define PTR_DEMANGLE(dst, src, guard, tmp)\ | ||
| 272 | PTR_MANGLE (dst, src, guard, tmp) | ||
| 273 | # define PTR_DEMANGLE2(dst, src, guard)\ | ||
| 274 | PTR_MANGLE2 (dst, src, guard) | ||
| 275 | # else | ||
| 276 | extern uintptr_t __pointer_chk_guard attribute_relro; | ||
| 277 | # define PTR_MANGLE(var) \ | ||
| 278 | (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard) | ||
| 279 | # define PTR_DEMANGLE(var) PTR_MANGLE (var) | ||
| 280 | # endif | ||
| 281 | #endif | ||
| 282 | |||
| 283 | #endif /* linux/aarch64/sysdep.h */ | 239 | #endif /* linux/aarch64/sysdep.h */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* bits/typesizes.h -- underlying types for *_t. Linux/Alpha version. | 1 | /* bits/typesizes.h -- underlying types for *_t. Linux/Alpha version. |
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/kernel-features.h+1-1| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Set flags signalling availability of kernel features based on given | 1 | /* Set flags signalling availability of kernel features based on given |
| 2 | kernel version number. | 2 | kernel version number. |
| 3 | Copyright (C) 2010-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 2010-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/sysdep.h+1-44| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Copyright (C) 1992-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995. | ||
| 4 | 3 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
| ... | @@ -33,8 +32,6 @@ | ... | @@ -33,8 +32,6 @@ |
| 33 | #undef SYS_ify | 32 | #undef SYS_ify |
| 34 | #define SYS_ify(syscall_name)	__NR_##syscall_name | 33 | #define SYS_ify(syscall_name)	__NR_##syscall_name |
| 35 | 34 | ||
| 36 | #define SINGLE_THREAD_BY_GLOBAL 1 | ||
| 37 | |||
| 38 | #ifdef __ASSEMBLER__ | 35 | #ifdef __ASSEMBLER__ |
| 39 | #include <asm/pal.h> | 36 | #include <asm/pal.h> |
| 40 | #include <alpha/regdef.h> | 37 | #include <alpha/regdef.h> |
| ... | @@ -316,44 +313,4 @@ __LABEL(name)						\ | ... | @@ -316,44 +313,4 @@ __LABEL(name)						\ |
| 316 | }) | 313 | }) |
| 317 | #endif /* ASSEMBLER */ | 314 | #endif /* ASSEMBLER */ |
| 318 | 315 | ||
| 319 | /* Pointer mangling support. Note that tls access is slow enough that | ||
| 320 | we don't deoptimize things by placing the pointer check value there. */ | ||
| 321 | |||
| 322 | #ifdef __ASSEMBLER__ | ||
| 323 | # if IS_IN (rtld) | ||
| 324 | # define PTR_MANGLE(dst, src, tmp)				\ | ||
| 325 | 	ldah	tmp, __pointer_chk_guard_local($29) !gprelhigh;	\ | ||
| 326 | 	ldq	tmp, __pointer_chk_guard_local(tmp) !gprellow;	\ | ||
| 327 | 	xor	src, tmp, dst | ||
| 328 | # define PTR_MANGLE2(dst, src, tmp)				\ | ||
| 329 | 	xor	src, tmp, dst | ||
| 330 | # elif defined SHARED | ||
| 331 | # define PTR_MANGLE(dst, src, tmp)		\ | ||
| 332 | 	ldq	tmp, __pointer_chk_guard;	\ | ||
| 333 | 	xor	src, tmp, dst | ||
| 334 | # else | ||
| 335 | # define PTR_MANGLE(dst, src, tmp)		\ | ||
| 336 | 	ldq	tmp, __pointer_chk_guard_local;	\ | ||
| 337 | 	xor	src, tmp, dst | ||
| 338 | # endif | ||
| 339 | # define PTR_MANGLE2(dst, src, tmp)		\ | ||
| 340 | 	xor	src, tmp, dst | ||
| 341 | # define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) | ||
| 342 | # define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) | ||
| 343 | #else | ||
| 344 | # include <stdint.h> | ||
| 345 | # if (IS_IN (rtld) \ | ||
| 346 | || (!defined SHARED && (IS_IN (libc) \ | ||
| 347 | 			 || IS_IN (libpthread)))) | ||
| 348 | extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; | ||
| 349 | # define PTR_MANGLE(var) \ | ||
| 350 | 	(var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local) | ||
| 351 | # else | ||
| 352 | extern uintptr_t __pointer_chk_guard attribute_relro; | ||
| 353 | # define PTR_MANGLE(var) \ | ||
| 354 | 	(var) = (__typeof(var)) ((uintptr_t) (var) ^ __pointer_chk_guard) | ||
| 355 | # endif | ||
| 356 | # define PTR_DEMANGLE(var) PTR_MANGLE(var) | ||
| 357 | #endif /* ASSEMBLER */ | ||
| 358 | |||
| 359 | #endif /* _LINUX_ALPHA_SYSDEP_H */ | 316 | #endif /* _LINUX_ALPHA_SYSDEP_H */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/arc/sysdep.h+8-10| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembler macros for ARC. | 1 | /* Assembler macros for ARC. |
| 2 | Copyright (C) 2020-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -20,7 +20,9 @@ | ... | @@ -20,7 +20,9 @@ |
| 20 | #define _LINUX_ARC_SYSDEP_H 1 | 20 | #define _LINUX_ARC_SYSDEP_H 1 |
| 21 | 21 | ||
| 22 | #include <sysdeps/arc/sysdep.h> | 22 | #include <sysdeps/arc/sysdep.h> |
| 23 | #include <sysdeps/unix/sysv/linux/generic/sysdep.h> | 23 | #include <bits/wordsize.h> |
| 24 | #include <sysdeps/unix/sysdep.h> | ||
| 25 | #include <sysdeps/unix/sysv/linux/sysdep.h> | ||
| 24 | 26 | ||
| 25 | /* "workarounds" for generic code needing to handle 64-bit time_t. */ | 27 | /* "workarounds" for generic code needing to handle 64-bit time_t. */ |
| 26 | 28 | ||
| ... | @@ -132,8 +134,6 @@ L (call_syscall_err):			ASM_LINE_SEP	\ | ... | @@ -132,8 +134,6 @@ L (call_syscall_err):			ASM_LINE_SEP	\ |
| 132 | 134 | ||
| 133 | #else /* !__ASSEMBLER__ */ | 135 | #else /* !__ASSEMBLER__ */ |
| 134 | 136 | ||
| 135 | # define SINGLE_THREAD_BY_GLOBAL		1 | ||
| 136 | |||
| 137 | # if IS_IN (libc) | 137 | # if IS_IN (libc) |
| 138 | extern long int __syscall_error (long int); | 138 | extern long int __syscall_error (long int); |
| 139 | hidden_proto (__syscall_error) | 139 | hidden_proto (__syscall_error) |
| ... | @@ -141,6 +141,8 @@ hidden_proto (__syscall_error) | ... | @@ -141,6 +141,8 @@ hidden_proto (__syscall_error) |
| 141 | 141 | ||
| 142 | # define ARC_TRAP_INSN	"trap_s 0	\n\t" | 142 | # define ARC_TRAP_INSN	"trap_s 0	\n\t" |
| 143 | 143 | ||
| 144 | # define HAVE_CLONE3_WRAPPER	1 | ||
| 145 | |||
| 144 | # undef INTERNAL_SYSCALL_NCS | 146 | # undef INTERNAL_SYSCALL_NCS |
| 145 | # define INTERNAL_SYSCALL_NCS(number, nr_args, args...)	\ | 147 | # define INTERNAL_SYSCALL_NCS(number, nr_args, args...)	\ |
| 146 | ({								\ | 148 | ({								\ |
| ... | @@ -180,11 +182,11 @@ hidden_proto (__syscall_error) | ... | @@ -180,11 +182,11 @@ hidden_proto (__syscall_error) |
| 180 | __ret = (long int) (arg1);					\ | 182 | __ret = (long int) (arg1);					\ |
| 181 | LOAD_ARGS_0 (nm, arg1) | 183 | LOAD_ARGS_0 (nm, arg1) |
| 182 | 184 | ||
| 183 | /* Note that the use of _tmpX might look superflous, however it is needed | 185 | /* Note that the use of _tmpX might look superfluous, however it is needed |
| 184 | to ensure that register variables are not clobbered if arg happens to be | 186 | to ensure that register variables are not clobbered if arg happens to be |
| 185 | a function call itself. e.g. sched_setaffinity() calling getpid() for arg2 | 187 | a function call itself. e.g. sched_setaffinity() calling getpid() for arg2 |
| 186 | Also this specific order of recursive calling is important to segregate | 188 | Also this specific order of recursive calling is important to segregate |
| 187 | the tmp args evaluation (function call case described above) and assigment | 189 | the tmp args evaluation (function call case described above) and assignment |
| 188 | of register variables. */ | 190 | of register variables. */ |
| 189 | 191 | ||
| 190 | # define LOAD_ARGS_2(nm, arg1, arg2)			\ | 192 | # define LOAD_ARGS_2(nm, arg1, arg2)			\ |
| ... | @@ -217,10 +219,6 @@ hidden_proto (__syscall_error) | ... | @@ -217,10 +219,6 @@ hidden_proto (__syscall_error) |
| 217 | LOAD_ARGS_6 (nm, arg1, arg2, arg3, arg4, arg5, arg6)	\ | 219 | LOAD_ARGS_6 (nm, arg1, arg2, arg3, arg4, arg5, arg6)	\ |
| 218 | register long int _arg7 __asm__ ("r6") = _tmp7; | 220 | register long int _arg7 __asm__ ("r6") = _tmp7; |
| 219 | 221 | ||
| 220 | /* Pointer mangling not yet supported. */ | ||
| 221 | # define PTR_MANGLE(var) (void) (var) | ||
| 222 | # define PTR_DEMANGLE(var) (void) (var) | ||
| 223 | |||
| 224 | # undef HAVE_INTERNAL_BRK_ADDR_SYMBOL | 222 | # undef HAVE_INTERNAL_BRK_ADDR_SYMBOL |
| 225 | # define HAVE_INTERNAL_BRK_ADDR_SYMBOL 1 | 223 | # define HAVE_INTERNAL_BRK_ADDR_SYMBOL 1 |
| 226 | 224 |
lib/libc/glibc/sysdeps/unix/sysv/linux/arm/kernel-features.h+1-1| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Set flags signalling availability of kernel features based on given | 1 | /* Set flags signalling availability of kernel features based on given |
| 2 | kernel version number. | 2 | kernel version number. |
| 3 | Copyright (C) 2006-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 2006-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sys/elf.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1996-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1996-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sysdep.h+1-5| ... | @@ -1,7 +1,5 @@ | ... | @@ -1,7 +1,5 @@ |
| 1 | /* Copyright (C) 1992-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995. | ||
| 4 | ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997. | ||
| 5 | 3 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| 7 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
| ... | @@ -410,8 +408,6 @@ __local_syscall_error:						\ | ... | @@ -410,8 +408,6 @@ __local_syscall_error:						\ |
| 410 | #define INTERNAL_SYSCALL_NCS(number, nr, args...) \ | 408 | #define INTERNAL_SYSCALL_NCS(number, nr, args...) \ |
| 411 | INTERNAL_SYSCALL_RAW (number, nr, args) | 409 | INTERNAL_SYSCALL_RAW (number, nr, args) |
| 412 | 410 | ||
| 413 | #define SINGLE_THREAD_BY_GLOBAL	1 | ||
| 414 | |||
| 415 | #endif	/* __ASSEMBLER__ */ | 411 | #endif	/* __ASSEMBLER__ */ |
| 416 | 412 | ||
| 417 | #endif /* linux/arm/sysdep.h */ | 413 | #endif /* linux/arm/sysdep.h */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/bits/stat.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1992-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/bits/timex.h+2-2| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1995-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -25,7 +25,7 @@ | ... | @@ -25,7 +25,7 @@ |
| 25 | 25 | ||
| 26 | struct timex | 26 | struct timex |
| 27 | { | 27 | { |
| 28 | # ifdef __USE_TIME_BITS64 | 28 | # if defined __USE_TIME_BITS64 || (__TIMESIZE == 64 && __WORDSIZE == 32) |
| 29 | unsigned int modes; /* mode selector */ | 29 | unsigned int modes; /* mode selector */ |
| 30 | int :32; /* pad */ | 30 | int :32; /* pad */ |
| 31 | long long offset; /* time offset (usec) */ | 31 | long long offset; /* time offset (usec) */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/csky/kernel_stat.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Internal definitions for stat functions. Linux/csky. | 1 | /* Internal definitions for stat functions. Linux/csky. |
| 2 | Copyright (C) 2011-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/csky/sysdep.h+2-48| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembly macros for C-SKY. | 1 | /* Assembly macros for C-SKY. |
| 2 | Copyright (C) 2018-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2018-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -20,9 +20,9 @@ | ... | @@ -20,9 +20,9 @@ |
| 20 | #define _LINUX_CSKY_SYSDEP_H 1 | 20 | #define _LINUX_CSKY_SYSDEP_H 1 |
| 21 | 21 | ||
| 22 | /* There is some commonality. */ | 22 | /* There is some commonality. */ |
| 23 | #include <sysdeps/unix/sysv/linux/generic/sysdep.h> | ||
| 24 | #include <sysdeps/unix/sysv/linux/sysdep.h> | 23 | #include <sysdeps/unix/sysv/linux/sysdep.h> |
| 25 | #include <sysdeps/csky/sysdep.h> | 24 | #include <sysdeps/csky/sysdep.h> |
| 25 | #include <sysdeps/unix/sysdep.h> | ||
| 26 | 26 | ||
| 27 | /* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */ | 27 | /* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */ |
| 28 | #include <dl-sysdep.h> | 28 | #include <dl-sysdep.h> |
| ... | @@ -466,50 +466,4 @@ __local_syscall_error:				\ | ... | @@ -466,50 +466,4 @@ __local_syscall_error:				\ |
| 466 | 466 | ||
| 467 | #endif /* __ASSEMBLER__ */ | 467 | #endif /* __ASSEMBLER__ */ |
| 468 | 468 | ||
| 469 | /* Pointer mangling support. */ | ||
| 470 | #if (IS_IN (rtld) \ | ||
| 471 | || (!defined SHARED && (IS_IN (libc) || IS_IN (libpthread)))) | ||
| 472 | # ifdef __ASSEMBLER__ | ||
| 473 | # define PTR_MANGLE(dst, src, guard)			\ | ||
| 474 | 	grs	t0, 1f;					\ | ||
| 475 | 1:							\ | ||
| 476 | 	lrw	guard, 1b@GOTPC;			\ | ||
| 477 | 	addu	t0, guard;				\ | ||
| 478 | 	lrw	guard, __pointer_chk_guard_local@GOT;	\ | ||
| 479 | 	ldr.w	guard, (t0, guard << 0);		\ | ||
| 480 | 	ldw	guard, (guard, 0);			\ | ||
| 481 | 	xor	dst, src, guard; | ||
| 482 | # define PTR_DEMANGLE(dst, src, guard) PTR_MANGLE (dst, src, guard) | ||
| 483 | # define PTR_MANGLE2(dst, src, guard) \ | ||
| 484 | 	xor	dst, src, guard | ||
| 485 | # define PTR_DEMANGLE2(dst, src, guard) PTR_MANGLE2 (dst, src, guard) | ||
| 486 | # else | ||
| 487 | extern uintptr_t __pointer_chk_guard_local; | ||
| 488 | # define PTR_MANGLE(var) \ | ||
| 489 | (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local) | ||
| 490 | # define PTR_DEMANGLE(var) PTR_MANGLE (var) | ||
| 491 | # endif | ||
| 492 | #else | ||
| 493 | # ifdef __ASSEMBLER__ | ||
| 494 | # define PTR_MANGLE(dst, src, guard)		\ | ||
| 495 | 	grs	t0, 1f;				\ | ||
| 496 | 1:						\ | ||
| 497 | 	lrw	guard, 1b@GOTPC;		\ | ||
| 498 | 	addu	t0, guard;			\ | ||
| 499 | 	lrw	guard, __pointer_chk_guard@GOT;	\ | ||
| 500 | 	ldr.w	guard, (t0, guard << 0);	\ | ||
| 501 | 	ldw	guard, (guard, 0);		\ | ||
| 502 | 	xor	dst, src, guard; | ||
| 503 | # define PTR_DEMANGLE(dst, src, guard) PTR_MANGLE (dst, src, guard) | ||
| 504 | # define PTR_MANGLE2(dst, src, guard) \ | ||
| 505 | 	xor	dst, src, guard | ||
| 506 | # define PTR_DEMANGLE2(dst, src, guard) PTR_MANGLE2 (dst, src, guard) | ||
| 507 | # else | ||
| 508 | extern uintptr_t __pointer_chk_guard; | ||
| 509 | # define PTR_MANGLE(var) \ | ||
| 510 | (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard) | ||
| 511 | # define PTR_DEMANGLE(var) PTR_MANGLE (var) | ||
| 512 | # endif | ||
| 513 | #endif | ||
| 514 | |||
| 515 | #endif /* linux/csky/sysdep.h */ | 469 | #endif /* linux/csky/sysdep.h */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/dl-sysdep.h+1-8| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* System-specific settings for dynamic linker code. Linux version. | 1 | /* System-specific settings for dynamic linker code. Linux version. |
| 2 | Copyright (C) 2005-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -24,10 +24,3 @@ | ... | @@ -24,10 +24,3 @@ |
| 24 | we aren't making direct use of it. So enable this across the board. */ | 24 | we aren't making direct use of it. So enable this across the board. */ |
| 25 | 25 | ||
| 26 | #define NEED_DL_SYSINFO_DSO	1 | 26 | #define NEED_DL_SYSINFO_DSO	1 |
| 27 | |||
| 28 | |||
| 29 | #ifndef __ASSEMBLER__ | ||
| 30 | /* Get version of the OS. */ | ||
| 31 | extern int _dl_discover_osversion (void) attribute_hidden; | ||
| 32 | # define HAVE_DL_DISCOVER_OSVERSION	1 | ||
| 33 | #endif |
lib/libc/glibc/sysdeps/unix/sysv/linux/fstat.c+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Get file status. Linux version. | 1 | /* Get file status. Linux version. |
| 2 | Copyright (C) 2020-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/fstat64.c+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Get file status. Linux version. | 1 | /* Get file status. Linux version. |
| 2 | Copyright (C) 2020-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/fstatat.c+1-23| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Get file status. Linux version. | 1 | /* Get file status. Linux version. |
| 2 | Copyright (C) 2020-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -16,33 +16,11 @@ | ... | @@ -16,33 +16,11 @@ |
| 16 | License along with the GNU C Library; if not, see | 16 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ | 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | #include <inttypes.h> | ||
| 20 | #include <sys/stat.h> | 19 | #include <sys/stat.h> |
| 21 | #include <kernel_stat.h> | 20 | #include <kernel_stat.h> |
| 22 | #include <sysdep.h> | 21 | #include <sysdep.h> |
| 23 | #include <string.h> | ||
| 24 | 22 | ||
| 25 | #if !XSTAT_IS_XSTAT64 | 23 | #if !XSTAT_IS_XSTAT64 |
| 26 | # include <kstat_cp.h> | ||
| 27 | |||
| 28 | static inline bool | ||
| 29 | in_time_t_range (__time64_t t) | ||
| 30 | { | ||
| 31 | time_t s = t; | ||
| 32 | return s == t; | ||
| 33 | } | ||
| 34 | |||
| 35 | static inline struct timespec | ||
| 36 | valid_timespec64_to_timespec (const struct __timespec64 ts64) | ||
| 37 | { | ||
| 38 | struct timespec ts; | ||
| 39 | |||
| 40 | ts.tv_sec = (time_t) ts64.tv_sec; | ||
| 41 | ts.tv_nsec = ts64.tv_nsec; | ||
| 42 | |||
| 43 | return ts; | ||
| 44 | } | ||
| 45 | |||
| 46 | int | 24 | int |
| 47 | __fstatat (int fd, const char *file, struct stat *buf, int flag) | 25 | __fstatat (int fd, const char *file, struct stat *buf, int flag) |
| 48 | { | 26 | { |
lib/libc/glibc/sysdeps/unix/sysv/linux/fstatat64.c+15-22| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Get file status. Linux version. | 1 | /* Get file status. Linux version. |
| 2 | Copyright (C) 2020-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -18,7 +18,6 @@ | ... | @@ -18,7 +18,6 @@ |
| 18 | 18 | ||
| 19 | #define __fstatat __redirect___fstatat | 19 | #define __fstatat __redirect___fstatat |
| 20 | #define fstatat __redirect_fstatat | 20 | #define fstatat __redirect_fstatat |
| 21 | #include <inttypes.h> | ||
| 22 | #include <sys/stat.h> | 21 | #include <sys/stat.h> |
| 23 | #include <fcntl.h> | 22 | #include <fcntl.h> |
| 24 | #include <string.h> | 23 | #include <string.h> |
| ... | @@ -41,6 +40,12 @@ _Static_assert (sizeof (__blkcnt_t) == sizeof (__blkcnt64_t), | ... | @@ -41,6 +40,12 @@ _Static_assert (sizeof (__blkcnt_t) == sizeof (__blkcnt64_t), |
| 41 | "__blkcnt_t and __blkcnt64_t must match"); | 40 | "__blkcnt_t and __blkcnt64_t must match"); |
| 42 | #endif | 41 | #endif |
| 43 | 42 | ||
| 43 | #if (__WORDSIZE == 32 \ | ||
| 44 | && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) \ | ||
| 45 | || defined STAT_HAS_TIME32 \ | ||
| 46 | || (!defined __NR_newfstatat && !defined __NR_fstatat64) | ||
| 47 | # define FSTATAT_USE_STATX 1 | ||
| 48 | |||
| 44 | static inline int | 49 | static inline int |
| 45 | fstatat64_time64_statx (int fd, const char *file, struct __stat64_t64 *buf, | 50 | fstatat64_time64_statx (int fd, const char *file, struct __stat64_t64 *buf, |
| 46 | 			int flag) | 51 | 			int flag) |
| ... | @@ -54,8 +59,8 @@ fstatat64_time64_statx (int fd, const char *file, struct __stat64_t64 *buf, | ... | @@ -54,8 +59,8 @@ fstatat64_time64_statx (int fd, const char *file, struct __stat64_t64 *buf, |
| 54 | return r; | 59 | return r; |
| 55 | 60 | ||
| 56 | *buf = (struct __stat64_t64) { | 61 | *buf = (struct __stat64_t64) { |
| 57 | .st_dev = gnu_dev_makedev (tmp.stx_dev_major, tmp.stx_dev_minor), | 62 | .st_dev = __gnu_dev_makedev (tmp.stx_dev_major, tmp.stx_dev_minor), |
| 58 | .st_rdev = gnu_dev_makedev (tmp.stx_rdev_major, tmp.stx_rdev_minor), | 63 | .st_rdev = __gnu_dev_makedev (tmp.stx_rdev_major, tmp.stx_rdev_minor), |
| 59 | .st_ino = tmp.stx_ino, | 64 | .st_ino = tmp.stx_ino, |
| 60 | .st_mode = tmp.stx_mode, | 65 | .st_mode = tmp.stx_mode, |
| 61 | .st_nlink = tmp.stx_nlink, | 66 | .st_nlink = tmp.stx_nlink, |
| ... | @@ -74,18 +79,13 @@ fstatat64_time64_statx (int fd, const char *file, struct __stat64_t64 *buf, | ... | @@ -74,18 +79,13 @@ fstatat64_time64_statx (int fd, const char *file, struct __stat64_t64 *buf, |
| 74 | 79 | ||
| 75 | return r; | 80 | return r; |
| 76 | } | 81 | } |
| 82 | #else | ||
| 83 | # define FSTATAT_USE_STATX 0 | ||
| 84 | #endif | ||
| 77 | 85 | ||
| 78 | static inline struct __timespec64 | 86 | /* Only statx supports 64-bit timestamps for 32-bit architectures with |
| 79 | valid_timespec_to_timespec64 (const struct timespec ts) | 87 | __ASSUME_STATX, so there is no point in building the fallback. */ |
| 80 | { | 88 | #if !FSTATAT_USE_STATX || (FSTATAT_USE_STATX && !defined __ASSUME_STATX) |
| 81 | struct __timespec64 ts64; | ||
| 82 | |||
| 83 | ts64.tv_sec = ts.tv_sec; | ||
| 84 | ts64.tv_nsec = ts.tv_nsec; | ||
| 85 | |||
| 86 | return ts64; | ||
| 87 | } | ||
| 88 | |||
| 89 | static inline int | 89 | static inline int |
| 90 | fstatat64_time64_stat (int fd, const char *file, struct __stat64_t64 *buf, | 90 | fstatat64_time64_stat (int fd, const char *file, struct __stat64_t64 *buf, |
| 91 | 		 int flag) | 91 | 		 int flag) |
| ... | @@ -146,13 +146,6 @@ fstatat64_time64_stat (int fd, const char *file, struct __stat64_t64 *buf, | ... | @@ -146,13 +146,6 @@ fstatat64_time64_stat (int fd, const char *file, struct __stat64_t64 *buf, |
| 146 | 146 | ||
| 147 | return r; | 147 | return r; |
| 148 | } | 148 | } |
| 149 | |||
| 150 | #if (__WORDSIZE == 32 \ | ||
| 151 | && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) \ | ||
| 152 | || defined STAT_HAS_TIME32 | ||
| 153 | # define FSTATAT_USE_STATX 1 | ||
| 154 | #else | ||
| 155 | # define FSTATAT_USE_STATX 0 | ||
| 156 | #endif | 149 | #endif |
| 157 | 150 | ||
| 158 | int | 151 | int |
lib/libc/glibc/sysdeps/unix/sysv/linux/generic/bits/typesizes.h deleted-108| ... | @@ -1,108 +0,0 @@ | ||
| 1 | /* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. | ||
| 2 | Copyright (C) 2011-2021 Free Software Foundation, Inc. | ||
| 3 | This file is part of the GNU C Library. | ||
| 4 | Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011. | ||
| 5 | |||
| 6 | The GNU C Library is free software; you can redistribute it and/or | ||
| 7 | modify it under the terms of the GNU Lesser General Public | ||
| 8 | License as published by the Free Software Foundation; either | ||
| 9 | version 2.1 of the License, or (at your option) any later version. | ||
| 10 | |||
| 11 | The GNU C Library is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 14 | Lesser General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU Lesser General Public | ||
| 17 | License along with the GNU C Library. If not, see | ||
| 18 | <https://www.gnu.org/licenses/>. */ | ||
| 19 | |||
| 20 | #ifndef _BITS_TYPES_H | ||
| 21 | # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead." | ||
| 22 | #endif | ||
| 23 | |||
| 24 | #ifndef	_BITS_TYPESIZES_H | ||
| 25 | #define	_BITS_TYPESIZES_H	1 | ||
| 26 | |||
| 27 | /* See <bits/types.h> for the meaning of these macros. This file exists so | ||
| 28 | that <bits/types.h> need not vary across different GNU platforms. */ | ||
| 29 | #if __TIMESIZE == 64 && __WORDSIZE == 32 | ||
| 30 | /* These are the "new" y2038 types defined for architectures added after | ||
| 31 | the 5.1 kernel. */ | ||
| 32 | # define __INO_T_TYPE		__UQUAD_TYPE | ||
| 33 | # define __OFF_T_TYPE		__SQUAD_TYPE | ||
| 34 | # define __RLIM_T_TYPE		__UQUAD_TYPE | ||
| 35 | # define __BLKCNT_T_TYPE	__SQUAD_TYPE | ||
| 36 | # define __FSBLKCNT_T_TYPE	__UQUAD_TYPE | ||
| 37 | # define __FSFILCNT_T_TYPE	__UQUAD_TYPE | ||
| 38 | # define __TIME_T_TYPE		__SQUAD_TYPE | ||
| 39 | # define __SUSECONDS_T_TYPE	__SQUAD_TYPE | ||
| 40 | #else | ||
| 41 | # define __INO_T_TYPE		__ULONGWORD_TYPE | ||
| 42 | # define __OFF_T_TYPE		__SLONGWORD_TYPE | ||
| 43 | # define __RLIM_T_TYPE		__ULONGWORD_TYPE | ||
| 44 | # define __BLKCNT_T_TYPE	__SLONGWORD_TYPE | ||
| 45 | # define __FSBLKCNT_T_TYPE	__ULONGWORD_TYPE | ||
| 46 | # define __FSFILCNT_T_TYPE	__ULONGWORD_TYPE | ||
| 47 | # define __TIME_T_TYPE		__SLONGWORD_TYPE | ||
| 48 | # define __SUSECONDS_T_TYPE	__SLONGWORD_TYPE | ||
| 49 | #endif | ||
| 50 | |||
| 51 | #define __DEV_T_TYPE		__UQUAD_TYPE | ||
| 52 | #define __UID_T_TYPE		__U32_TYPE | ||
| 53 | #define __GID_T_TYPE		__U32_TYPE | ||
| 54 | #define __INO64_T_TYPE		__UQUAD_TYPE | ||
| 55 | #define __MODE_T_TYPE		__U32_TYPE | ||
| 56 | #define __NLINK_T_TYPE		__U32_TYPE | ||
| 57 | #define __OFF64_T_TYPE		__SQUAD_TYPE | ||
| 58 | #define __PID_T_TYPE		__S32_TYPE | ||
| 59 | #define __RLIM64_T_TYPE		__UQUAD_TYPE | ||
| 60 | #define	__BLKCNT64_T_TYPE	__SQUAD_TYPE | ||
| 61 | #define	__FSBLKCNT64_T_TYPE	__UQUAD_TYPE | ||
| 62 | #define	__FSFILCNT64_T_TYPE	__UQUAD_TYPE | ||
| 63 | #define	__FSWORD_T_TYPE		__SWORD_TYPE | ||
| 64 | #define	__ID_T_TYPE		__U32_TYPE | ||
| 65 | #define __CLOCK_T_TYPE		__SLONGWORD_TYPE | ||
| 66 | #define __USECONDS_T_TYPE	__U32_TYPE | ||
| 67 | #define __SUSECONDS64_T_TYPE	__SQUAD_TYPE | ||
| 68 | #define __DADDR_T_TYPE		__S32_TYPE | ||
| 69 | #define __KEY_T_TYPE		__S32_TYPE | ||
| 70 | #define __CLOCKID_T_TYPE	__S32_TYPE | ||
| 71 | #define __TIMER_T_TYPE		void * | ||
| 72 | #define __BLKSIZE_T_TYPE	__S32_TYPE | ||
| 73 | #define __FSID_T_TYPE		struct { int __val[2]; } | ||
| 74 | #define __SSIZE_T_TYPE		__SWORD_TYPE | ||
| 75 | #define __SYSCALL_SLONG_TYPE	__SLONGWORD_TYPE | ||
| 76 | #define __SYSCALL_ULONG_TYPE	__ULONGWORD_TYPE | ||
| 77 | #define __CPU_MASK_TYPE 	__ULONGWORD_TYPE | ||
| 78 | |||
| 79 | #if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32) | ||
| 80 | /* Tell the libc code that off_t and off64_t are actually the same type | ||
| 81 | for all ABI purposes, even if possibly expressed as different base types | ||
| 82 | for C type-checking purposes. */ | ||
| 83 | # define __OFF_T_MATCHES_OFF64_T	1 | ||
| 84 | |||
| 85 | /* Same for ino_t and ino64_t. */ | ||
| 86 | # define __INO_T_MATCHES_INO64_T	1 | ||
| 87 | |||
| 88 | /* And for __rlim_t and __rlim64_t. */ | ||
| 89 | # define __RLIM_T_MATCHES_RLIM64_T	1 | ||
| 90 | |||
| 91 | /* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ | ||
| 92 | # define __STATFS_MATCHES_STATFS64 1 | ||
| 93 | |||
| 94 | /* And for getitimer, setitimer and rusage */ | ||
| 95 | # define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 (__WORDSIZE == 64) | ||
| 96 | #else | ||
| 97 | # define __RLIM_T_MATCHES_RLIM64_T	0 | ||
| 98 | |||
| 99 | # define __STATFS_MATCHES_STATFS64 0 | ||
| 100 | |||
| 101 | # define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0 | ||
| 102 | #endif | ||
| 103 | |||
| 104 | /* Number of descriptors that can fit in an `fd_set'. */ | ||
| 105 | #define	__FD_SETSIZE		1024 | ||
| 106 | |||
| 107 | |||
| 108 | #endif /* bits/typesizes.h */ | ||
lib/libc/glibc/sysdeps/unix/sysv/linux/generic/sysdep.h deleted-27| ... | @@ -1,27 +0,0 @@ | ||
| 1 | /* Copyright (C) 2011-2021 Free Software Foundation, Inc. | ||
| 2 | This file is part of the GNU C Library. | ||
| 3 | Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011. | ||
| 4 | |||
| 5 | The GNU C Library is free software; you can redistribute it and/or | ||
| 6 | modify it under the terms of the GNU Lesser General Public | ||
| 7 | License as published by the Free Software Foundation; either | ||
| 8 | version 2.1 of the License, or (at your option) any later version. | ||
| 9 | |||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | Lesser General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU Lesser General Public | ||
| 16 | License along with the GNU C Library. If not, see | ||
| 17 | <https://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | #include <bits/wordsize.h> | ||
| 20 | #include <kernel-features.h> | ||
| 21 | #include <sysdeps/unix/sysdep.h> | ||
| 22 | #include <sysdeps/unix/sysv/linux/sysdep.h> | ||
| 23 | |||
| 24 | /* Provide the common name to allow more code reuse. */ | ||
| 25 | #ifdef __NR_llseek | ||
| 26 | # define __NR__llseek __NR_llseek | ||
| 27 | #endif | ||
lib/libc/glibc/sysdeps/unix/sysv/linux/generic/xstatver.h deleted-10| ... | @@ -1,10 +0,0 @@ | ||
| 1 | /* Versions of the 'struct stat' data structure used in compatibility xstat | ||
| 2 | functions. */ | ||
| 3 | #define _STAT_VER_KERNEL	0 | ||
| 4 | #define _STAT_VER_LINUX		0 | ||
| 5 | #define _STAT_VER		_STAT_VER_KERNEL | ||
| 6 | |||
| 7 | /* Versions of the 'xmknod' interface used in compatibility xmknod | ||
| 8 | functions. */ | ||
| 9 | #define _MKNOD_VER_LINUX	0 | ||
| 10 | #define _MKNOD_VER		_MKNOD_VER_LINUX | ||
lib/libc/glibc/sysdeps/unix/sysv/linux/hppa/kernel-features.h+4-1| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Set flags signalling availability of kernel features based on given | 1 | /* Set flags signalling availability of kernel features based on given |
| 2 | kernel version number. | 2 | kernel version number. |
| 3 | Copyright (C) 2006-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 2006-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -30,3 +30,6 @@ | ... | @@ -30,3 +30,6 @@ |
| 30 | 30 | ||
| 31 | #undef __ASSUME_CLONE_DEFAULT | 31 | #undef __ASSUME_CLONE_DEFAULT |
| 32 | #define __ASSUME_CLONE_BACKWARDS 1 | 32 | #define __ASSUME_CLONE_BACKWARDS 1 |
| 33 | |||
| 34 | /* QEMU does not support set_robust_list. */ | ||
| 35 | #undef __ASSUME_SET_ROBUST_LIST |
lib/libc/glibc/sysdeps/unix/sysv/linux/hppa/sysdep.h+4-12| ... | @@ -1,8 +1,6 @@ | ... | @@ -1,8 +1,6 @@ |
| 1 | /* Assembler macros for PA-RISC. | 1 | /* Assembler macros for PA-RISC. |
| 2 | Copyright (C) 1999-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999. | ||
| 5 | Linux/PA-RISC changes by Philipp Rumpf, <prumpf@tux.org>, March 2000. | ||
| 6 | 4 | ||
| 7 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 8 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
| ... | @@ -55,7 +53,7 @@ | ... | @@ -55,7 +53,7 @@ |
| 55 | #define LOAD_PIC(LREG) \ | 53 | #define LOAD_PIC(LREG) \ |
| 56 | 	copy LREG , %r19 | 54 | 	copy LREG , %r19 |
| 57 | /* Inline assembly defines */ | 55 | /* Inline assembly defines */ |
| 58 | #define TREG_ASM "%r4" /* Cant clobber r3, it holds framemarker */ | 56 | #define TREG_ASM "%r4" /* Can't clobber r3, it holds framemarker */ |
| 59 | #define SAVE_ASM_PIC	" copy %%r19, %" TREG_ASM "\n" | 57 | #define SAVE_ASM_PIC	" copy %%r19, %" TREG_ASM "\n" |
| 60 | #define LOAD_ASM_PIC	" copy %" TREG_ASM ", %%r19\n" | 58 | #define LOAD_ASM_PIC	" copy %" TREG_ASM ", %%r19\n" |
| 61 | #define CLOB_TREG	TREG_ASM , | 59 | #define CLOB_TREG	TREG_ASM , |
| ... | @@ -136,7 +134,7 @@ | ... | @@ -136,7 +134,7 @@ |
| 136 | 	/* SAVE_RP says we do */			ASM_LINE_SEP	\ | 134 | 	/* SAVE_RP says we do */			ASM_LINE_SEP	\ |
| 137 | 	stw %rp, -20(%sr0,%sp)				ASM_LINE_SEP	\ | 135 | 	stw %rp, -20(%sr0,%sp)				ASM_LINE_SEP	\ |
| 138 | 	.cfi_offset 2, -20				ASM_LINE_SEP	\ | 136 | 	.cfi_offset 2, -20				ASM_LINE_SEP	\ |
| 139 | 	/*FIXME: Call mcount? (carefull with stack!) */ | 137 | 	/*FIXME: Call mcount? (careful with stack!) */ |
| 140 | 138 | ||
| 141 | /* Some syscall wrappers do not call other functions, and | 139 | /* Some syscall wrappers do not call other functions, and |
| 142 | hence are classified as leaf, so add NO_CALLS for gdb */ | 140 | hence are classified as leaf, so add NO_CALLS for gdb */ |
| ... | @@ -153,7 +151,7 @@ | ... | @@ -153,7 +151,7 @@ |
| 153 | 	/* SAVE_RP says we do */			ASM_LINE_SEP	\ | 151 | 	/* SAVE_RP says we do */			ASM_LINE_SEP	\ |
| 154 | 	stw %rp, -20(%sr0,%sp)				ASM_LINE_SEP	\ | 152 | 	stw %rp, -20(%sr0,%sp)				ASM_LINE_SEP	\ |
| 155 | 	.cfi_offset 2, -20				ASM_LINE_SEP	\ | 153 | 	.cfi_offset 2, -20				ASM_LINE_SEP	\ |
| 156 | 	/*FIXME: Call mcount? (carefull with stack!) */ | 154 | 	/*FIXME: Call mcount? (careful with stack!) */ |
| 157 | 155 | ||
| 158 | #undef	END | 156 | #undef	END |
| 159 | #define END(name)							\ | 157 | #define END(name)							\ |
| ... | @@ -472,10 +470,4 @@ L(pre_end):					ASM_LINE_SEP	\ | ... | @@ -472,10 +470,4 @@ L(pre_end):					ASM_LINE_SEP	\ |
| 472 | 470 | ||
| 473 | #endif	/* __ASSEMBLER__ */ | 471 | #endif	/* __ASSEMBLER__ */ |
| 474 | 472 | ||
| 475 | /* Pointer mangling is not yet supported for HPPA. */ | ||
| 476 | #define PTR_MANGLE(var) (void) (var) | ||
| 477 | #define PTR_DEMANGLE(var) (void) (var) | ||
| 478 | |||
| 479 | #define SINGLE_THREAD_BY_GLOBAL	1 | ||
| 480 | |||
| 481 | #endif /* _LINUX_HPPA_SYSDEP_H */ | 473 | #endif /* _LINUX_HPPA_SYSDEP_H */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/i386/dl-sysdep.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* System-specific settings for dynamic linker code. i386 version. | 1 | /* System-specific settings for dynamic linker code. i386 version. |
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/i386/kernel-features.h+9-12| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Set flags signalling availability of kernel features based on given | 1 | /* Set flags signalling availability of kernel features based on given |
| 2 | kernel version number. i386 version. | 2 | kernel version number. i386 version. |
| 3 | Copyright (C) 1999-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -17,21 +17,11 @@ | ... | @@ -17,21 +17,11 @@ |
| 17 | License along with the GNU C Library; if not, see | 17 | License along with the GNU C Library; if not, see |
| 18 | <https://www.gnu.org/licenses/>. */ | 18 | <https://www.gnu.org/licenses/>. */ |
| 19 | 19 | ||
| 20 | /* Direct socketcalls available with kernel 4.3. */ | ||
| 21 | #if __LINUX_KERNEL_VERSION >= 0x040300 | ||
| 22 | # define __ASSUME_SOCKET_SYSCALL 1 | ||
| 23 | # define __ASSUME_SOCKETPAIR_SYSCALL 1 | ||
| 24 | # define __ASSUME_BIND_SYSCALL 1 | ||
| 25 | # define __ASSUME_LISTEN_SYSCALL 1 | ||
| 26 | # define __ASSUME_GETSOCKNAME_SYSCALL 1 | ||
| 27 | # define __ASSUME_GETPEERNAME_SYSCALL 1 | ||
| 28 | # define __ASSUME_SHUTDOWN_SYSCALL 1 | ||
| 29 | #endif | ||
| 30 | |||
| 31 | #include_next <kernel-features.h> | 20 | #include_next <kernel-features.h> |
| 32 | 21 | ||
| 33 | #undef __ASSUME_ACCEPT_SYSCALL | 22 | #undef __ASSUME_ACCEPT_SYSCALL |
| 34 | 23 | ||
| 24 | /* Direct socketcalls available with kernel 4.3. */ | ||
| 35 | #if __LINUX_KERNEL_VERSION < 0x040300 | 25 | #if __LINUX_KERNEL_VERSION < 0x040300 |
| 36 | # undef __ASSUME_ACCEPT4_SYSCALL | 26 | # undef __ASSUME_ACCEPT4_SYSCALL |
| 37 | # undef __ASSUME_SENDMSG_SYSCALL | 27 | # undef __ASSUME_SENDMSG_SYSCALL |
| ... | @@ -41,6 +31,13 @@ | ... | @@ -41,6 +31,13 @@ |
| 41 | # undef __ASSUME_SENDTO_SYSCALL | 31 | # undef __ASSUME_SENDTO_SYSCALL |
| 42 | # undef __ASSUME_GETSOCKOPT_SYSCALL | 32 | # undef __ASSUME_GETSOCKOPT_SYSCALL |
| 43 | # undef __ASSUME_SETSOCKOPT_SYSCALL | 33 | # undef __ASSUME_SETSOCKOPT_SYSCALL |
| 34 | # undef __ASSUME_BIND_SYSCALL | ||
| 35 | # undef __ASSUME_SOCKET_SYSCALL | ||
| 36 | # undef __ASSUME_SOCKETPAIR_SYSCALL | ||
| 37 | # undef __ASSUME_LISTEN_SYSCALL | ||
| 38 | # undef __ASSUME_SHUTDOWN_SYSCALL | ||
| 39 | # undef __ASSUME_GETSOCKNAME_SYSCALL | ||
| 40 | # undef __ASSUME_GETPEERNAME_SYSCALL | ||
| 44 | #endif | 41 | #endif |
| 45 | 42 | ||
| 46 | /* i686 only supports ipc syscall before 5.1. */ | 43 | /* i686 only supports ipc syscall before 5.1. */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/i386/sysdep.h+38-226| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Copyright (C) 1992-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | Contributed by Ulrich Drepper, <drepper@gnu.org>, August 1995. | ||
| 4 | 3 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
| ... | @@ -43,13 +42,13 @@ | ... | @@ -43,13 +42,13 @@ |
| 43 | # endif | 42 | # endif |
| 44 | #endif | 43 | #endif |
| 45 | 44 | ||
| 46 | /* Since GCC 5 and above can properly spill %ebx with PIC when needed, | 45 | #if !I386_USE_SYSENTER && IS_IN (libc) && !defined SHARED |
| 47 | we can inline syscalls with 6 arguments if GCC 5 or above is used | 46 | /* Inside static libc, we have two versions. For compilation units |
| 48 | to compile glibc. Disable GCC 5 optimization when compiling for | 47 | with !I386_USE_SYSENTER, the vDSO entry mechanism cannot be |
| 49 | profiling or when -fno-omit-frame-pointer is used since asm ("ebp") | 48 | used. */ |
| 50 | can't be used to put the 6th argument in %ebp for syscall. */ | 49 | # define I386_DO_SYSCALL_STRING "__libc_do_syscall_int80" |
| 51 | #if !defined PROF && CAN_USE_REGISTER_ASM_EBP | 50 | #else |
| 52 | # define OPTIMIZE_FOR_GCC_5 | 51 | # define I386_DO_SYSCALL_STRING "__libc_do_syscall" |
| 53 | #endif | 52 | #endif |
| 54 | 53 | ||
| 55 | #ifdef __ASSEMBLER__ | 54 | #ifdef __ASSEMBLER__ |
| ... | @@ -62,7 +61,7 @@ | ... | @@ -62,7 +61,7 @@ |
| 62 | might return a large offset. Therefore we must not anymore test | 61 | might return a large offset. Therefore we must not anymore test |
| 63 | for < 0, but test for a real error by making sure the value in %eax | 62 | for < 0, but test for a real error by making sure the value in %eax |
| 64 | is a real error number. Linus said he will make sure the no syscall | 63 | is a real error number. Linus said he will make sure the no syscall |
| 65 | returns a value in -1 .. -4095 as a valid result so we can savely | 64 | returns a value in -1 .. -4095 as a valid result so we can safely |
| 66 | test with -4095. */ | 65 | test with -4095. */ |
| 67 | 66 | ||
| 68 | /* We don't want the label for the error handle to be global when we define | 67 | /* We don't want the label for the error handle to be global when we define |
| ... | @@ -239,36 +238,6 @@ | ... | @@ -239,36 +238,6 @@ |
| 239 | extern int __syscall_error (int) | 238 | extern int __syscall_error (int) |
| 240 | attribute_hidden __attribute__ ((__regparm__ (1))); | 239 | attribute_hidden __attribute__ ((__regparm__ (1))); |
| 241 | 240 | ||
| 242 | #ifndef OPTIMIZE_FOR_GCC_5 | ||
| 243 | /* We need some help from the assembler to generate optimal code. We | ||
| 244 | define some macros here which later will be used. */ | ||
| 245 | asm (".L__X'%ebx = 1\n\t" | ||
| 246 | ".L__X'%ecx = 2\n\t" | ||
| 247 | ".L__X'%edx = 2\n\t" | ||
| 248 | ".L__X'%eax = 3\n\t" | ||
| 249 | ".L__X'%esi = 3\n\t" | ||
| 250 | ".L__X'%edi = 3\n\t" | ||
| 251 | ".L__X'%ebp = 3\n\t" | ||
| 252 | ".L__X'%esp = 3\n\t" | ||
| 253 | ".macro bpushl name reg\n\t" | ||
| 254 | ".if 1 - \\name\n\t" | ||
| 255 | ".if 2 - \\name\n\t" | ||
| 256 | "error\n\t" | ||
| 257 | ".else\n\t" | ||
| 258 | "xchgl \\reg, %ebx\n\t" | ||
| 259 | ".endif\n\t" | ||
| 260 | ".endif\n\t" | ||
| 261 | ".endm\n\t" | ||
| 262 | ".macro bpopl name reg\n\t" | ||
| 263 | ".if 1 - \\name\n\t" | ||
| 264 | ".if 2 - \\name\n\t" | ||
| 265 | "error\n\t" | ||
| 266 | ".else\n\t" | ||
| 267 | "xchgl \\reg, %ebx\n\t" | ||
| 268 | ".endif\n\t" | ||
| 269 | ".endif\n\t" | ||
| 270 | ".endm\n\t"); | ||
| 271 | |||
| 272 | /* Six-argument syscalls use an out-of-line helper, because an inline | 241 | /* Six-argument syscalls use an out-of-line helper, because an inline |
| 273 | asm using all registers apart from %esp cannot work reliably and | 242 | asm using all registers apart from %esp cannot work reliably and |
| 274 | the assembler does not support describing an asm that saves and | 243 | the assembler does not support describing an asm that saves and |
| ... | @@ -279,7 +248,6 @@ struct libc_do_syscall_args | ... | @@ -279,7 +248,6 @@ struct libc_do_syscall_args |
| 279 | { | 248 | { |
| 280 | int ebx, edi, ebp; | 249 | int ebx, edi, ebp; |
| 281 | }; | 250 | }; |
| 282 | #endif | ||
| 283 | 251 | ||
| 284 | # define VDSO_NAME "LINUX_2.6" | 252 | # define VDSO_NAME "LINUX_2.6" |
| 285 | # define VDSO_HASH 61765110 | 253 | # define VDSO_HASH 61765110 |
| ... | @@ -332,14 +300,8 @@ struct libc_do_syscall_args | ... | @@ -332,14 +300,8 @@ struct libc_do_syscall_args |
| 332 | 300 | ||
| 333 | /* Each object using 6-argument inline syscalls must include a | 301 | /* Each object using 6-argument inline syscalls must include a |
| 334 | definition of __libc_do_syscall. */ | 302 | definition of __libc_do_syscall. */ |
| 335 | #ifdef OPTIMIZE_FOR_GCC_5 | 303 | #define INTERNAL_SYSCALL_MAIN_6(name, arg1, arg2, arg3,			\ |
| 336 | # define INTERNAL_SYSCALL_MAIN_6(name, args...) \ | 304 | 				arg4, arg5, arg6)			\ |
| 337 | INTERNAL_SYSCALL_MAIN_INLINE(name, 6, args) | ||
| 338 | # define INTERNAL_SYSCALL_MAIN_NCS_6(name, args...) \ | ||
| 339 | INTERNAL_SYSCALL_MAIN_NCS(name, 6, args) | ||
| 340 | #else /* GCC 5 */ | ||
| 341 | # define INTERNAL_SYSCALL_MAIN_6(name, arg1, arg2, arg3,		\ | ||
| 342 | 				 arg4, arg5, arg6)			\ | ||
| 343 | struct libc_do_syscall_args _xv =					\ | 305 | struct libc_do_syscall_args _xv =					\ |
| 344 | {									\ | 306 | {									\ |
| 345 | (int) (arg1),							\ | 307 | (int) (arg1),							\ |
| ... | @@ -348,12 +310,12 @@ struct libc_do_syscall_args | ... | @@ -348,12 +310,12 @@ struct libc_do_syscall_args |
| 348 | };									\ | 310 | };									\ |
| 349 | asm volatile (							\ | 311 | asm volatile (							\ |
| 350 | "movl %1, %%eax\n\t"						\ | 312 | "movl %1, %%eax\n\t"						\ |
| 351 | "call __libc_do_syscall"						\ | 313 | "call " I386_DO_SYSCALL_STRING					\ |
| 352 | : "=a" (resultvar)							\ | 314 | : "=a" (resultvar)							\ |
| 353 | : "i" (__NR_##name), "c" (arg2), "d" (arg3), "S" (arg4), "D" (&_xv) \ | 315 | : "i" (__NR_##name), "c" (arg2), "d" (arg3), "S" (arg4), "D" (&_xv) \ |
| 354 | : "memory", "cc") | 316 | : "memory", "cc") |
| 355 | # define INTERNAL_SYSCALL_MAIN_NCS_6(name, arg1, arg2, arg3,		\ | 317 | #define INTERNAL_SYSCALL_MAIN_NCS_6(name, arg1, arg2, arg3,		\ |
| 356 | 				 arg4, arg5, arg6)			\ | 318 | 				 arg4, arg5, arg6)			\ |
| 357 | struct libc_do_syscall_args _xv =					\ | 319 | struct libc_do_syscall_args _xv =					\ |
| 358 | {									\ | 320 | {									\ |
| 359 | (int) (arg1),							\ | 321 | (int) (arg1),							\ |
| ... | @@ -362,11 +324,10 @@ struct libc_do_syscall_args | ... | @@ -362,11 +324,10 @@ struct libc_do_syscall_args |
| 362 | };									\ | 324 | };									\ |
| 363 | asm volatile (							\ | 325 | asm volatile (							\ |
| 364 | "movl %1, %%eax\n\t"						\ | 326 | "movl %1, %%eax\n\t"						\ |
| 365 | "call __libc_do_syscall"						\ | 327 | "call " I386_DO_SYSCALL_STRING					\ |
| 366 | : "=a" (resultvar)							\ | 328 | : "=a" (resultvar)							\ |
| 367 | : "a" (name), "c" (arg2), "d" (arg3), "S" (arg4), "D" (&_xv)	\ | 329 | : "a" (name), "c" (arg2), "d" (arg3), "S" (arg4), "D" (&_xv)	\ |
| 368 | : "memory", "cc") | 330 | : "memory", "cc") |
| 369 | #endif /* GCC 5 */ | ||
| 370 | 331 | ||
| 371 | #define INTERNAL_SYSCALL(name, nr, args...) \ | 332 | #define INTERNAL_SYSCALL(name, nr, args...) \ |
| 372 | ({									 \ | 333 | ({									 \ |
| ... | @@ -380,193 +341,72 @@ struct libc_do_syscall_args | ... | @@ -380,193 +341,72 @@ struct libc_do_syscall_args |
| 380 | (int) resultvar; }) | 341 | (int) resultvar; }) |
| 381 | 342 | ||
| 382 | #if I386_USE_SYSENTER | 343 | #if I386_USE_SYSENTER |
| 383 | # ifdef OPTIMIZE_FOR_GCC_5 | 344 | # ifdef PIC |
| 384 | # ifdef PIC | 345 | # define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ |
| 385 | # define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ | ||
| 386 | LOADREGS_##nr(args)							\ | 346 | LOADREGS_##nr(args)							\ |
| 387 | asm volatile (							\ | 347 | asm volatile (							\ |
| 388 | "call *%%gs:%P2"							\ | 348 | "call *%%gs:%P2"							\ |
| 389 | : "=a" (resultvar)							\ | 349 | : "=a" (resultvar)							\ |
| 390 | : "a" (__NR_##name), "i" (offsetof (tcbhead_t, sysinfo))		\ | 350 | : "a" (__NR_##name), "i" (offsetof (tcbhead_t, sysinfo))		\ |
| 391 | ASMARGS_##nr(args) : "memory", "cc") | 351 | ASMARGS_##nr(args) : "memory", "cc") |
| 392 | # define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ | 352 | # define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ |
| 393 | LOADREGS_##nr(args)							\ | 353 | LOADREGS_##nr(args)							\ |
| 394 | asm volatile (							\ | 354 | asm volatile (							\ |
| 395 | "call *%%gs:%P2"							\ | 355 | "call *%%gs:%P2"							\ |
| 396 | : "=a" (resultvar)							\ | 356 | : "=a" (resultvar)							\ |
| 397 | : "a" (name), "i" (offsetof (tcbhead_t, sysinfo))			\ | 357 | : "a" (name), "i" (offsetof (tcbhead_t, sysinfo))			\ |
| 398 | ASMARGS_##nr(args) : "memory", "cc") | 358 | ASMARGS_##nr(args) : "memory", "cc") |
| 399 | # else | 359 | # else /* I386_USE_SYSENTER && !PIC */ |
| 400 | # define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ | 360 | # define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ |
| 401 | LOADREGS_##nr(args)							\ | 361 | LOADREGS_##nr(args)							\ |
| 402 | asm volatile (							\ | 362 | asm volatile (							\ |
| 403 | "call *_dl_sysinfo"							\ | 363 | "call *_dl_sysinfo"							\ |
| 404 | : "=a" (resultvar)							\ | 364 | : "=a" (resultvar)							\ |
| 405 | : "a" (__NR_##name) ASMARGS_##nr(args) : "memory", "cc") | 365 | : "a" (__NR_##name) ASMARGS_##nr(args) : "memory", "cc") |
| 406 | # define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ | 366 | # define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ |
| 407 | LOADREGS_##nr(args)							\ | 367 | LOADREGS_##nr(args)							\ |
| 408 | asm volatile (							\ | 368 | asm volatile (							\ |
| 409 | "call *_dl_sysinfo"							\ | 369 | "call *_dl_sysinfo"							\ |
| 410 | : "=a" (resultvar)							\ | 370 | : "=a" (resultvar)							\ |
| 411 | : "a" (name) ASMARGS_##nr(args) : "memory", "cc") | 371 | : "a" (name) ASMARGS_##nr(args) : "memory", "cc") |
| 412 | # endif | 372 | # endif /* I386_USE_SYSENTER && !PIC */ |
| 413 | # else /* GCC 5 */ | 373 | #else /* !I386_USE_SYSENTER */ |
| 414 | # ifdef PIC | 374 | # define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ |
| 415 | # define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ | ||
| 416 | EXTRAVAR_##nr							 \ | ||
| 417 | asm volatile (							 \ | ||
| 418 | LOADARGS_##nr							 \ | ||
| 419 | "movl %1, %%eax\n\t"						 \ | ||
| 420 | "call *%%gs:%P2\n\t"						 \ | ||
| 421 | RESTOREARGS_##nr							 \ | ||
| 422 | : "=a" (resultvar)							 \ | ||
| 423 | : "i" (__NR_##name), "i" (offsetof (tcbhead_t, sysinfo))		 \ | ||
| 424 | ASMFMT_##nr(args) : "memory", "cc") | ||
| 425 | # define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ | ||
| 426 | EXTRAVAR_##nr							 \ | ||
| 427 | asm volatile (							 \ | ||
| 428 | LOADARGS_##nr							 \ | ||
| 429 | "call *%%gs:%P2\n\t"						 \ | ||
| 430 | RESTOREARGS_##nr							 \ | ||
| 431 | : "=a" (resultvar)							 \ | ||
| 432 | : "0" (name), "i" (offsetof (tcbhead_t, sysinfo))			 \ | ||
| 433 | ASMFMT_##nr(args) : "memory", "cc") | ||
| 434 | # else | ||
| 435 | # define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ | ||
| 436 | EXTRAVAR_##nr							 \ | ||
| 437 | asm volatile (							 \ | ||
| 438 | LOADARGS_##nr							 \ | ||
| 439 | "movl %1, %%eax\n\t"						 \ | ||
| 440 | "call *_dl_sysinfo\n\t"						 \ | ||
| 441 | RESTOREARGS_##nr							 \ | ||
| 442 | : "=a" (resultvar)							 \ | ||
| 443 | : "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc") | ||
| 444 | # define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ | ||
| 445 | EXTRAVAR_##nr							 \ | ||
| 446 | asm volatile (							 \ | ||
| 447 | LOADARGS_##nr							 \ | ||
| 448 | "call *_dl_sysinfo\n\t"						 \ | ||
| 449 | RESTOREARGS_##nr							 \ | ||
| 450 | : "=a" (resultvar)							 \ | ||
| 451 | : "0" (name) ASMFMT_##nr(args) : "memory", "cc") | ||
| 452 | # endif | ||
| 453 | # endif /* GCC 5 */ | ||
| 454 | #else | ||
| 455 | # ifdef OPTIMIZE_FOR_GCC_5 | ||
| 456 | # define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ | ||
| 457 | LOADREGS_##nr(args)							\ | 375 | LOADREGS_##nr(args)							\ |
| 458 | asm volatile (							\ | 376 | asm volatile (							\ |
| 459 | "int $0x80"								\ | 377 | "int $0x80"								\ |
| 460 | : "=a" (resultvar)							\ | 378 | : "=a" (resultvar)							\ |
| 461 | : "a" (__NR_##name) ASMARGS_##nr(args) : "memory", "cc") | 379 | : "a" (__NR_##name) ASMARGS_##nr(args) : "memory", "cc") |
| 462 | # define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ | 380 | # define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ |
| 463 | LOADREGS_##nr(args)							\ | 381 | LOADREGS_##nr(args)							\ |
| 464 | asm volatile (							\ | 382 | asm volatile (							\ |
| 465 | "int $0x80"								\ | 383 | "int $0x80"								\ |
| 466 | : "=a" (resultvar)							\ | 384 | : "=a" (resultvar)							\ |
| 467 | : "a" (name) ASMARGS_##nr(args) : "memory", "cc") | 385 | : "a" (name) ASMARGS_##nr(args) : "memory", "cc") |
| 468 | # else /* GCC 5 */ | 386 | #endif /* !I386_USE_SYSENTER */ |
| 469 | # define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ | ||
| 470 | EXTRAVAR_##nr							 \ | ||
| 471 | asm volatile (							 \ | ||
| 472 | LOADARGS_##nr							 \ | ||
| 473 | "movl %1, %%eax\n\t"						 \ | ||
| 474 | "int $0x80\n\t"							 \ | ||
| 475 | RESTOREARGS_##nr							 \ | ||
| 476 | : "=a" (resultvar)							 \ | ||
| 477 | : "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc") | ||
| 478 | # define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ | ||
| 479 | EXTRAVAR_##nr							 \ | ||
| 480 | asm volatile (							 \ | ||
| 481 | LOADARGS_##nr							 \ | ||
| 482 | "int $0x80\n\t"							 \ | ||
| 483 | RESTOREARGS_##nr							 \ | ||
| 484 | : "=a" (resultvar)							 \ | ||
| 485 | : "0" (name) ASMFMT_##nr(args) : "memory", "cc") | ||
| 486 | # endif /* GCC 5 */ | ||
| 487 | #endif | ||
| 488 | |||
| 489 | #define LOADARGS_0 | ||
| 490 | #ifdef __PIC__ | ||
| 491 | # if I386_USE_SYSENTER && defined PIC | ||
| 492 | # define LOADARGS_1 \ | ||
| 493 | "bpushl .L__X'%k3, %k3\n\t" | ||
| 494 | # define LOADARGS_5 \ | ||
| 495 | "movl %%ebx, %4\n\t"						 \ | ||
| 496 | "movl %3, %%ebx\n\t" | ||
| 497 | # else | ||
| 498 | # define LOADARGS_1 \ | ||
| 499 | "bpushl .L__X'%k2, %k2\n\t" | ||
| 500 | # define LOADARGS_5 \ | ||
| 501 | "movl %%ebx, %3\n\t"						 \ | ||
| 502 | "movl %2, %%ebx\n\t" | ||
| 503 | # endif | ||
| 504 | # define LOADARGS_2	LOADARGS_1 | ||
| 505 | # define LOADARGS_3 \ | ||
| 506 | "xchgl %%ebx, %%edi\n\t" | ||
| 507 | # define LOADARGS_4	LOADARGS_3 | ||
| 508 | #else | ||
| 509 | # define LOADARGS_1 | ||
| 510 | # define LOADARGS_2 | ||
| 511 | # define LOADARGS_3 | ||
| 512 | # define LOADARGS_4 | ||
| 513 | # define LOADARGS_5 | ||
| 514 | #endif | ||
| 515 | |||
| 516 | #define RESTOREARGS_0 | ||
| 517 | #ifdef __PIC__ | ||
| 518 | # if I386_USE_SYSENTER && defined PIC | ||
| 519 | # define RESTOREARGS_1 \ | ||
| 520 | "bpopl .L__X'%k3, %k3\n\t" | ||
| 521 | # define RESTOREARGS_5 \ | ||
| 522 | "movl %4, %%ebx" | ||
| 523 | # else | ||
| 524 | # define RESTOREARGS_1 \ | ||
| 525 | "bpopl .L__X'%k2, %k2\n\t" | ||
| 526 | # define RESTOREARGS_5 \ | ||
| 527 | "movl %3, %%ebx" | ||
| 528 | # endif | ||
| 529 | # define RESTOREARGS_2	RESTOREARGS_1 | ||
| 530 | # define RESTOREARGS_3 \ | ||
| 531 | "xchgl %%edi, %%ebx\n\t" | ||
| 532 | # define RESTOREARGS_4	RESTOREARGS_3 | ||
| 533 | #else | ||
| 534 | # define RESTOREARGS_1 | ||
| 535 | # define RESTOREARGS_2 | ||
| 536 | # define RESTOREARGS_3 | ||
| 537 | # define RESTOREARGS_4 | ||
| 538 | # define RESTOREARGS_5 | ||
| 539 | #endif | ||
| 540 | 387 | ||
| 541 | #ifdef OPTIMIZE_FOR_GCC_5 | 388 | #define LOADREGS_0() |
| 542 | # define LOADREGS_0() | 389 | #define ASMARGS_0() |
| 543 | # define ASMARGS_0() | 390 | #define LOADREGS_1(arg1) \ |
| 544 | # define LOADREGS_1(arg1) \ | ||
| 545 | 	LOADREGS_0 () | 391 | 	LOADREGS_0 () |
| 546 | # define ASMARGS_1(arg1) \ | 392 | #define ASMARGS_1(arg1) \ |
| 547 | 	ASMARGS_0 (), "b" ((unsigned int) (arg1)) | 393 | 	ASMARGS_0 (), "b" ((unsigned int) (arg1)) |
| 548 | # define LOADREGS_2(arg1, arg2) \ | 394 | #define LOADREGS_2(arg1, arg2) \ |
| 549 | 	LOADREGS_1 (arg1) | 395 | 	LOADREGS_1 (arg1) |
| 550 | # define ASMARGS_2(arg1, arg2) \ | 396 | #define ASMARGS_2(arg1, arg2) \ |
| 551 | 	ASMARGS_1 (arg1), "c" ((unsigned int) (arg2)) | 397 | 	ASMARGS_1 (arg1), "c" ((unsigned int) (arg2)) |
| 552 | # define LOADREGS_3(arg1, arg2, arg3) \ | 398 | #define LOADREGS_3(arg1, arg2, arg3) \ |
| 553 | 	LOADREGS_2 (arg1, arg2) | 399 | 	LOADREGS_2 (arg1, arg2) |
| 554 | # define ASMARGS_3(arg1, arg2, arg3) \ | 400 | #define ASMARGS_3(arg1, arg2, arg3) \ |
| 555 | 	ASMARGS_2 (arg1, arg2), "d" ((unsigned int) (arg3)) | 401 | 	ASMARGS_2 (arg1, arg2), "d" ((unsigned int) (arg3)) |
| 556 | # define LOADREGS_4(arg1, arg2, arg3, arg4) \ | 402 | #define LOADREGS_4(arg1, arg2, arg3, arg4) \ |
| 557 | 	LOADREGS_3 (arg1, arg2, arg3) | 403 | 	LOADREGS_3 (arg1, arg2, arg3) |
| 558 | # define ASMARGS_4(arg1, arg2, arg3, arg4) \ | 404 | #define ASMARGS_4(arg1, arg2, arg3, arg4) \ |
| 559 | 	ASMARGS_3 (arg1, arg2, arg3), "S" ((unsigned int) (arg4)) | 405 | 	ASMARGS_3 (arg1, arg2, arg3), "S" ((unsigned int) (arg4)) |
| 560 | # define LOADREGS_5(arg1, arg2, arg3, arg4, arg5) \ | 406 | #define LOADREGS_5(arg1, arg2, arg3, arg4, arg5) \ |
| 561 | 	LOADREGS_4 (arg1, arg2, arg3, arg4) | 407 | 	LOADREGS_4 (arg1, arg2, arg3, arg4) |
| 562 | # define ASMARGS_5(arg1, arg2, arg3, arg4, arg5) \ | 408 | #define ASMARGS_5(arg1, arg2, arg3, arg4, arg5) \ |
| 563 | 	ASMARGS_4 (arg1, arg2, arg3, arg4), "D" ((unsigned int) (arg5)) | 409 | 	ASMARGS_4 (arg1, arg2, arg3, arg4), "D" ((unsigned int) (arg5)) |
| 564 | # define LOADREGS_6(arg1, arg2, arg3, arg4, arg5, arg6) \ | ||
| 565 | 	register unsigned int _a6 asm ("ebp") = (unsigned int) (arg6); \ | ||
| 566 | 	LOADREGS_5 (arg1, arg2, arg3, arg4, arg5) | ||
| 567 | # define ASMARGS_6(arg1, arg2, arg3, arg4, arg5, arg6) \ | ||
| 568 | 	ASMARGS_5 (arg1, arg2, arg3, arg4, arg5), "r" (_a6) | ||
| 569 | #endif /* GCC 5 */ | ||
| 570 | 410 | ||
| 571 | #define ASMFMT_0() | 411 | #define ASMFMT_0() |
| 572 | #ifdef __PIC__ | 412 | #ifdef __PIC__ |
| ... | @@ -606,34 +446,6 @@ struct libc_do_syscall_args | ... | @@ -606,34 +446,6 @@ struct libc_do_syscall_args |
| 606 | 446 | ||
| 607 | #endif	/* __ASSEMBLER__ */ | 447 | #endif	/* __ASSEMBLER__ */ |
| 608 | 448 | ||
| 609 | |||
| 610 | /* Pointer mangling support. */ | ||
| 611 | #if IS_IN (rtld) | ||
| 612 | /* We cannot use the thread descriptor because in ld.so we use setjmp | ||
| 613 | earlier than the descriptor is initialized. Using a global variable | ||
| 614 | is too complicated here since we have no PC-relative addressing mode. */ | ||
| 615 | #else | ||
| 616 | # ifdef __ASSEMBLER__ | ||
| 617 | # define PTR_MANGLE(reg)	xorl %gs:POINTER_GUARD, reg;		 \ | ||
| 618 | 				roll $9, reg | ||
| 619 | # define PTR_DEMANGLE(reg)	rorl $9, reg;				 \ | ||
| 620 | 				xorl %gs:POINTER_GUARD, reg | ||
| 621 | # else | ||
| 622 | # define PTR_MANGLE(var)	asm ("xorl %%gs:%c2, %0\n"		 \ | ||
| 623 | 				 "roll $9, %0"			 \ | ||
| 624 | 				 : "=r" (var)			 \ | ||
| 625 | 				 : "0" (var),			 \ | ||
| 626 | 				 "i" (offsetof (tcbhead_t,	 \ | ||
| 627 | 						 pointer_guard))) | ||
| 628 | # define PTR_DEMANGLE(var)	asm ("rorl $9, %0\n"			 \ | ||
| 629 | 				 "xorl %%gs:%c2, %0"		 \ | ||
| 630 | 				 : "=r" (var)			 \ | ||
| 631 | 				 : "0" (var),			 \ | ||
| 632 | 				 "i" (offsetof (tcbhead_t,	 \ | ||
| 633 | 						 pointer_guard))) | ||
| 634 | # endif | ||
| 635 | #endif | ||
| 636 | |||
| 637 | /* Each shadow stack slot takes 4 bytes. Assuming that each stack | 449 | /* Each shadow stack slot takes 4 bytes. Assuming that each stack |
| 638 | frame takes 128 bytes, this is used to compute shadow stack size | 450 | frame takes 128 bytes, this is used to compute shadow stack size |
| 639 | from stack size. */ | 451 | from stack size. */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h+1-5| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* System-specific settings for dynamic linker code. IA-64 version. | 1 | /* System-specific settings for dynamic linker code. IA-64 version. |
| 2 | Copyright (C) 2003-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2003-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -48,8 +48,4 @@ extern int _dl_sysinfo_break attribute_hidden; | ... | @@ -48,8 +48,4 @@ extern int _dl_sysinfo_break attribute_hidden; |
| 48 | ".previous"); | 48 | ".previous"); |
| 49 | #endif | 49 | #endif |
| 50 | 50 | ||
| 51 | /* _dl_argv cannot be attribute_relro, because _dl_start_user | ||
| 52 | might write into it after _dl_start returns. */ | ||
| 53 | #define DL_ARGV_NOT_RELRO 1 | ||
| 54 | |||
| 55 | #endif	/* dl-sysdep.h */ | 51 | #endif	/* dl-sysdep.h */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/kernel-features.h+1-1| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Set flags signalling availability of kernel features based on given | 1 | /* Set flags signalling availability of kernel features based on given |
| 2 | kernel version number. | 2 | kernel version number. |
| 3 | Copyright (C) 2010-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 2010-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/sysdep.h+15-34| ... | @@ -1,7 +1,5 @@ | ... | @@ -1,7 +1,5 @@ |
| 1 | /* Copyright (C) 1999-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999. | ||
| 4 | Based on code originally written by David Mosberger-Tang | ||
| 5 | 3 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| 7 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
| ... | @@ -46,12 +44,15 @@ | ... | @@ -46,12 +44,15 @@ |
| 46 | #undef SYS_ify | 44 | #undef SYS_ify |
| 47 | #define SYS_ify(syscall_name)	__NR_##syscall_name | 45 | #define SYS_ify(syscall_name)	__NR_##syscall_name |
| 48 | 46 | ||
| 49 | #if defined USE_DL_SYSINFO \ | 47 | #ifndef IA64_USE_NEW_STUB |
| 50 | 	&& (IS_IN (libc) \ | 48 | # if defined USE_DL_SYSINFO && IS_IN (libc) |
| 51 | 	 || IS_IN (libpthread) || IS_IN (librt)) | 49 | # define IA64_USE_NEW_STUB 1 |
| 52 | # define IA64_USE_NEW_STUB | 50 | # else |
| 53 | #else | 51 | # define IA64_USE_NEW_STUB 0 |
| 54 | # undef IA64_USE_NEW_STUB | 52 | # endif |
| 53 | #endif | ||
| 54 | #if IA64_USE_NEW_STUB && !USE_DL_SYSINFO | ||
| 55 | # error IA64_USE_NEW_STUB needs USE_DL_SYSINFO | ||
| 55 | #endif | 56 | #endif |
| 56 | 57 | ||
| 57 | #ifdef __ASSEMBLER__ | 58 | #ifdef __ASSEMBLER__ |
| ... | @@ -85,7 +86,7 @@ | ... | @@ -85,7 +86,7 @@ |
| 85 | a large offset. Therefore we must not anymore test for < 0, but test | 86 | a large offset. Therefore we must not anymore test for < 0, but test |
| 86 | for a real error by making sure the value in %d0 is a real error | 87 | for a real error by making sure the value in %d0 is a real error |
| 87 | number. Linus said he will make sure the no syscall returns a value | 88 | number. Linus said he will make sure the no syscall returns a value |
| 88 | in -1 .. -4095 as a valid result so we can savely test with -4095. */ | 89 | in -1 .. -4095 as a valid result so we can safely test with -4095. */ |
| 89 | 90 | ||
| 90 | /* We don't want the label for the error handler to be visible in the symbol | 91 | /* We don't want the label for the error handler to be visible in the symbol |
| 91 | table when we define it here. */ | 92 | table when we define it here. */ |
| ... | @@ -103,7 +104,7 @@ | ... | @@ -103,7 +104,7 @@ |
| 103 | 	mov r15=num;				\ | 104 | 	mov r15=num;				\ |
| 104 | 	break __IA64_BREAK_SYSCALL | 105 | 	break __IA64_BREAK_SYSCALL |
| 105 | 106 | ||
| 106 | #ifdef IA64_USE_NEW_STUB | 107 | #if IA64_USE_NEW_STUB |
| 107 | # ifdef SHARED | 108 | # ifdef SHARED |
| 108 | # define DO_CALL(num)				\ | 109 | # define DO_CALL(num)				\ |
| 109 | 	.prologue;				\ | 110 | 	.prologue;				\ |
| ... | @@ -187,7 +188,7 @@ | ... | @@ -187,7 +188,7 @@ |
| 187 | (non-negative) errno on error or the return value on success. | 188 | (non-negative) errno on error or the return value on success. |
| 188 | */ | 189 | */ |
| 189 | 190 | ||
| 190 | #ifdef IA64_USE_NEW_STUB | 191 | #if IA64_USE_NEW_STUB |
| 191 | 192 | ||
| 192 | # define INTERNAL_SYSCALL_NCS(name, nr, args...)			 \ | 193 | # define INTERNAL_SYSCALL_NCS(name, nr, args...)			 \ |
| 193 | ({									 \ | 194 | ({									 \ |
| ... | @@ -279,7 +280,7 @@ | ... | @@ -279,7 +280,7 @@ |
| 279 | #define ASM_OUTARGS_5	ASM_OUTARGS_4, "=r" (_out4) | 280 | #define ASM_OUTARGS_5	ASM_OUTARGS_4, "=r" (_out4) |
| 280 | #define ASM_OUTARGS_6	ASM_OUTARGS_5, "=r" (_out5) | 281 | #define ASM_OUTARGS_6	ASM_OUTARGS_5, "=r" (_out5) |
| 281 | 282 | ||
| 282 | #ifdef IA64_USE_NEW_STUB | 283 | #if IA64_USE_NEW_STUB |
| 283 | #define ASM_ARGS_0 | 284 | #define ASM_ARGS_0 |
| 284 | #define ASM_ARGS_1	ASM_ARGS_0, "4" (_out0) | 285 | #define ASM_ARGS_1	ASM_ARGS_0, "4" (_out0) |
| 285 | #define ASM_ARGS_2	ASM_ARGS_1, "5" (_out1) | 286 | #define ASM_ARGS_2	ASM_ARGS_1, "5" (_out1) |
| ... | @@ -315,7 +316,7 @@ | ... | @@ -315,7 +316,7 @@ |
| 315 | /* Branch registers. */						\ | 316 | /* Branch registers. */						\ |
| 316 | "b6" | 317 | "b6" |
| 317 | 318 | ||
| 318 | #ifdef IA64_USE_NEW_STUB | 319 | #if IA64_USE_NEW_STUB |
| 319 | # define ASM_CLOBBERS_6	ASM_CLOBBERS_6_COMMON | 320 | # define ASM_CLOBBERS_6	ASM_CLOBBERS_6_COMMON |
| 320 | #else | 321 | #else |
| 321 | # define ASM_CLOBBERS_6	ASM_CLOBBERS_6_COMMON , "b7" | 322 | # define ASM_CLOBBERS_6	ASM_CLOBBERS_6_COMMON , "b7" |
| ... | @@ -323,24 +324,4 @@ | ... | @@ -323,24 +324,4 @@ |
| 323 | 324 | ||
| 324 | #endif /* not __ASSEMBLER__ */ | 325 | #endif /* not __ASSEMBLER__ */ |
| 325 | 326 | ||
| 326 | /* Pointer mangling support. */ | ||
| 327 | #if IS_IN (rtld) | ||
| 328 | /* We cannot use the thread descriptor because in ld.so we use setjmp | ||
| 329 | earlier than the descriptor is initialized. */ | ||
| 330 | #else | ||
| 331 | # ifdef __ASSEMBLER__ | ||
| 332 | # define PTR_MANGLE(reg, tmpreg) \ | ||
| 333 | add	tmpreg=-16,r13		\ | ||
| 334 | ;;				\ | ||
| 335 | ld8	tmpreg=[tmpreg]		\ | ||
| 336 | ;;				\ | ||
| 337 | xor	reg=reg, tmpreg | ||
| 338 | # define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg) | ||
| 339 | # else | ||
| 340 | # define PTR_MANGLE(var) \ | ||
| 341 | (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) | ||
| 342 | # define PTR_DEMANGLE(var)	PTR_MANGLE (var) | ||
| 343 | # endif | ||
| 344 | #endif | ||
| 345 | |||
| 346 | #endif /* linux/ia64/sysdep.h */ | 327 | #endif /* linux/ia64/sysdep.h */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/include/sys/timex.h+6-6| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Internal declarations for sys/timex.h. | 1 | /* Internal declarations for sys/timex.h. |
| 2 | Copyright (C) 2014-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2014-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -23,7 +23,7 @@ | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 | ||
| 24 | # ifndef _ISOMAC | 24 | # ifndef _ISOMAC |
| 25 | 25 | ||
| 26 | extern int __adjtimex (struct timex *__ntx); | 26 | extern int __adjtimex (struct timex *__ntx) __nonnull ((1)); |
| 27 | libc_hidden_proto (__adjtimex) | 27 | libc_hidden_proto (__adjtimex) |
| 28 | 28 | ||
| 29 | # include <time.h> | 29 | # include <time.h> |
| ... | @@ -77,9 +77,9 @@ struct __timex64 | ... | @@ -77,9 +77,9 @@ struct __timex64 |
| 77 | int :32; | 77 | int :32; |
| 78 | int :32; | 78 | int :32; |
| 79 | }; | 79 | }; |
| 80 | extern int __clock_adjtime64 (const clockid_t clock_id, struct __timex64 *tx64); | 80 | extern int __clock_adjtime64 (const clockid_t clock_id, struct __timex64 *tx64) __nonnull((2)); |
| 81 | libc_hidden_proto (__clock_adjtime64); | 81 | libc_hidden_proto (__clock_adjtime64); |
| 82 | extern int ___adjtimex64 (struct __timex64 *tx64); | 82 | extern int ___adjtimex64 (struct __timex64 *tx64) __nonnull ((1)); |
| 83 | libc_hidden_proto (___adjtimex64) | 83 | libc_hidden_proto (___adjtimex64) |
| 84 | 84 | ||
| 85 | struct __ntptimeval64 | 85 | struct __ntptimeval64 |
| ... | @@ -94,9 +94,9 @@ struct __ntptimeval64 | ... | @@ -94,9 +94,9 @@ struct __ntptimeval64 |
| 94 | long int __glibc_reserved3; | 94 | long int __glibc_reserved3; |
| 95 | long int __glibc_reserved4; | 95 | long int __glibc_reserved4; |
| 96 | }; | 96 | }; |
| 97 | extern int __ntp_gettime64 (struct __ntptimeval64 *ntv); | 97 | extern int __ntp_gettime64 (struct __ntptimeval64 *ntv) __nonnull ((1)); |
| 98 | libc_hidden_proto (__ntp_gettime64) | 98 | libc_hidden_proto (__ntp_gettime64) |
| 99 | extern int __ntp_gettimex64 (struct __ntptimeval64 *ntv); | 99 | extern int __ntp_gettimex64 (struct __ntptimeval64 *ntv) __nonnull ((1)); |
| 100 | libc_hidden_proto (__ntp_gettimex64) | 100 | libc_hidden_proto (__ntp_gettimex64) |
| 101 | 101 | ||
| 102 | # endif | 102 | # endif |
lib/libc/glibc/sysdeps/unix/sysv/linux/kernel-features.h+33-1| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Set flags signalling availability of kernel features based on given | 1 | /* Set flags signalling availability of kernel features based on given |
| 2 | kernel version number. | 2 | kernel version number. |
| 3 | Copyright (C) 1999-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -79,6 +79,13 @@ | ... | @@ -79,6 +79,13 @@ |
| 79 | #define __ASSUME_SENDMMSG_SYSCALL	1 | 79 | #define __ASSUME_SENDMMSG_SYSCALL	1 |
| 80 | #define __ASSUME_GETSOCKOPT_SYSCALL	1 | 80 | #define __ASSUME_GETSOCKOPT_SYSCALL	1 |
| 81 | #define __ASSUME_SETSOCKOPT_SYSCALL	1 | 81 | #define __ASSUME_SETSOCKOPT_SYSCALL	1 |
| 82 | #define __ASSUME_BIND_SYSCALL		1 | ||
| 83 | #define __ASSUME_SOCKET_SYSCALL		1 | ||
| 84 | #define __ASSUME_SOCKETPAIR_SYSCALL	1 | ||
| 85 | #define __ASSUME_LISTEN_SYSCALL		1 | ||
| 86 | #define __ASSUME_SHUTDOWN_SYSCALL	1 | ||
| 87 | #define __ASSUME_GETSOCKNAME_SYSCALL	1 | ||
| 88 | #define __ASSUME_GETPEERNAME_SYSCALL	1 | ||
| 82 | 89 | ||
| 83 | /* Support for SysV IPC through wired syscalls. All supported architectures | 90 | /* Support for SysV IPC through wired syscalls. All supported architectures |
| 84 | either support ipc syscall and/or all the ipc correspondent syscalls. */ | 91 | either support ipc syscall and/or all the ipc correspondent syscalls. */ |
| ... | @@ -220,4 +227,29 @@ | ... | @@ -220,4 +227,29 @@ |
| 220 | # define __ASSUME_FACCESSAT2 0 | 227 | # define __ASSUME_FACCESSAT2 0 |
| 221 | #endif | 228 | #endif |
| 222 | 229 | ||
| 230 | /* The close_range system call was introduced across all architectures | ||
| 231 | in Linux 5.9. */ | ||
| 232 | #if __LINUX_KERNEL_VERSION >= 0x050900 | ||
| 233 | # define __ASSUME_CLOSE_RANGE 1 | ||
| 234 | #else | ||
| 235 | # define __ASSUME_CLOSE_RANGE 0 | ||
| 236 | #endif | ||
| 237 | |||
| 238 | /* The FUTEX_LOCK_PI2 operation was introduced across all architectures in Linux | ||
| 239 | 5.14. */ | ||
| 240 | #if __LINUX_KERNEL_VERSION >= 0x050e00 | ||
| 241 | # define __ASSUME_FUTEX_LOCK_PI2 1 | ||
| 242 | #else | ||
| 243 | # define __ASSUME_FUTEX_LOCK_PI2 0 | ||
| 244 | #endif | ||
| 245 | |||
| 246 | /* The clone3 system call was introduced across on most architectures in | ||
| 247 | Linux 5.3. Not all ports implements it, so it should be used along | ||
| 248 | HAVE_CLONE3_WRAPPER define. */ | ||
| 249 | #if __LINUX_KERNEL_VERSION >= 0x050300 | ||
| 250 | # define __ASSUME_CLONE3 1 | ||
| 251 | #else | ||
| 252 | # define __ASSUME_CLONE3 0 | ||
| 253 | #endif | ||
| 254 | |||
| 223 | #endif /* kernel-features.h */ | 255 | #endif /* kernel-features.h */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/kernel_stat.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Internal definitions for stat functions. | 1 | /* Internal definitions for stat functions. |
| 2 | Copyright (C) 2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2021-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/lstat.c+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Get file status. Linux version. | 1 | /* Get file status. Linux version. |
| 2 | Copyright (C) 2020-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/lstat64.c+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Get file status. | 1 | /* Get file status. |
| 2 | Copyright (C) 1996-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1996-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2010-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2010-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/kernel-features.h+9-12| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Set flags signalling availability of kernel features based on given | 1 | /* Set flags signalling availability of kernel features based on given |
| 2 | kernel version number. | 2 | kernel version number. |
| 3 | Copyright (C) 2008-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 2008-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -17,21 +17,11 @@ | ... | @@ -17,21 +17,11 @@ |
| 17 | License along with the GNU C Library. If not, see | 17 | License along with the GNU C Library. If not, see |
| 18 | <https://www.gnu.org/licenses/>. */ | 18 | <https://www.gnu.org/licenses/>. */ |
| 19 | 19 | ||
| 20 | /* Direct socketcalls available with kernel 4.3. */ | ||
| 21 | #if __LINUX_KERNEL_VERSION >= 0x040300 | ||
| 22 | # define __ASSUME_SOCKET_SYSCALL 1 | ||
| 23 | # define __ASSUME_SOCKETPAIR_SYSCALL 1 | ||
| 24 | # define __ASSUME_BIND_SYSCALL 1 | ||
| 25 | # define __ASSUME_LISTEN_SYSCALL 1 | ||
| 26 | # define __ASSUME_GETSOCKNAME_SYSCALL 1 | ||
| 27 | # define __ASSUME_GETPEERNAME_SYSCALL 1 | ||
| 28 | # define __ASSUME_SHUTDOWN_SYSCALL 1 | ||
| 29 | #endif | ||
| 30 | |||
| 31 | #include_next <kernel-features.h> | 20 | #include_next <kernel-features.h> |
| 32 | 21 | ||
| 33 | #undef __ASSUME_ACCEPT_SYSCALL | 22 | #undef __ASSUME_ACCEPT_SYSCALL |
| 34 | 23 | ||
| 24 | /* Direct socketcalls available with kernel 4.3. */ | ||
| 35 | #if __LINUX_KERNEL_VERSION < 0x040300 | 25 | #if __LINUX_KERNEL_VERSION < 0x040300 |
| 36 | # undef __ASSUME_ACCEPT4_SYSCALL | 26 | # undef __ASSUME_ACCEPT4_SYSCALL |
| 37 | # undef __ASSUME_RECVMMSG_SYSCALL | 27 | # undef __ASSUME_RECVMMSG_SYSCALL |
| ... | @@ -43,6 +33,13 @@ | ... | @@ -43,6 +33,13 @@ |
| 43 | # undef __ASSUME_SENDTO_SYSCALL | 33 | # undef __ASSUME_SENDTO_SYSCALL |
| 44 | # undef __ASSUME_GETSOCKOPT_SYSCALL | 34 | # undef __ASSUME_GETSOCKOPT_SYSCALL |
| 45 | # undef __ASSUME_SETSOCKOPT_SYSCALL | 35 | # undef __ASSUME_SETSOCKOPT_SYSCALL |
| 36 | # undef __ASSUME_BIND_SYSCALL | ||
| 37 | # undef __ASSUME_SOCKET_SYSCALL | ||
| 38 | # undef __ASSUME_SOCKETPAIR_SYSCALL | ||
| 39 | # undef __ASSUME_LISTEN_SYSCALL | ||
| 40 | # undef __ASSUME_SHUTDOWN_SYSCALL | ||
| 41 | # undef __ASSUME_GETSOCKNAME_SYSCALL | ||
| 42 | # undef __ASSUME_GETPEERNAME_SYSCALL | ||
| 46 | #endif | 43 | #endif |
| 47 | 44 | ||
| 48 | /* No support for PI futexes or robust mutexes before 3.10 for m68k. */ | 45 | /* No support for PI futexes or robust mutexes before 3.10 for m68k. */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2010-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2010-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/sysdep.h+3-11| ... | @@ -1,7 +1,5 @@ | ... | @@ -1,7 +1,5 @@ |
| 1 | /* Copyright (C) 1996-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1996-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | Written by Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>, | ||
| 4 | December 1995. | ||
| 5 | 3 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| 7 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
| ... | @@ -40,7 +38,7 @@ | ... | @@ -40,7 +38,7 @@ |
| 40 | a large offset. Therefore we must not anymore test for < 0, but test | 38 | a large offset. Therefore we must not anymore test for < 0, but test |
| 41 | for a real error by making sure the value in %d0 is a real error | 39 | for a real error by making sure the value in %d0 is a real error |
| 42 | number. Linus said he will make sure the no syscall returns a value | 40 | number. Linus said he will make sure the no syscall returns a value |
| 43 | in -1 .. -4095 as a valid result so we can savely test with -4095. */ | 41 | in -1 .. -4095 as a valid result so we can safely test with -4095. */ |
| 44 | 42 | ||
| 45 | /* We don't want the label for the error handler to be visible in the symbol | 43 | /* We don't want the label for the error handler to be visible in the symbol |
| 46 | table when we define it here. */ | 44 | table when we define it here. */ |
| ... | @@ -297,12 +295,6 @@ SYSCALL_ERROR_LABEL:							 \ | ... | @@ -297,12 +295,6 @@ SYSCALL_ERROR_LABEL:							 \ |
| 297 | 295 | ||
| 298 | #endif /* not __ASSEMBLER__ */ | 296 | #endif /* not __ASSEMBLER__ */ |
| 299 | 297 | ||
| 300 | /* Pointer mangling is not yet supported for M68K. */ | ||
| 301 | #define PTR_MANGLE(var) (void) (var) | ||
| 302 | #define PTR_DEMANGLE(var) (void) (var) | ||
| 303 | |||
| 304 | #if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO | ||
| 305 | /* M68K needs system-supplied DSO to access TLS helpers | 298 | /* M68K needs system-supplied DSO to access TLS helpers |
| 306 | even when statically linked. */ | 299 | even when statically linked. */ |
| 307 | # define NEED_STATIC_SYSINFO_DSO 1 | 300 | #define NEED_STATIC_SYSINFO_DSO 1 |
| 308 | #endif |
lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/kernel-features.h+1-8| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2011-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2011-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -18,16 +18,9 @@ | ... | @@ -18,16 +18,9 @@ |
| 18 | #include <endian.h> | 18 | #include <endian.h> |
| 19 | 19 | ||
| 20 | /* All supported kernel versions for MicroBlaze have these syscalls. */ | 20 | /* All supported kernel versions for MicroBlaze have these syscalls. */ |
| 21 | #define __ASSUME_SOCKET_SYSCALL		1 | ||
| 22 | #define __ASSUME_BIND_SYSCALL		1 | ||
| 23 | #define __ASSUME_CONNECT_SYSCALL	1 | 21 | #define __ASSUME_CONNECT_SYSCALL	1 |
| 24 | #define __ASSUME_LISTEN_SYSCALL		1 | ||
| 25 | #define __ASSUME_GETSOCKNAME_SYSCALL	1 | ||
| 26 | #define __ASSUME_GETPEERNAME_SYSCALL	1 | ||
| 27 | #define __ASSUME_SOCKETPAIR_SYSCALL	1 | ||
| 28 | #define __ASSUME_SEND_SYSCALL		1 | 22 | #define __ASSUME_SEND_SYSCALL		1 |
| 29 | #define __ASSUME_RECV_SYSCALL		1 | 23 | #define __ASSUME_RECV_SYSCALL		1 |
| 30 | #define __ASSUME_SHUTDOWN_SYSCALL	1 | ||
| 31 | 24 | ||
| 32 | #include_next <kernel-features.h> | 25 | #include_next <kernel-features.h> |
| 33 | 26 |
lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/kernel_stat.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Definition of `struct stat' used in the kernel | 1 | /* Definition of `struct stat' used in the kernel |
| 2 | Copyright (C) 2013-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2013-2023 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 |
lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/sysdep.h+3-9| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2000-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 2 | 2 | ||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| ... | @@ -43,7 +43,7 @@ | ... | @@ -43,7 +43,7 @@ |
| 43 | #ifdef __ASSEMBLER__ | 43 | #ifdef __ASSEMBLER__ |
| 44 | 44 | ||
| 45 | /* In microblaze ABI function call arguments are passed in registers | 45 | /* In microblaze ABI function call arguments are passed in registers |
| 46 | r5...r10. The return value is stored in r3 (or r3:r4 regiters pair). | 46 | r5...r10. The return value is stored in r3 (or r3:r4 register pair). |
| 47 | Linux syscall uses the same convention with the addition that the | 47 | Linux syscall uses the same convention with the addition that the |
| 48 | syscall number is passed in r12. To enter the kernel "brki r14,8" | 48 | syscall number is passed in r12. To enter the kernel "brki r14,8" |
| 49 | instruction is used. | 49 | instruction is used. |
| ... | @@ -58,7 +58,7 @@ | ... | @@ -58,7 +58,7 @@ |
| 58 | a large offset. Therefore we must not anymore test for < 0, but test | 58 | a large offset. Therefore we must not anymore test for < 0, but test |
| 59 | for a real error by making sure the value in %d0 is a real error | 59 | for a real error by making sure the value in %d0 is a real error |
| 60 | number. Linus said he will make sure the no syscall returns a value | 60 | number. Linus said he will make sure the no syscall returns a value |
| 61 | in -1 .. -4095 as a valid result so we can savely test with -4095. */ | 61 | in -1 .. -4095 as a valid result so we can safely test with -4095. */ |
| 62 | 62 | ||
| 63 | /* We don't want the label for the error handler to be visible in the symbol | 63 | /* We don't want the label for the error handler to be visible in the symbol |
| 64 | table when we define it here. */ | 64 | table when we define it here. */ |
| ... | @@ -304,12 +304,6 @@ SYSCALL_ERROR_LABEL_DCL: \ | ... | @@ -304,12 +304,6 @@ SYSCALL_ERROR_LABEL_DCL: \ |
| 304 | }) | 304 | }) |
| 305 | 305 | ||
| 306 | 306 | ||
| 307 | /* Pointer mangling is not yet supported for Microblaze. */ | ||
| 308 | # define PTR_MANGLE(var) (void) (var) | ||
| 309 | # define PTR_DEMANGLE(var) (void) (var) | ||
| 310 | |||
| 311 | # define SINGLE_THREAD_BY_GLOBAL	1 | ||
| 312 | |||
| 313 | #undef HAVE_INTERNAL_BRK_ADDR_SYMBOL | 307 | #undef HAVE_INTERNAL_BRK_ADDR_SYMBOL |
| 314 | #define HAVE_INTERNAL_BRK_ADDR_SYMBOL 1 | 308 | #define HAVE_INTERNAL_BRK_ADDR_SYMBOL 1 |
| 315 | 309 |
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/kernel-features.h+1-1| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Set flags signalling availability of kernel features based on given | 1 | /* Set flags signalling availability of kernel features based on given |
| 2 | kernel version number. | 2 | kernel version number. |
| 3 | Copyright (C) 1999-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h+1-5| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2000-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -337,8 +337,4 @@ libc_hidden_proto (__mips_syscall7, nomips16) | ... | @@ -337,8 +337,4 @@ libc_hidden_proto (__mips_syscall7, nomips16) |
| 337 | 337 | ||
| 338 | #endif /* __ASSEMBLER__ */ | 338 | #endif /* __ASSEMBLER__ */ |
| 339 | 339 | ||
| 340 | /* Pointer mangling is not yet supported for MIPS. */ | ||
| 341 | #define PTR_MANGLE(var) (void) (var) | ||
| 342 | #define PTR_DEMANGLE(var) (void) (var) | ||
| 343 | |||
| 344 | #endif /* linux/mips/mips32/sysdep.h */ | 340 | #endif /* linux/mips/mips32/sysdep.h */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/kstat_cp.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Struct stat/stat64 to stat/stat64 conversion for Linux. | 1 | /* Struct stat/stat64 to stat/stat64 conversion for Linux. |
| 2 | Copyright (C) 2020-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/sysdep.h+1-5| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2000-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -300,8 +300,4 @@ typedef long int __syscall_arg_t; | ... | @@ -300,8 +300,4 @@ typedef long int __syscall_arg_t; |
| 300 | 300 | ||
| 301 | #endif /* __ASSEMBLER__ */ | 301 | #endif /* __ASSEMBLER__ */ |
| 302 | 302 | ||
| 303 | /* Pointer mangling is not yet supported for MIPS. */ | ||
| 304 | #define PTR_MANGLE(var) (void) (var) | ||
| 305 | #define PTR_DEMANGLE(var) (void) (var) | ||
| 306 | |||
| 307 | #endif /* linux/mips/sysdep.h */ | 303 | #endif /* linux/mips/sysdep.h */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/sysdep.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Syscall definitions, Linux MIPS generic version. | 1 | /* Syscall definitions, Linux MIPS generic version. |
| 2 | Copyright (C) 2019-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2019-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/mknodat.c+1-2| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Create a special or ordinary file. Linux version. | 1 | /* Create a special or ordinary file. Linux version. |
| 2 | Copyright (C) 2020-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -16,7 +16,6 @@ | ... | @@ -16,7 +16,6 @@ |
| 16 | License along with the GNU C Library; if not, see | 16 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ | 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | #include <inttypes.h> | ||
| 20 | #include <sys/types.h> | 19 | #include <sys/types.h> |
| 21 | #include <sys/stat.h> | 20 | #include <sys/stat.h> |
| 22 | #include <errno.h> | 21 | #include <errno.h> |
lib/libc/glibc/sysdeps/unix/sysv/linux/nios2/kernel_stat.h+1-2| ... | @@ -1,7 +1,6 @@ | ... | @@ -1,7 +1,6 @@ |
| 1 | /* Internal definitions for stat functions. Linux/nios2. | 1 | /* Internal definitions for stat functions. Linux/nios2. |
| 2 | Copyright (C) 2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2021-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011. | ||
| 5 | 4 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 7 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
lib/libc/glibc/sysdeps/unix/sysv/linux/nios2/sysdep.h+2-19| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembler macros for Nios II. | 1 | /* Assembler macros for Nios II. |
| 2 | Copyright (C) 2000-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -19,9 +19,9 @@ | ... | @@ -19,9 +19,9 @@ |
| 19 | #ifndef _LINUX_NIOS2_SYSDEP_H | 19 | #ifndef _LINUX_NIOS2_SYSDEP_H |
| 20 | #define _LINUX_NIOS2_SYSDEP_H 1 | 20 | #define _LINUX_NIOS2_SYSDEP_H 1 |
| 21 | 21 | ||
| 22 | #include <sysdeps/unix/sysv/linux/sysdep.h> | ||
| 22 | #include <sysdeps/unix/sysdep.h> | 23 | #include <sysdeps/unix/sysdep.h> |
| 23 | #include <sysdeps/nios2/sysdep.h> | 24 | #include <sysdeps/nios2/sysdep.h> |
| 24 | #include <sysdeps/unix/sysv/linux/generic/sysdep.h> | ||
| 25 | 25 | ||
| 26 | /* For RTLD_PRIVATE_ERRNO. */ | 26 | /* For RTLD_PRIVATE_ERRNO. */ |
| 27 | #include <dl-sysdep.h> | 27 | #include <dl-sysdep.h> |
| ... | @@ -220,21 +220,4 @@ | ... | @@ -220,21 +220,4 @@ |
| 220 | 220 | ||
| 221 | #endif /* __ASSEMBLER__ */ | 221 | #endif /* __ASSEMBLER__ */ |
| 222 | 222 | ||
| 223 | /* Pointer mangling support. */ | ||
| 224 | #if IS_IN (rtld) | ||
| 225 | /* We cannot use the thread descriptor because in ld.so we use setjmp | ||
| 226 | earlier than the descriptor is initialized. */ | ||
| 227 | #else | ||
| 228 | # ifdef __ASSEMBLER__ | ||
| 229 | # define PTR_MANGLE_GUARD(guard) ldw guard, POINTER_GUARD(r23) | ||
| 230 | # define PTR_MANGLE(dst, src, guard) xor dst, src, guard | ||
| 231 | # define PTR_DEMANGLE(dst, src, guard) PTR_MANGLE (dst, src, guard) | ||
| 232 | # else | ||
| 233 | # define PTR_MANGLE(var) \ | ||
| 234 | (var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) | ||
| 235 | # define PTR_DEMANGLE(var)	PTR_MANGLE (var) | ||
| 236 | # endif | ||
| 237 | #endif | ||
| 238 | |||
| 239 | |||
| 240 | #endif /* linux/nios2/sysdep.h */ | 223 | #endif /* linux/nios2/sysdep.h */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h+1-8| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Set flags signalling availability of kernel features based on given | 1 | /* Set flags signalling availability of kernel features based on given |
| 2 | kernel version number. PowerPC version. | 2 | kernel version number. PowerPC version. |
| 3 | Copyright (C) 1999-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -18,16 +18,9 @@ | ... | @@ -18,16 +18,9 @@ |
| 18 | <https://www.gnu.org/licenses/>. */ | 18 | <https://www.gnu.org/licenses/>. */ |
| 19 | 19 | ||
| 20 | /* New syscalls added for PowerPC in 2.6.37. */ | 20 | /* New syscalls added for PowerPC in 2.6.37. */ |
| 21 | #define __ASSUME_SOCKET_SYSCALL	1 | ||
| 22 | #define __ASSUME_BIND_SYSCALL		1 | ||
| 23 | #define __ASSUME_CONNECT_SYSCALL	1 | 21 | #define __ASSUME_CONNECT_SYSCALL	1 |
| 24 | #define __ASSUME_LISTEN_SYSCALL		1 | ||
| 25 | #define __ASSUME_GETSOCKNAME_SYSCALL	1 | ||
| 26 | #define __ASSUME_GETPEERNAME_SYSCALL	1 | ||
| 27 | #define __ASSUME_SOCKETPAIR_SYSCALL	1 | ||
| 28 | #define __ASSUME_SEND_SYSCALL		1 | 22 | #define __ASSUME_SEND_SYSCALL		1 |
| 29 | #define __ASSUME_RECV_SYSCALL		1 | 23 | #define __ASSUME_RECV_SYSCALL		1 |
| 30 | #define __ASSUME_SHUTDOWN_SYSCALL	1 | ||
| 31 | 24 | ||
| 32 | /* Define this if your 32-bit syscall API requires 64-bit register | 25 | /* Define this if your 32-bit syscall API requires 64-bit register |
| 33 | pairs to start with an even-number register. */ | 26 | pairs to start with an even-number register. */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Definition of `struct stat' used in the kernel. | 1 | /* Definition of `struct stat' used in the kernel. |
| 2 | Copyright (C) 1997-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 1997-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1992-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/sysdep.h+2-40| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Syscall definitions, Linux PowerPC generic version. | 1 | /* Syscall definitions, Linux PowerPC generic version. |
| 2 | Copyright (C) 2019-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2019-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -207,38 +207,6 @@ | ... | @@ -207,38 +207,6 @@ |
| 207 | #define ASM_INPUT_5 ASM_INPUT_4, "5" (r7) | 207 | #define ASM_INPUT_5 ASM_INPUT_4, "5" (r7) |
| 208 | #define ASM_INPUT_6 ASM_INPUT_5, "6" (r8) | 208 | #define ASM_INPUT_6 ASM_INPUT_5, "6" (r8) |
| 209 | 209 | ||
| 210 | |||
| 211 | /* Pointer mangling support. */ | ||
| 212 | #if IS_IN (rtld) | ||
| 213 | /* We cannot use the thread descriptor because in ld.so we use setjmp | ||
| 214 | earlier than the descriptor is initialized. */ | ||
| 215 | #else | ||
| 216 | # ifdef __ASSEMBLER__ | ||
| 217 | # if defined(__PPC64__) || defined(__powerpc64__) | ||
| 218 | # define LOAD ld | ||
| 219 | # define TPREG r13 | ||
| 220 | # else | ||
| 221 | # define LOAD lwz | ||
| 222 | # define TPREG r2 | ||
| 223 | # endif | ||
| 224 | # define PTR_MANGLE(reg, tmpreg) \ | ||
| 225 | 	LOAD	tmpreg,POINTER_GUARD(TPREG); \ | ||
| 226 | 	xor	reg,tmpreg,reg | ||
| 227 | # define PTR_MANGLE2(reg, tmpreg) \ | ||
| 228 | 	xor	reg,tmpreg,reg | ||
| 229 | # define PTR_MANGLE3(destreg, reg, tmpreg) \ | ||
| 230 | 	LOAD	tmpreg,POINTER_GUARD(TPREG); \ | ||
| 231 | 	xor	destreg,tmpreg,reg | ||
| 232 | # define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg) | ||
| 233 | # define PTR_DEMANGLE2(reg, tmpreg) PTR_MANGLE2 (reg, tmpreg) | ||
| 234 | # define PTR_DEMANGLE3(destreg, reg, tmpreg) PTR_MANGLE3 (destreg, reg, tmpreg) | ||
| 235 | # else | ||
| 236 | # define PTR_MANGLE(var) \ | ||
| 237 | (var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) | ||
| 238 | # define PTR_DEMANGLE(var)	PTR_MANGLE (var) | ||
| 239 | # endif | ||
| 240 | #endif | ||
| 241 | |||
| 242 | /* List of system calls which are supported as vsyscalls. */ | 210 | /* List of system calls which are supported as vsyscalls. */ |
| 243 | #define VDSO_NAME "LINUX_2.6.15" | 211 | #define VDSO_NAME "LINUX_2.6.15" |
| 244 | #define VDSO_HASH 123718565 | 212 | #define VDSO_HASH 123718565 |
| ... | @@ -246,6 +214,7 @@ | ... | @@ -246,6 +214,7 @@ |
| 246 | #if defined(__PPC64__) || defined(__powerpc64__) | 214 | #if defined(__PPC64__) || defined(__powerpc64__) |
| 247 | #define HAVE_CLOCK_GETRES64_VSYSCALL	"__kernel_clock_getres" | 215 | #define HAVE_CLOCK_GETRES64_VSYSCALL	"__kernel_clock_getres" |
| 248 | #define HAVE_CLOCK_GETTIME64_VSYSCALL	"__kernel_clock_gettime" | 216 | #define HAVE_CLOCK_GETTIME64_VSYSCALL	"__kernel_clock_gettime" |
| 217 | #define HAVE_CLONE3_WRAPPER		1 | ||
| 249 | #else | 218 | #else |
| 250 | #define HAVE_CLOCK_GETRES_VSYSCALL	"__kernel_clock_getres" | 219 | #define HAVE_CLOCK_GETRES_VSYSCALL	"__kernel_clock_getres" |
| 251 | #define HAVE_CLOCK_GETTIME_VSYSCALL	"__kernel_clock_gettime" | 220 | #define HAVE_CLOCK_GETTIME_VSYSCALL	"__kernel_clock_gettime" |
| ... | @@ -255,11 +224,4 @@ | ... | @@ -255,11 +224,4 @@ |
| 255 | #define HAVE_GETTIMEOFDAY_VSYSCALL "__kernel_gettimeofday" | 224 | #define HAVE_GETTIMEOFDAY_VSYSCALL "__kernel_gettimeofday" |
| 256 | #define HAVE_GET_TBFREQ "__kernel_get_tbfreq" | 225 | #define HAVE_GET_TBFREQ "__kernel_get_tbfreq" |
| 257 | 226 | ||
| 258 | #if defined(__PPC64__) || defined(__powerpc64__) | ||
| 259 | # define HAVE_SIGTRAMP_RT64		"__kernel_sigtramp_rt64" | ||
| 260 | #else | ||
| 261 | # define HAVE_SIGTRAMP_32		"__kernel_sigtramp32" | ||
| 262 | # define HAVE_SIGTRAMP_RT32		"__kernel_sigtramp_rt32" | ||
| 263 | #endif | ||
| 264 | |||
| 265 | #endif /* _LINUX_POWERPC_SYSDEP_H */ | 227 | #endif /* _LINUX_POWERPC_SYSDEP_H */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/kernel-features.h+1-1| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Set flags signalling availability of kernel features based on given | 1 | /* Set flags signalling availability of kernel features based on given |
| 2 | kernel version number. RISC-V version. | 2 | kernel version number. RISC-V version. |
| 3 | Copyright (C) 2018-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 2018-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/sysdep.h+5-7| ... | @@ -19,7 +19,8 @@ | ... | @@ -19,7 +19,8 @@ |
| 19 | #ifndef _LINUX_RISCV_SYSDEP_H | 19 | #ifndef _LINUX_RISCV_SYSDEP_H |
| 20 | #define _LINUX_RISCV_SYSDEP_H 1 | 20 | #define _LINUX_RISCV_SYSDEP_H 1 |
| 21 | 21 | ||
| 22 | #include <sysdeps/unix/sysv/linux/generic/sysdep.h> | 22 | #include <sysdeps/unix/sysv/linux/sysdep.h> |
| 23 | #include <sysdeps/unix/sysdep.h> | ||
| 23 | #include <tls.h> | 24 | #include <tls.h> |
| 24 | 25 | ||
| 25 | #undef SYS_ify | 26 | #undef SYS_ify |
| ... | @@ -102,7 +103,7 @@ | ... | @@ -102,7 +103,7 @@ |
| 102 | # else | 103 | # else |
| 103 | # define SYSCALL_ERROR_HANDLER(name)				\ | 104 | # define SYSCALL_ERROR_HANDLER(name)				\ |
| 104 | .Lsyscall_error ## name:					\ | 105 | .Lsyscall_error ## name:					\ |
| 105 | j __syscall_error; | 106 | tail __syscall_error; |
| 106 | # endif | 107 | # endif |
| 107 | 108 | ||
| 108 | /* Performs a system call, not setting errno. */ | 109 | /* Performs a system call, not setting errno. */ |
| ... | @@ -120,7 +121,7 @@ | ... | @@ -120,7 +121,7 @@ |
| 120 | # undef ret_NOERRNO | 121 | # undef ret_NOERRNO |
| 121 | # define ret_NOERRNO ret | 122 | # define ret_NOERRNO ret |
| 122 | 123 | ||
| 123 | /* Perfroms a system call, returning the error code. */ | 124 | /* Performs a system call, returning the error code. */ |
| 124 | # undef PSEUDO_ERRVAL | 125 | # undef PSEUDO_ERRVAL |
| 125 | # define PSEUDO_ERRVAL(name, syscall_name, args) 	\ | 126 | # define PSEUDO_ERRVAL(name, syscall_name, args) 	\ |
| 126 | PSEUDO_NOERRNO (name, syscall_name, args)		\ | 127 | PSEUDO_NOERRNO (name, syscall_name, args)		\ |
| ... | @@ -150,6 +151,7 @@ | ... | @@ -150,6 +151,7 @@ |
| 150 | 151 | ||
| 151 | /* RV32 does not support the gettime VDSO syscalls. */ | 152 | /* RV32 does not support the gettime VDSO syscalls. */ |
| 152 | # endif | 153 | # endif |
| 154 | # define HAVE_CLONE3_WRAPPER		1 | ||
| 153 | 155 | ||
| 154 | /* List of system calls which are supported as vsyscalls (for RV32 and | 156 | /* List of system calls which are supported as vsyscalls (for RV32 and |
| 155 | RV64). */ | 157 | RV64). */ |
| ... | @@ -357,8 +359,4 @@ extern long int __syscall_error (long int neg_errno); | ... | @@ -357,8 +359,4 @@ extern long int __syscall_error (long int neg_errno); |
| 357 | 359 | ||
| 358 | #endif /* ! __ASSEMBLER__ */ | 360 | #endif /* ! __ASSEMBLER__ */ |
| 359 | 361 | ||
| 360 | /* Pointer mangling is not supported. */ | ||
| 361 | #define PTR_MANGLE(var) (void) (var) | ||
| 362 | #define PTR_DEMANGLE(var) (void) (var) | ||
| 363 | |||
| 364 | #endif /* linux/riscv/sysdep.h */ | 362 | #endif /* linux/riscv/sysdep.h */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* bits/typesizes.h -- underlying types for *_t. Linux/s390 version. | 1 | /* bits/typesizes.h -- underlying types for *_t. Linux/s390 version. |
| 2 | Copyright (C) 2003-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2003-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/kernel-features.h+9-12| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Set flags signalling availability of kernel features based on given | 1 | /* Set flags signalling availability of kernel features based on given |
| 2 | kernel version number. S/390 version. | 2 | kernel version number. S/390 version. |
| 3 | Copyright (C) 1999-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -17,21 +17,11 @@ | ... | @@ -17,21 +17,11 @@ |
| 17 | License along with the GNU C Library; if not, see | 17 | License along with the GNU C Library; if not, see |
| 18 | <https://www.gnu.org/licenses/>. */ | 18 | <https://www.gnu.org/licenses/>. */ |
| 19 | 19 | ||
| 20 | /* Direct socketcalls available with kernel 4.3. */ | ||
| 21 | #if __LINUX_KERNEL_VERSION >= 0x040300 | ||
| 22 | # define __ASSUME_SOCKET_SYSCALL 1 | ||
| 23 | # define __ASSUME_SOCKETPAIR_SYSCALL 1 | ||
| 24 | # define __ASSUME_BIND_SYSCALL 1 | ||
| 25 | # define __ASSUME_LISTEN_SYSCALL 1 | ||
| 26 | # define __ASSUME_GETSOCKNAME_SYSCALL 1 | ||
| 27 | # define __ASSUME_GETPEERNAME_SYSCALL 1 | ||
| 28 | # define __ASSUME_SHUTDOWN_SYSCALL 1 | ||
| 29 | #endif | ||
| 30 | |||
| 31 | #include_next <kernel-features.h> | 20 | #include_next <kernel-features.h> |
| 32 | 21 | ||
| 33 | #undef __ASSUME_ACCEPT_SYSCALL | 22 | #undef __ASSUME_ACCEPT_SYSCALL |
| 34 | 23 | ||
| 24 | /* Direct socketcalls available with kernel 4.3. */ | ||
| 35 | #if __LINUX_KERNEL_VERSION < 0x040300 | 25 | #if __LINUX_KERNEL_VERSION < 0x040300 |
| 36 | # undef __ASSUME_ACCEPT4_SYSCALL | 26 | # undef __ASSUME_ACCEPT4_SYSCALL |
| 37 | # undef __ASSUME_RECVMMSG_SYSCALL | 27 | # undef __ASSUME_RECVMMSG_SYSCALL |
| ... | @@ -43,6 +33,13 @@ | ... | @@ -43,6 +33,13 @@ |
| 43 | # undef __ASSUME_SENDTO_SYSCALL | 33 | # undef __ASSUME_SENDTO_SYSCALL |
| 44 | # undef __ASSUME_GETSOCKOPT_SYSCALL | 34 | # undef __ASSUME_GETSOCKOPT_SYSCALL |
| 45 | # undef __ASSUME_SETSOCKOPT_SYSCALL | 35 | # undef __ASSUME_SETSOCKOPT_SYSCALL |
| 36 | # undef __ASSUME_BIND_SYSCALL | ||
| 37 | # undef __ASSUME_SOCKET_SYSCALL | ||
| 38 | # undef __ASSUME_SOCKETPAIR_SYSCALL | ||
| 39 | # undef __ASSUME_LISTEN_SYSCALL | ||
| 40 | # undef __ASSUME_SHUTDOWN_SYSCALL | ||
| 41 | # undef __ASSUME_GETSOCKNAME_SYSCALL | ||
| 42 | # undef __ASSUME_GETPEERNAME_SYSCALL | ||
| 46 | #endif | 43 | #endif |
| 47 | 44 | ||
| 48 | /* s390 only supports ipc syscall before 5.1. */ | 45 | /* s390 only supports ipc syscall before 5.1. */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h+2-28| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | /* Copyright (C) 2000-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 2 | Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). | ||
| 3 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 4 | 3 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -43,7 +42,7 @@ | ... | @@ -43,7 +42,7 @@ |
| 43 | a large offset. Therefore we must not anymore test for < 0, but test | 42 | a large offset. Therefore we must not anymore test for < 0, but test |
| 44 | for a real error by making sure the value in gpr2 is a real error | 43 | for a real error by making sure the value in gpr2 is a real error |
| 45 | number. Linus said he will make sure that no syscall returns a value | 44 | number. Linus said he will make sure that no syscall returns a value |
| 46 | in -1 .. -4095 as a valid result so we can savely test with -4095. */ | 45 | in -1 .. -4095 as a valid result so we can safely test with -4095. */ |
| 47 | 46 | ||
| 48 | #undef PSEUDO | 47 | #undef PSEUDO |
| 49 | #define	PSEUDO(name, syscall_name, args)				 \ | 48 | #define	PSEUDO(name, syscall_name, args)				 \ |
| ... | @@ -156,12 +155,8 @@ | ... | @@ -156,12 +155,8 @@ |
| 156 | lr %r0,%r7;								 \ | 155 | lr %r0,%r7;								 \ |
| 157 | l %r7,96(%r15);							 \ | 156 | l %r7,96(%r15);							 \ |
| 158 | .endif;								 \ | 157 | .endif;								 \ |
| 159 | .if SYS_ify (syscall) < 256;						 \ | ||
| 160 | svc SYS_ify (syscall);						 \ | ||
| 161 | .else;								 \ | ||
| 162 | lhi %r1,SYS_ify (syscall);						 \ | 158 | lhi %r1,SYS_ify (syscall);						 \ |
| 163 | svc 0;								 \ | 159 | svc 0;								 \ |
| 164 | .endif;								 \ | ||
| 165 | .if args > 5;								 \ | 160 | .if args > 5;								 \ |
| 166 | lr %r7,%r0;								 \ | 161 | lr %r7,%r0;								 \ |
| 167 | .endif | 162 | .endif |
| ... | @@ -182,25 +177,4 @@ | ... | @@ -182,25 +177,4 @@ |
| 182 | 177 | ||
| 183 | #endif /* __ASSEMBLER__ */ | 178 | #endif /* __ASSEMBLER__ */ |
| 184 | 179 | ||
| 185 | /* Pointer mangling support. */ | ||
| 186 | #if IS_IN (rtld) | ||
| 187 | /* We cannot use the thread descriptor because in ld.so we use setjmp | ||
| 188 | earlier than the descriptor is initialized. */ | ||
| 189 | #else | ||
| 190 | /* For the time being just use stack_guard rather than a separate | ||
| 191 | pointer_guard. */ | ||
| 192 | # ifdef __ASSEMBLER__ | ||
| 193 | # define PTR_MANGLE(reg, tmpreg) \ | ||
| 194 | ear tmpreg,%a0;			\ | ||
| 195 | x reg,STACK_GUARD(tmpreg) | ||
| 196 | # define PTR_MANGLE2(reg, tmpreg) \ | ||
| 197 | x reg,STACK_GUARD(tmpreg) | ||
| 198 | # define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg) | ||
| 199 | # else | ||
| 200 | # define PTR_MANGLE(var) \ | ||
| 201 | (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) | ||
| 202 | # define PTR_DEMANGLE(var)	PTR_MANGLE (var) | ||
| 203 | # endif | ||
| 204 | #endif | ||
| 205 | |||
| 206 | #endif /* _LINUX_S390_SYSDEP_H */ | 180 | #endif /* _LINUX_S390_SYSDEP_H */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h+2-30| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Assembler macros for 64 bit S/390. | 1 | /* Assembler macros for 64 bit S/390. |
| 2 | Copyright (C) 2001-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2001-2023 Free Software Foundation, Inc. |
| 3 | Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). | ||
| 4 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 5 | 4 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -47,7 +46,7 @@ | ... | @@ -47,7 +46,7 @@ |
| 47 | a large offset. Therefore we must not anymore test for < 0, but test | 46 | a large offset. Therefore we must not anymore test for < 0, but test |
| 48 | for a real error by making sure the value in gpr2 is a real error | 47 | for a real error by making sure the value in gpr2 is a real error |
| 49 | number. Linus said he will make sure that no syscall returns a value | 48 | number. Linus said he will make sure that no syscall returns a value |
| 50 | in -1 .. -4095 as a valid result so we can savely test with -4095. */ | 49 | in -1 .. -4095 as a valid result so we can safely test with -4095. */ |
| 51 | 50 | ||
| 52 | #undef PSEUDO | 51 | #undef PSEUDO |
| 53 | #define	PSEUDO(name, syscall_name, args)				 \ | 52 | #define	PSEUDO(name, syscall_name, args)				 \ |
| ... | @@ -154,12 +153,8 @@ | ... | @@ -154,12 +153,8 @@ |
| 154 | lgr %r0,%r7;							 \ | 153 | lgr %r0,%r7;							 \ |
| 155 | lg %r7,160(%r15);							 \ | 154 | lg %r7,160(%r15);							 \ |
| 156 | .endif;								 \ | 155 | .endif;								 \ |
| 157 | .if SYS_ify (syscall) < 256;						 \ | ||
| 158 | svc SYS_ify (syscall);						 \ | ||
| 159 | .else;								 \ | ||
| 160 | lghi %r1,SYS_ify (syscall);						 \ | 156 | lghi %r1,SYS_ify (syscall);						 \ |
| 161 | svc 0;								 \ | 157 | svc 0;								 \ |
| 162 | .endif;								 \ | ||
| 163 | .if args > 5;								 \ | 158 | .if args > 5;								 \ |
| 164 | lgr %r7,%r0;							 \ | 159 | lgr %r7,%r0;							 \ |
| 165 | .endif | 160 | .endif |
| ... | @@ -180,27 +175,4 @@ | ... | @@ -180,27 +175,4 @@ |
| 180 | 175 | ||
| 181 | #endif /* __ASSEMBLER__ */ | 176 | #endif /* __ASSEMBLER__ */ |
| 182 | 177 | ||
| 183 | /* Pointer mangling support. */ | ||
| 184 | #if IS_IN (rtld) | ||
| 185 | /* We cannot use the thread descriptor because in ld.so we use setjmp | ||
| 186 | earlier than the descriptor is initialized. */ | ||
| 187 | #else | ||
| 188 | /* For the time being just use stack_guard rather than a separate | ||
| 189 | pointer_guard. */ | ||
| 190 | # ifdef __ASSEMBLER__ | ||
| 191 | # define PTR_MANGLE(reg, tmpreg) \ | ||
| 192 | ear tmpreg,%a0;			\ | ||
| 193 | sllg tmpreg,tmpreg,32;		\ | ||
| 194 | ear tmpreg,%a1;			\ | ||
| 195 | xg reg,STACK_GUARD(tmpreg) | ||
| 196 | # define PTR_MANGLE2(reg, tmpreg) \ | ||
| 197 | xg reg,STACK_GUARD(tmpreg) | ||
| 198 | # define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg) | ||
| 199 | # else | ||
| 200 | # define PTR_MANGLE(var) \ | ||
| 201 | (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) | ||
| 202 | # define PTR_DEMANGLE(var)	PTR_MANGLE (var) | ||
| 203 | # endif | ||
| 204 | #endif | ||
| 205 | |||
| 206 | #endif /* _LINUX_S390_SYSDEP_H */ | 178 | #endif /* _LINUX_S390_SYSDEP_H */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sys/elf.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2000-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sysdep.h+4-34| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Syscall definitions, Linux s390 version. | 1 | /* Syscall definitions, Linux s390 version. |
| 2 | Copyright (C) 2019-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2019-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -21,32 +21,6 @@ | ... | @@ -21,32 +21,6 @@ |
| 21 | #undef SYS_ify | 21 | #undef SYS_ify |
| 22 | #define SYS_ify(syscall_name)	__NR_##syscall_name | 22 | #define SYS_ify(syscall_name)	__NR_##syscall_name |
| 23 | 23 | ||
| 24 | #undef INTERNAL_SYSCALL_DIRECT | ||
| 25 | #define INTERNAL_SYSCALL_DIRECT(name, nr, args...)			 \ | ||
| 26 | ({									 \ | ||
| 27 | DECLARGS_##nr(args)							 \ | ||
| 28 | register long int _ret __asm__("2");				 \ | ||
| 29 | __asm__ __volatile__ (						 \ | ||
| 30 | 			 "svc %b1\n\t"				 \ | ||
| 31 | 			 : "=d" (_ret)					 \ | ||
| 32 | 			 : "i" (__NR_##name) ASMFMT_##nr		 \ | ||
| 33 | 			 : "memory" );					 \ | ||
| 34 | _ret; }) | ||
| 35 | |||
| 36 | #undef INTERNAL_SYSCALL_SVC0 | ||
| 37 | #define INTERNAL_SYSCALL_SVC0(name, nr, args...)			 \ | ||
| 38 | ({									 \ | ||
| 39 | DECLARGS_##nr(args)							 \ | ||
| 40 | register unsigned long int _nr __asm__("1") =			 \ | ||
| 41 | (unsigned long int)(__NR_##name);					 \ | ||
| 42 | register long int _ret __asm__("2");				 \ | ||
| 43 | __asm__ __volatile__ (						 \ | ||
| 44 | 			 "svc 0\n\t"				 \ | ||
| 45 | 			 : "=d" (_ret)					 \ | ||
| 46 | 			 : "d" (_nr) ASMFMT_##nr			 \ | ||
| 47 | 			 : "memory" );					 \ | ||
| 48 | _ret; }) | ||
| 49 | |||
| 50 | #undef INTERNAL_SYSCALL_NCS | 24 | #undef INTERNAL_SYSCALL_NCS |
| 51 | #define INTERNAL_SYSCALL_NCS(no, nr, args...)				 \ | 25 | #define INTERNAL_SYSCALL_NCS(no, nr, args...)				 \ |
| 52 | ({									 \ | 26 | ({									 \ |
| ... | @@ -61,10 +35,8 @@ | ... | @@ -61,10 +35,8 @@ |
| 61 | _ret; }) | 35 | _ret; }) |
| 62 | 36 | ||
| 63 | #undef INTERNAL_SYSCALL | 37 | #undef INTERNAL_SYSCALL |
| 64 | #define INTERNAL_SYSCALL(name, nr, args...)				 \ | 38 | #define INTERNAL_SYSCALL(name, nr, args...)				\ |
| 65 | (((__NR_##name) < 256)						 \ | 39 | INTERNAL_SYSCALL_NCS(__NR_##name, nr, args) |
| 66 | ? INTERNAL_SYSCALL_DIRECT(name, nr, args)				 \ | ||
| 67 | : INTERNAL_SYSCALL_SVC0(name, nr, args)) | ||
| 68 | 40 | ||
| 69 | #define DECLARGS_0() | 41 | #define DECLARGS_0() |
| 70 | #define DECLARGS_1(arg1) \ | 42 | #define DECLARGS_1(arg1) \ |
| ... | @@ -93,9 +65,6 @@ | ... | @@ -93,9 +65,6 @@ |
| 93 | #define ASMFMT_5 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6) | 65 | #define ASMFMT_5 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6) |
| 94 | #define ASMFMT_6 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6), "d" (gpr7) | 66 | #define ASMFMT_6 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6), "d" (gpr7) |
| 95 | 67 | ||
| 96 | #define SINGLE_THREAD_BY_GLOBAL		1 | ||
| 97 | |||
| 98 | |||
| 99 | #define VDSO_NAME "LINUX_2.6.29" | 68 | #define VDSO_NAME "LINUX_2.6.29" |
| 100 | #define VDSO_HASH 123718585 | 69 | #define VDSO_HASH 123718585 |
| 101 | 70 | ||
| ... | @@ -110,4 +79,5 @@ | ... | @@ -110,4 +79,5 @@ |
| 110 | #define HAVE_GETTIMEOFDAY_VSYSCALL	"__kernel_gettimeofday" | 79 | #define HAVE_GETTIMEOFDAY_VSYSCALL	"__kernel_gettimeofday" |
| 111 | #define HAVE_GETCPU_VSYSCALL		"__kernel_getcpu" | 80 | #define HAVE_GETCPU_VSYSCALL		"__kernel_getcpu" |
| 112 | 81 | ||
| 82 | #define HAVE_CLONE3_WRAPPER		1 | ||
| 113 | #endif | 83 | #endif |
lib/libc/glibc/sysdeps/unix/sysv/linux/sh/kernel-features.h+1-8| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Set flags signalling availability of kernel features based on given | 1 | /* Set flags signalling availability of kernel features based on given |
| 2 | kernel version number. SH version. | 2 | kernel version number. SH version. |
| 3 | Copyright (C) 1999-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -23,16 +23,9 @@ | ... | @@ -23,16 +23,9 @@ |
| 23 | #include <endian.h> | 23 | #include <endian.h> |
| 24 | 24 | ||
| 25 | /* These syscalls were added for SH in 2.6.37. */ | 25 | /* These syscalls were added for SH in 2.6.37. */ |
| 26 | #define __ASSUME_SOCKET_SYSCALL		1 | ||
| 27 | #define __ASSUME_BIND_SYSCALL		1 | ||
| 28 | #define __ASSUME_CONNECT_SYSCALL	1 | 26 | #define __ASSUME_CONNECT_SYSCALL	1 |
| 29 | #define __ASSUME_LISTEN_SYSCALL		1 | ||
| 30 | #define __ASSUME_GETSOCKNAME_SYSCALL	1 | ||
| 31 | #define __ASSUME_GETPEERNAME_SYSCALL	1 | ||
| 32 | #define __ASSUME_SOCKETPAIR_SYSCALL	1 | ||
| 33 | #define __ASSUME_SEND_SYSCALL		1 | 27 | #define __ASSUME_SEND_SYSCALL		1 |
| 34 | #define __ASSUME_RECV_SYSCALL		1 | 28 | #define __ASSUME_RECV_SYSCALL		1 |
| 35 | #define __ASSUME_SHUTDOWN_SYSCALL	1 | ||
| 36 | 29 | ||
| 37 | #include_next <kernel-features.h> | 30 | #include_next <kernel-features.h> |
| 38 | 31 |
lib/libc/glibc/sysdeps/unix/sysv/linux/sh/sysdep.h+2-23| ... | @@ -1,7 +1,5 @@ | ... | @@ -1,7 +1,5 @@ |
| 1 | /* Copyright (C) 1992-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995. | ||
| 4 | Changed by Kaz Kojima, <kkojima@rr.iij4u.or.jp>. | ||
| 5 | 3 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| 7 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
| ... | @@ -43,7 +41,7 @@ | ... | @@ -43,7 +41,7 @@ |
| 43 | might return a large offset. Therefore we must not anymore test | 41 | might return a large offset. Therefore we must not anymore test |
| 44 | for < 0, but test for a real error by making sure the value in R0 | 42 | for < 0, but test for a real error by making sure the value in R0 |
| 45 | is a real error number. Linus said he will make sure the no syscall | 43 | is a real error number. Linus said he will make sure the no syscall |
| 46 | returns a value in -1 .. -4095 as a valid result so we can savely | 44 | returns a value in -1 .. -4095 as a valid result so we can safely |
| 47 | test with -4095. */ | 45 | test with -4095. */ |
| 48 | 46 | ||
| 49 | #define _IMM1 #-1 | 47 | #define _IMM1 #-1 |
| ... | @@ -317,23 +315,4 @@ | ... | @@ -317,23 +315,4 @@ |
| 317 | 315 | ||
| 318 | #endif	/* __ASSEMBLER__ */ | 316 | #endif	/* __ASSEMBLER__ */ |
| 319 | 317 | ||
| 320 | /* Pointer mangling support. */ | ||
| 321 | #if IS_IN (rtld) | ||
| 322 | /* We cannot use the thread descriptor because in ld.so we use setjmp | ||
| 323 | earlier than the descriptor is initialized. Using a global variable | ||
| 324 | is too complicated here since we have no PC-relative addressing mode. */ | ||
| 325 | #else | ||
| 326 | # ifdef __ASSEMBLER__ | ||
| 327 | # define PTR_MANGLE(reg, tmp) \ | ||
| 328 | stc gbr,tmp; mov.l @(POINTER_GUARD,tmp),tmp; xor tmp,reg | ||
| 329 | # define PTR_MANGLE2(reg, tmp)	xor tmp,reg | ||
| 330 | # define PTR_DEMANGLE(reg, tmp)	PTR_MANGLE (reg, tmp) | ||
| 331 | # define PTR_DEMANGLE2(reg, tmp)	PTR_MANGLE2 (reg, tmp) | ||
| 332 | # else | ||
| 333 | # define PTR_MANGLE(var) \ | ||
| 334 | (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) | ||
| 335 | # define PTR_DEMANGLE(var)	PTR_MANGLE (var) | ||
| 336 | # endif | ||
| 337 | #endif | ||
| 338 | |||
| 339 | #endif /* linux/sh/sysdep.h */ | 318 | #endif /* linux/sh/sysdep.h */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/single-thread.h+6-7| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Single thread optimization, Linux version. | 1 | /* Single thread optimization, Linux version. |
| 2 | Copyright (C) 2019-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2019-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -19,6 +19,10 @@ | ... | @@ -19,6 +19,10 @@ |
| 19 | #ifndef _SINGLE_THREAD_H | 19 | #ifndef _SINGLE_THREAD_H |
| 20 | #define _SINGLE_THREAD_H | 20 | #define _SINGLE_THREAD_H |
| 21 | 21 | ||
| 22 | #ifndef __ASSEMBLER__ | ||
| 23 | # include <sys/single_threaded.h> | ||
| 24 | #endif | ||
| 25 | |||
| 22 | /* The default way to check if the process is single thread is by using the | 26 | /* The default way to check if the process is single thread is by using the |
| 23 | pthread_t 'multiple_threads' field. However, for some architectures it is | 27 | pthread_t 'multiple_threads' field. However, for some architectures it is |
| 24 | faster to either use an extra field on TCB or global variables (the TCB | 28 | faster to either use an extra field on TCB or global variables (the TCB |
| ... | @@ -27,16 +31,11 @@ | ... | @@ -27,16 +31,11 @@ |
| 27 | The ABI might define SINGLE_THREAD_BY_GLOBAL to enable the single thread | 31 | The ABI might define SINGLE_THREAD_BY_GLOBAL to enable the single thread |
| 28 | check to use global variables instead of the pthread_t field. */ | 32 | check to use global variables instead of the pthread_t field. */ |
| 29 | 33 | ||
| 30 | #ifndef __ASSEMBLER__ | ||
| 31 | extern int __libc_multiple_threads; | ||
| 32 | libc_hidden_proto (__libc_multiple_threads) | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #if !defined SINGLE_THREAD_BY_GLOBAL || IS_IN (rtld) | 34 | #if !defined SINGLE_THREAD_BY_GLOBAL || IS_IN (rtld) |
| 36 | # define SINGLE_THREAD_P \ | 35 | # define SINGLE_THREAD_P \ |
| 37 | (THREAD_GETMEM (THREAD_SELF, header.multiple_threads) == 0) | 36 | (THREAD_GETMEM (THREAD_SELF, header.multiple_threads) == 0) |
| 38 | #else | 37 | #else |
| 39 | # define SINGLE_THREAD_P (__libc_multiple_threads == 0) | 38 | # define SINGLE_THREAD_P (__libc_single_threaded_internal != 0) |
| 40 | #endif | 39 | #endif |
| 41 | 40 | ||
| 42 | #define RTLD_SINGLE_THREAD_P SINGLE_THREAD_P | 41 | #define RTLD_SINGLE_THREAD_P SINGLE_THREAD_P |
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version. | 1 | /* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version. |
| 2 | Copyright (C) 2002-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/kernel-features.h+11-8| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Set flags signalling availability of kernel features based on given | 1 | /* Set flags signalling availability of kernel features based on given |
| 2 | kernel version number. SPARC version. | 2 | kernel version number. SPARC version. |
| 3 | Copyright (C) 1999-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -40,16 +40,19 @@ | ... | @@ -40,16 +40,19 @@ |
| 40 | # undef __ASSUME_SENDTO_SYSCALL | 40 | # undef __ASSUME_SENDTO_SYSCALL |
| 41 | # undef __ASSUME_GETSOCKOPT_SYSCALL | 41 | # undef __ASSUME_GETSOCKOPT_SYSCALL |
| 42 | # undef __ASSUME_SETSOCKOPT_SYSCALL | 42 | # undef __ASSUME_SETSOCKOPT_SYSCALL |
| 43 | #else | 43 | #endif |
| 44 | # define __ASSUME_SOCKET_SYSCALL 1 | 44 | |
| 45 | # define __ASSUME_SOCKETPAIR_SYSCALL 1 | 45 | /* There syscalls were added for 32-bit in compat syscall table only |
| 46 | # define __ASSUME_SHUTDOWN_SYSCALL 1 | 46 | in 4.20 (but present for 64-bit in all supported kernel versions). */ |
| 47 | #if !defined __arch64__ && __LINUX_KERNEL_VERSION < 0x041400 | ||
| 48 | # undef __ASSUME_GETSOCKNAME_SYSCALL | ||
| 49 | # undef __ASSUME_GETPEERNAME_SYSCALL | ||
| 47 | #endif | 50 | #endif |
| 48 | 51 | ||
| 49 | /* These syscalls were added for both 32-bit and 64-bit in 4.4. */ | 52 | /* These syscalls were added for both 32-bit and 64-bit in 4.4. */ |
| 50 | #if __LINUX_KERNEL_VERSION >= 0x040400 | 53 | #if __LINUX_KERNEL_VERSION < 0x040400 |
| 51 | # define __ASSUME_BIND_SYSCALL 1 | 54 | # undef __ASSUME_BIND_SYSCALL |
| 52 | # define __ASSUME_LISTEN_SYSCALL 1 | 55 | # undef __ASSUME_LISTEN_SYSCALL |
| 53 | #endif | 56 | #endif |
| 54 | 57 | ||
| 55 | #ifdef __arch64__ | 58 | #ifdef __arch64__ |
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h+1-22| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Copyright (C) 1997-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1997-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | Contributed by Miguel de Icaza <miguel@gnu.ai.mit.edu>, January 1997. | ||
| 4 | 3 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
| ... | @@ -126,24 +125,4 @@ ENTRY(name);					\ | ... | @@ -126,24 +125,4 @@ ENTRY(name);					\ |
| 126 | 125 | ||
| 127 | #endif	/* __ASSEMBLER__ */ | 126 | #endif	/* __ASSEMBLER__ */ |
| 128 | 127 | ||
| 129 | /* Pointer mangling support. */ | ||
| 130 | #if IS_IN (rtld) | ||
| 131 | /* We cannot use the thread descriptor because in ld.so we use setjmp | ||
| 132 | earlier than the descriptor is initialized. */ | ||
| 133 | #else | ||
| 134 | # ifdef __ASSEMBLER__ | ||
| 135 | # define PTR_MANGLE(dreg, reg, tmpreg) \ | ||
| 136 | ld	[%g7 + POINTER_GUARD], tmpreg; \ | ||
| 137 | xor	reg, tmpreg, dreg | ||
| 138 | # define PTR_DEMANGLE(dreg, reg, tmpreg) PTR_MANGLE (dreg, reg, tmpreg) | ||
| 139 | # define PTR_MANGLE2(dreg, reg, tmpreg) \ | ||
| 140 | xor	reg, tmpreg, dreg | ||
| 141 | # define PTR_DEMANGLE2(dreg, reg, tmpreg) PTR_MANGLE2 (dreg, reg, tmpreg) | ||
| 142 | # else | ||
| 143 | # define PTR_MANGLE(var) \ | ||
| 144 | (var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) | ||
| 145 | # define PTR_DEMANGLE(var) PTR_MANGLE (var) | ||
| 146 | # endif | ||
| 147 | #endif | ||
| 148 | |||
| 149 | #endif /* linux/sparc/sysdep.h */ | 128 | #endif /* linux/sparc/sysdep.h */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/kstat_cp.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Struct kernel_stat64 to stat64. Linux/SPARC version. | 1 | /* Struct kernel_stat64 to stat64. Linux/SPARC version. |
| 2 | Copyright (C) 2020-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h+1-22| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Copyright (C) 1997-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1997-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997. | ||
| 4 | 3 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
| ... | @@ -128,24 +127,4 @@ ENTRY(name);					\ | ... | @@ -128,24 +127,4 @@ ENTRY(name);					\ |
| 128 | register windows. So if you poke stack memory directly you add this. */ | 127 | register windows. So if you poke stack memory directly you add this. */ |
| 129 | #define STACK_BIAS	2047 | 128 | #define STACK_BIAS	2047 |
| 130 | 129 | ||
| 131 | /* Pointer mangling support. */ | ||
| 132 | #if IS_IN (rtld) | ||
| 133 | /* We cannot use the thread descriptor because in ld.so we use setjmp | ||
| 134 | earlier than the descriptor is initialized. */ | ||
| 135 | #else | ||
| 136 | # ifdef __ASSEMBLER__ | ||
| 137 | # define PTR_MANGLE(dreg, reg, tmpreg) \ | ||
| 138 | ldx	[%g7 + POINTER_GUARD], tmpreg; \ | ||
| 139 | xor	reg, tmpreg, dreg | ||
| 140 | # define PTR_DEMANGLE(dreg, reg, tmpreg) PTR_MANGLE (dreg, reg, tmpreg) | ||
| 141 | # define PTR_MANGLE2(dreg, reg, tmpreg) \ | ||
| 142 | xor	reg, tmpreg, dreg | ||
| 143 | # define PTR_DEMANGLE2(dreg, reg, tmpreg) PTR_MANGLE2 (dreg, reg, tmpreg) | ||
| 144 | # else | ||
| 145 | # define PTR_MANGLE(var) \ | ||
| 146 | (var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) | ||
| 147 | # define PTR_DEMANGLE(var) PTR_MANGLE (var) | ||
| 148 | # endif | ||
| 149 | #endif | ||
| 150 | |||
| 151 | #endif /* linux/sparc64/sysdep.h */ | 130 | #endif /* linux/sparc64/sysdep.h */ |
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sysdep.h+1-2| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | /* Copyright (C) 2000-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2000-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | Contributed by Jakub Jelinek <jakub@redhat.com>, 2000. | ||
| 4 | 3 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
lib/libc/glibc/sysdeps/unix/sysv/linux/stat.c+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Get file status. Linux version. | 1 | /* Get file status. Linux version. |
| 2 | Copyright (C) 2020-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/stat64.c+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Get file status. Linux version. | 1 | /* Get file status. Linux version. |
| 2 | Copyright (C) 2020-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/stat_t64_cp.c+1-20| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Struct stat/stat64 to stat/stat64 conversion for Linux. | 1 | /* Struct stat/stat64 to stat/stat64 conversion for Linux. |
| 2 | Copyright (C) 2020-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -22,25 +22,6 @@ | ... | @@ -22,25 +22,6 @@ |
| 22 | #include <time.h> | 22 | #include <time.h> |
| 23 | 23 | ||
| 24 | #if __TIMESIZE != 64 | 24 | #if __TIMESIZE != 64 |
| 25 | |||
| 26 | static inline bool | ||
| 27 | in_time_t_range (__time64_t t) | ||
| 28 | { | ||
| 29 | time_t s = t; | ||
| 30 | return s == t; | ||
| 31 | } | ||
| 32 | |||
| 33 | static inline struct timespec | ||
| 34 | valid_timespec64_to_timespec (const struct __timespec64 ts64) | ||
| 35 | { | ||
| 36 | struct timespec ts; | ||
| 37 | |||
| 38 | ts.tv_sec = (time_t) ts64.tv_sec; | ||
| 39 | ts.tv_nsec = ts64.tv_nsec; | ||
| 40 | |||
| 41 | return ts; | ||
| 42 | } | ||
| 43 | |||
| 44 | int | 25 | int |
| 45 | __cp_stat64_t64_stat64 (const struct __stat64_t64 *st64_t64, | 26 | __cp_stat64_t64_stat64 (const struct __stat64_t64 *st64_t64, |
| 46 | 			struct stat64 *st64) | 27 | 			struct stat64 *st64) |
lib/libc/glibc/sysdeps/unix/sysv/linux/stat_t64_cp.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Copy to/from struct stat with and without 64-bit time_t support. | 1 | /* Copy to/from struct stat with and without 64-bit time_t support. |
| 2 | Copyright (C) 2020-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/struct_stat_time64.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Struct stat with 64-bit time support. | 1 | /* Struct stat with 64-bit time support. |
| 2 | Copyright (C) 2020-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/sys/syscall.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1995-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/sys/timex.h+9-9| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1995-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1995-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -55,26 +55,26 @@ struct ntptimeval | ... | @@ -55,26 +55,26 @@ struct ntptimeval |
| 55 | __BEGIN_DECLS | 55 | __BEGIN_DECLS |
| 56 | 56 | ||
| 57 | #ifndef __USE_TIME_BITS64 | 57 | #ifndef __USE_TIME_BITS64 |
| 58 | extern int adjtimex (struct timex *__ntx) __THROW; | 58 | extern int adjtimex (struct timex *__ntx) __THROW __nonnull ((1)); |
| 59 | extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW; | 59 | extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW __nonnull ((1)); |
| 60 | 60 | ||
| 61 | # ifdef __REDIRECT_NTH | 61 | # ifdef __REDIRECT_NTH |
| 62 | extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv), | 62 | extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv), |
| 63 | ntp_gettimex); | 63 | ntp_gettimex) __nonnull ((1)); |
| 64 | # else | 64 | # else |
| 65 | # define ntp_gettime ntp_gettimex | 65 | # define ntp_gettime ntp_gettimex |
| 66 | # endif | 66 | # endif |
| 67 | extern int ntp_adjtime (struct timex *__tntx) __THROW; | 67 | extern int ntp_adjtime (struct timex *__tntx) __THROW __nonnull ((1)); |
| 68 | #else | 68 | #else |
| 69 | # ifdef __REDIRECT_NTH | 69 | # ifdef __REDIRECT_NTH |
| 70 | extern int __REDIRECT_NTH (adjtimex, (struct timex *__ntx), | 70 | extern int __REDIRECT_NTH (adjtimex, (struct timex *__ntx), |
| 71 | ___adjtimex64); | 71 | ___adjtimex64) __nonnull ((1)); |
| 72 | extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv), | 72 | extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv), |
| 73 | __ntp_gettime64); | 73 | __ntp_gettime64) __nonnull ((1)); |
| 74 | extern int __REDIRECT_NTH (ntp_gettimex, (struct ntptimeval *__ntv), | 74 | extern int __REDIRECT_NTH (ntp_gettimex, (struct ntptimeval *__ntv), |
| 75 | __ntp_gettimex64); | 75 | __ntp_gettimex64) __nonnull ((1)); |
| 76 | extern int __REDIRECT_NTH (ntp_adjtime, (struct timex *__ntx), | 76 | extern int __REDIRECT_NTH (ntp_adjtime, (struct timex *__ntx), |
| 77 | ___adjtimex64); | 77 | ___adjtimex64) __nonnull ((1)); |
| 78 | # else | 78 | # else |
| 79 | # define adjtimex ___adjtimex64 | 79 | # define adjtimex ___adjtimex64 |
| 80 | # define ntp_adjtime ___adjtimex64 | 80 | # define ntp_adjtime ___adjtimex64 |
lib/libc/glibc/sysdeps/unix/sysv/linux/sysdep.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2015-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2015-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. | 1 | /* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. |
| 2 | Copyright (C) 2012-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/x86/sys/elf.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1998-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1998-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/kernel-features.h+1-1| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* Set flags signalling availability of kernel features based on given | 1 | /* Set flags signalling availability of kernel features based on given |
| 2 | kernel version number. x86-64 version. | 2 | kernel version number. x86-64 version. |
| 3 | Copyright (C) 1999-2021 Free Software Foundation, Inc. | 3 | Copyright (C) 1999-2023 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/sysdep.h+2-44| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2001-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2001-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -43,7 +43,7 @@ | ... | @@ -43,7 +43,7 @@ |
| 43 | might return a large offset.	 Therefore we must not anymore test | 43 | might return a large offset.	 Therefore we must not anymore test |
| 44 | for < 0, but test for a real error by making sure the value in %eax | 44 | for < 0, but test for a real error by making sure the value in %eax |
| 45 | is a real error number. Linus said he will make sure the no syscall | 45 | is a real error number. Linus said he will make sure the no syscall |
| 46 | returns a value in -1 .. -4095 as a valid result so we can savely | 46 | returns a value in -1 .. -4095 as a valid result so we can safely |
| 47 | test with -4095. */ | 47 | test with -4095. */ |
| 48 | 48 | ||
| 49 | /* We don't want the label for the error handle to be global when we define | 49 | /* We don't want the label for the error handle to be global when we define |
| ... | @@ -379,50 +379,8 @@ | ... | @@ -379,50 +379,8 @@ |
| 379 | 379 | ||
| 380 | # define HAVE_CLONE3_WRAPPER			1 | 380 | # define HAVE_CLONE3_WRAPPER			1 |
| 381 | 381 | ||
| 382 | # define SINGLE_THREAD_BY_GLOBAL		1 | ||
| 383 | |||
| 384 | #endif	/* __ASSEMBLER__ */ | 382 | #endif	/* __ASSEMBLER__ */ |
| 385 | 383 | ||
| 386 | |||
| 387 | /* Pointer mangling support. */ | ||
| 388 | #if IS_IN (rtld) | ||
| 389 | /* We cannot use the thread descriptor because in ld.so we use setjmp | ||
| 390 | earlier than the descriptor is initialized. */ | ||
| 391 | # ifdef __ASSEMBLER__ | ||
| 392 | # define PTR_MANGLE(reg)	xor __pointer_chk_guard_local(%rip), reg; \ | ||
| 393 | 				rol $2*LP_SIZE+1, reg | ||
| 394 | # define PTR_DEMANGLE(reg)	ror $2*LP_SIZE+1, reg;			 \ | ||
| 395 | 				xor __pointer_chk_guard_local(%rip), reg | ||
| 396 | # else | ||
| 397 | # define PTR_MANGLE(reg)	asm ("xor __pointer_chk_guard_local(%%rip), %0\n" \ | ||
| 398 | 				 "rol $2*" LP_SIZE "+1, %0"			 \ | ||
| 399 | 				 : "=r" (reg) : "0" (reg)) | ||
| 400 | # define PTR_DEMANGLE(reg)	asm ("ror $2*" LP_SIZE "+1, %0\n"		 \ | ||
| 401 | 				 "xor __pointer_chk_guard_local(%%rip), %0" \ | ||
| 402 | 				 : "=r" (reg) : "0" (reg)) | ||
| 403 | # endif | ||
| 404 | #else | ||
| 405 | # ifdef __ASSEMBLER__ | ||
| 406 | # define PTR_MANGLE(reg)	xor %fs:POINTER_GUARD, reg;		 \ | ||
| 407 | 				rol $2*LP_SIZE+1, reg | ||
| 408 | # define PTR_DEMANGLE(reg)	ror $2*LP_SIZE+1, reg;			 \ | ||
| 409 | 				xor %fs:POINTER_GUARD, reg | ||
| 410 | # else | ||
| 411 | # define PTR_MANGLE(var)	asm ("xor %%fs:%c2, %0\n"		 \ | ||
| 412 | 				 "rol $2*" LP_SIZE "+1, %0"		 \ | ||
| 413 | 				 : "=r" (var)			 \ | ||
| 414 | 				 : "0" (var),			 \ | ||
| 415 | 				 "i" (offsetof (tcbhead_t,	 \ | ||
| 416 | 						 pointer_guard))) | ||
| 417 | # define PTR_DEMANGLE(var)	asm ("ror $2*" LP_SIZE "+1, %0\n"	 \ | ||
| 418 | 				 "xor %%fs:%c2, %0"			 \ | ||
| 419 | 				 : "=r" (var)			 \ | ||
| 420 | 				 : "0" (var),			 \ | ||
| 421 | 				 "i" (offsetof (tcbhead_t,	 \ | ||
| 422 | 						 pointer_guard))) | ||
| 423 | # endif | ||
| 424 | #endif | ||
| 425 | |||
| 426 | /* How to pass the off{64}_t argument on p{readv,writev}{64}. */ | 384 | /* How to pass the off{64}_t argument on p{readv,writev}{64}. */ |
| 427 | #undef LO_HI_LONG | 385 | #undef LO_HI_LONG |
| 428 | #define LO_HI_LONG(val) (val), 0 | 386 | #define LO_HI_LONG(val) (val), 0 |
lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2012-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2012-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/unix/sysv/linux/xstatver.h+4-7| ... | @@ -1,13 +1,10 @@ | ... | @@ -1,13 +1,10 @@ |
| 1 | /* Versions of the 'struct stat' data structure used in compatibility xstat | 1 | /* Versions of the 'struct stat' data structure used in compatibility xstat |
| 2 | functions. */ | 2 | functions. */ |
| 3 | #define _STAT_VER_LINUX_OLD	1 | 3 | #define _STAT_VER_KERNEL	0 |
| 4 | #define _STAT_VER_KERNEL	1 | 4 | #define _STAT_VER_LINUX		0 |
| 5 | #define _STAT_VER_SVR4		2 | 5 | #define _STAT_VER		_STAT_VER_KERNEL |
| 6 | #define _STAT_VER_LINUX		3 | ||
| 7 | #define _STAT_VER		_STAT_VER_LINUX | ||
| 8 | 6 | ||
| 9 | /* Versions of the 'xmknod' interface used in compatibility xmknod | 7 | /* Versions of the 'xmknod' interface used in compatibility xmknod |
| 10 | functions. */ | 8 | functions. */ |
| 11 | #define _MKNOD_VER_LINUX	1 | 9 | #define _MKNOD_VER_LINUX	0 |
| 12 | #define _MKNOD_VER_SVR4		2 | ||
| 13 | #define _MKNOD_VER		_MKNOD_VER_LINUX | 10 | #define _MKNOD_VER		_MKNOD_VER_LINUX |
lib/libc/glibc/sysdeps/unix/x86_64/sysdep.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 1991-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1991-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/wordsize-32/divdi3-symbol-hacks.h+3-2| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Hacks needed for divdi3 symbol manipulation. | 1 | /* Hacks needed for divdi3 symbol manipulation. |
| 2 | Copyright (C) 2004-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2004-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -23,7 +23,8 @@ | ... | @@ -23,7 +23,8 @@ |
| 23 | assembler. | 23 | assembler. |
| 24 | Note: in_divdi3_c is only used to avoid symbol alias on divdi3 | 24 | Note: in_divdi3_c is only used to avoid symbol alias on divdi3 |
| 25 | build itself. */ | 25 | build itself. */ |
| 26 | #if !defined __ASSEMBLER__ && !defined in_divdi3_c && IS_IN (libc) && defined SHARED | 26 | #if !defined __ASSEMBLER__ && !defined in_divdi3_c && IS_IN (libc) \ |
| 27 | && defined SHARED && !defined LIBC_NONSHARED | ||
| 27 | asm ("__divdi3 = __divdi3_internal"); | 28 | asm ("__divdi3 = __divdi3_internal"); |
| 28 | asm ("__udivdi3 = __udivdi3_internal"); | 29 | asm ("__udivdi3 = __udivdi3_internal"); |
| 29 | asm ("__moddi3 = __moddi3_internal"); | 30 | asm ("__moddi3 = __moddi3_internal"); |
lib/libc/glibc/sysdeps/x86/nptl/bits/pthreadtypes-arch.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* Copyright (C) 2002-2021 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2002-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/x86/sysdep.h+8-4| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembler macros for x86. | 1 | /* Assembler macros for x86. |
| 2 | Copyright (C) 2017-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -78,15 +78,18 @@ enum cf_protection_level | ... | @@ -78,15 +78,18 @@ enum cf_protection_level |
| 78 | #define ASM_SIZE_DIRECTIVE(name) .size name,.-name; | 78 | #define ASM_SIZE_DIRECTIVE(name) .size name,.-name; |
| 79 | 79 | ||
| 80 | /* Define an entry point visible from C. */ | 80 | /* Define an entry point visible from C. */ |
| 81 | #define	ENTRY(name)							 \ | 81 | #define	ENTRY_P2ALIGN(name, alignment)					 \ |
| 82 | .globl C_SYMBOL_NAME(name);						 \ | 82 | .globl C_SYMBOL_NAME(name);						 \ |
| 83 | .type C_SYMBOL_NAME(name),@function;					 \ | 83 | .type C_SYMBOL_NAME(name),@function;					 \ |
| 84 | .align ALIGNARG(4);							 \ | 84 | .align ALIGNARG(alignment);						 \ |
| 85 | C_LABEL(name)								 \ | 85 | C_LABEL(name)								 \ |
| 86 | cfi_startproc;							 \ | 86 | cfi_startproc;							 \ |
| 87 | _CET_ENDBR;								 \ | 87 | _CET_ENDBR;								 \ |
| 88 | CALL_MCOUNT | 88 | CALL_MCOUNT |
| 89 | 89 | ||
| 90 | /* Common entry 16 byte aligns. */ | ||
| 91 | #define ENTRY(name) ENTRY_P2ALIGN (name, 4) | ||
| 92 | |||
| 90 | #undef	END | 93 | #undef	END |
| 91 | #define END(name)							 \ | 94 | #define END(name)							 \ |
| 92 | cfi_endproc;								 \ | 95 | cfi_endproc;								 \ |
| ... | @@ -108,7 +111,8 @@ enum cf_protection_level | ... | @@ -108,7 +111,8 @@ enum cf_protection_level |
| 108 | /* Local label name for asm code. */ | 111 | /* Local label name for asm code. */ |
| 109 | #ifndef L | 112 | #ifndef L |
| 110 | /* ELF-like local names start with `.L'. */ | 113 | /* ELF-like local names start with `.L'. */ |
| 111 | # define L(name)	.L##name | 114 | # define LOCAL_LABEL(name) .L##name |
| 115 | # define L(name)	LOCAL_LABEL(name) | ||
| 112 | #endif | 116 | #endif |
| 113 | 117 | ||
| 114 | #define atom_text_section .section ".text.atom", "ax" | 118 | #define atom_text_section .section ".text.atom", "ax" |
lib/libc/glibc/sysdeps/x86_64/crti.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for x86-64. | 1 | /* Special .init and .fini section support for x86-64. |
| 2 | Copyright (C) 2012-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/x86_64/crtn.S+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Special .init and .fini section support for x86-64. | 1 | /* Special .init and .fini section support for x86-64. |
| 2 | Copyright (C) 2012-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
lib/libc/glibc/sysdeps/x86_64/start.S+1-2| ... | @@ -1,7 +1,6 @@ | ... | @@ -1,7 +1,6 @@ |
| 1 | /* Startup code compliant to the ELF x86-64 ABI. | 1 | /* Startup code compliant to the ELF x86-64 ABI. |
| 2 | Copyright (C) 2001-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2001-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Andreas Jaeger <aj@suse.de>, 2001. | ||
| 5 | 4 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 7 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
lib/libc/glibc/sysdeps/x86_64/sysdep.h+23-10| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembler macros for x86-64. | 1 | /* Assembler macros for x86-64. |
| 2 | Copyright (C) 2001-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2001-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -20,6 +20,7 @@ | ... | @@ -20,6 +20,7 @@ |
| 20 | #define _X86_64_SYSDEP_H 1 | 20 | #define _X86_64_SYSDEP_H 1 |
| 21 | 21 | ||
| 22 | #include <sysdeps/x86/sysdep.h> | 22 | #include <sysdeps/x86/sysdep.h> |
| 23 | #include <x86-lp_size.h> | ||
| 23 | 24 | ||
| 24 | #ifdef	__ASSEMBLER__ | 25 | #ifdef	__ASSEMBLER__ |
| 25 | 26 | ||
| ... | @@ -68,9 +69,6 @@ lose:									 \ | ... | @@ -68,9 +69,6 @@ lose:									 \ |
| 68 | # define JUMPTARGET(name)	name | 69 | # define JUMPTARGET(name)	name |
| 69 | #endif | 70 | #endif |
| 70 | 71 | ||
| 71 | /* Long and pointer size in bytes. */ | ||
| 72 | #define LP_SIZE	8 | ||
| 73 | |||
| 74 | /* Instruction to operate on long and pointer. */ | 72 | /* Instruction to operate on long and pointer. */ |
| 75 | #define LP_OP(insn) insn##q | 73 | #define LP_OP(insn) insn##q |
| 76 | 74 | ||
| ... | @@ -99,13 +97,31 @@ lose:									 \ | ... | @@ -99,13 +97,31 @@ lose:									 \ |
| 99 | to avoid RTM abort triggered by VZEROUPPER inside transactionally. */ | 97 | to avoid RTM abort triggered by VZEROUPPER inside transactionally. */ |
| 100 | #define ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST \ | 98 | #define ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST \ |
| 101 | 	xtest;							\ | 99 | 	xtest;							\ |
| 102 | 	jz	1f;						\ | 100 | 	jnz	1f;						\ |
| 103 | 	vzeroall;						\ | 101 | 	vzeroupper;						\ |
| 104 | 	ret;							\ | 102 | 	ret;							\ |
| 105 | 1:								\ | 103 | 1:								\ |
| 106 | 	vzeroupper;						\ | 104 | 	vzeroall;						\ |
| 107 | 	ret | 105 | 	ret |
| 108 | 106 | ||
| 107 | /* Can be used to replace vzeroupper that is not directly before a | ||
| 108 | return. This is useful when hoisting a vzeroupper from multiple | ||
| 109 | return paths to decrease the total number of vzerouppers and code | ||
| 110 | size. */ | ||
| 111 | #define COND_VZEROUPPER_XTEST							\ | ||
| 112 | xtest;							\ | ||
| 113 | jz 1f;							\ | ||
| 114 | vzeroall;							\ | ||
| 115 | jmp 2f;							\ | ||
| 116 | 1:							\ | ||
| 117 | vzeroupper;							\ | ||
| 118 | 2: | ||
| 119 | |||
| 120 | /* In RTM define this as COND_VZEROUPPER_XTEST. */ | ||
| 121 | #ifndef COND_VZEROUPPER | ||
| 122 | # define COND_VZEROUPPER vzeroupper | ||
| 123 | #endif | ||
| 124 | |||
| 109 | /* Zero upper vector registers and return. */ | 125 | /* Zero upper vector registers and return. */ |
| 110 | #ifndef ZERO_UPPER_VEC_REGISTERS_RETURN | 126 | #ifndef ZERO_UPPER_VEC_REGISTERS_RETURN |
| 111 | # define ZERO_UPPER_VEC_REGISTERS_RETURN \ | 127 | # define ZERO_UPPER_VEC_REGISTERS_RETURN \ |
| ... | @@ -119,9 +135,6 @@ lose:									 \ | ... | @@ -119,9 +135,6 @@ lose:									 \ |
| 119 | 135 | ||
| 120 | #else	/* __ASSEMBLER__ */ | 136 | #else	/* __ASSEMBLER__ */ |
| 121 | 137 | ||
| 122 | /* Long and pointer size in bytes. */ | ||
| 123 | #define LP_SIZE "8" | ||
| 124 | |||
| 125 | /* Instruction to operate on long and pointer. */ | 138 | /* Instruction to operate on long and pointer. */ |
| 126 | #define LP_OP(insn) #insn "q" | 139 | #define LP_OP(insn) #insn "q" |
| 127 | 140 |
lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h+2-6| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* Assembler macros for x32. | 1 | /* Assembler macros for x32. |
| 2 | Copyright (C) 2012-2021 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2023 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| ... | @@ -17,8 +17,8 @@ | ... | @@ -17,8 +17,8 @@ |
| 17 | <https://www.gnu.org/licenses/>. */ | 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | #include <sysdeps/x86_64/sysdep.h> | 19 | #include <sysdeps/x86_64/sysdep.h> |
| 20 | #include <x86-lp_size.h> | ||
| 20 | 21 | ||
| 21 | #undef LP_SIZE | ||
| 22 | #undef LP_OP | 22 | #undef LP_OP |
| 23 | #undef ASM_ADDR | 23 | #undef ASM_ADDR |
| 24 | 24 | ||
| ... | @@ -41,8 +41,6 @@ | ... | @@ -41,8 +41,6 @@ |
| 41 | 41 | ||
| 42 | #ifdef	__ASSEMBLER__ | 42 | #ifdef	__ASSEMBLER__ |
| 43 | 43 | ||
| 44 | # define LP_SIZE 4 | ||
| 45 | |||
| 46 | # define LP_OP(insn) insn##l | 44 | # define LP_OP(insn) insn##l |
| 47 | 45 | ||
| 48 | # define ASM_ADDR .long | 46 | # define ASM_ADDR .long |
| ... | @@ -66,8 +64,6 @@ | ... | @@ -66,8 +64,6 @@ |
| 66 | 64 | ||
| 67 | #else	/* __ASSEMBLER__ */ | 65 | #else	/* __ASSEMBLER__ */ |
| 68 | 66 | ||
| 69 | # define LP_SIZE "4" | ||
| 70 | |||
| 71 | # define LP_OP(insn) #insn "l" | 67 | # define LP_OP(insn) #insn "l" |
| 72 | 68 | ||
| 73 | # define ASM_ADDR ".long" | 69 | # define ASM_ADDR ".long" |