diff --git a/SOURCES/glibc-RHEL-49490-1.patch b/SOURCES/glibc-RHEL-49490-1.patch new file mode 100644 index 0000000..3f2d6d8 --- /dev/null +++ b/SOURCES/glibc-RHEL-49490-1.patch @@ -0,0 +1,51 @@ +commit 9b7651410375ec8848a1944992d663d514db4ba7 +Author: Stefan Liebler +Date: Thu Jul 11 11:28:53 2024 +0200 + + s390x: Fix segfault in wcsncmp [BZ #31934] + + The z13/vector-optimized wcsncmp implementation segfaults if n=1 + and there is only one character (equal on both strings) before + the page end. Then it loads and compares one character and misses + to check n again. The following load fails. + + This patch removes the extra load and compare of the first character + and just start with the loop which uses vector-load-to-block-boundary. + This code-path also checks n. + + With this patch both tests are passing: + - the simplified one mentioned in the bugzilla 31934 + - the full one in Florian Weimer's patch: + "manual: Document a GNU extension for strncmp/wcsncmp" + (https://patchwork.sourceware.org/project/glibc/patch/874j9eml6y.fsf@oldenburg.str.redhat.com/): + On s390x-linux-gnu (z16), the new wcsncmp test fails due to bug 31934. + Reviewed-by: Carlos O'Donell + +diff --git a/sysdeps/s390/wcsncmp-vx.S b/sysdeps/s390/wcsncmp-vx.S +index bf6dfa6bc2..8b081567a2 100644 +--- a/sysdeps/s390/wcsncmp-vx.S ++++ b/sysdeps/s390/wcsncmp-vx.S +@@ -59,14 +59,7 @@ ENTRY(WCSNCMP_Z13) + sllg %r4,%r4,2 /* Convert character-count to byte-count. */ + locgrne %r4,%r1 /* Use max byte-count, if bit 0/1 was one. */ + +- /* Check first character without vector load. */ +- lghi %r5,4 /* current_len = 4 bytes. */ +- /* Check s1/2[0]. */ +- lt %r0,0(%r2) +- l %r1,0(%r3) +- je .Lend_cmp_one_char +- crjne %r0,%r1,.Lend_cmp_one_char +- ++ lghi %r5,0 /* current_len = 0 bytes. */ + .Lloop: + vlbb %v17,0(%r5,%r3),6 /* Load s2 to block boundary. */ + vlbb %v16,0(%r5,%r2),6 /* Load s1 to block boundary. */ +@@ -167,7 +160,6 @@ ENTRY(WCSNCMP_Z13) + srl %r4,2 /* And convert it to character-index. */ + vlgvf %r0,%v16,0(%r4) /* Load character-values. */ + vlgvf %r1,%v17,0(%r4) +-.Lend_cmp_one_char: + cr %r0,%r1 + je .Lend_equal + lghi %r2,1 diff --git a/SOURCES/glibc-RHEL-49490-2.patch b/SOURCES/glibc-RHEL-49490-2.patch new file mode 100644 index 0000000..d83e1c5 --- /dev/null +++ b/SOURCES/glibc-RHEL-49490-2.patch @@ -0,0 +1,248 @@ +commit 54252394c25ddf0062e288d4a6ab7a885f8ae009 +Author: Florian Weimer +Date: Thu Jun 27 16:26:56 2024 +0200 + + Enhanced test coverage for strncmp, wcsncmp + + Add string/test-strncmp-nonarray and + wcsmbs/test-wcsncmp-nonarray. + + This is the test that uncovered bug 31934. Test run time + is more than one minute on a fairly current system, so turn + these into xtests that do not run automatically. + + Reviewed-by: Noah Goldstein + +diff -Nrup a/string/Makefile b/string/Makefile +--- a/string/Makefile 2024-09-17 14:28:06.030433788 -0400 ++++ b/string/Makefile 2024-09-17 14:33:56.846338606 -0400 +@@ -62,7 +62,11 @@ tests := tester inl-tester noinl-tester + test-endian-sign-conversion + + # This test allocates a lot of memory and can run for a long time. +-xtests = tst-strcoll-overflow ++xtests += tst-strcoll-overflow ++ ++# This test runs for a long time. ++xtests += test-strncmp-nonarray ++ + + # This test needs libdl. + ifeq (yes,$(build-shared)) +diff -Nrup a/string/test-Xncmp-nonarray.c b/string/test-Xncmp-nonarray.c +--- a/string/test-Xncmp-nonarray.c 1969-12-31 19:00:00.000000000 -0500 ++++ b/string/test-Xncmp-nonarray.c 2024-09-17 14:27:27.538224809 -0400 +@@ -0,0 +1,183 @@ ++/* Test non-array inputs to string comparison functions. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* This skeleton file is included from string/test-strncmp-nonarray.c and ++ wcsmbs/test-wcsncmp-nonarray.c to test that reading of the arrays stops ++ at the first null character. ++ ++ TEST_IDENTIFIER must be the test function identifier. TEST_NAME is ++ the same as a string. ++ ++ CHAR must be defined as the character type. */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* Much shorter than test-Xnlen-nonarray.c because of deeply nested loops. */ ++enum { buffer_length = 80 }; ++ ++/* The test buffer layout follows what is described test-Xnlen-nonarray.c, ++ except that there two buffers, left and right. The variables ++ a_count, zero_count, start_offset are all duplicated. */ ++ ++/* Return the maximum string length for a string that starts at ++ start_offset. */ ++static int ++string_length (int a_count, int start_offset) ++{ ++ if (start_offset == buffer_length || start_offset >= a_count) ++ return 0; ++ else ++ return a_count - start_offset; ++} ++ ++/* This is the valid maximum length argument computation for ++ strnlen/wcsnlen. See text-Xnlen-nonarray.c. */ ++static int ++maximum_length (int start_offset, int zero_count) ++{ ++ if (start_offset == buffer_length) ++ return 0; ++ else if (zero_count > 0) ++ /* Effectively unbounded, but we need to stop fairly low, ++ otherwise testing takes too long. */ ++ return buffer_length + 32; ++ else ++ return buffer_length - start_offset; ++} ++ ++typedef __typeof (TEST_IDENTIFIER) *proto_t; ++ ++#define TEST_MAIN ++#include "test-string.h" ++ ++IMPL (TEST_IDENTIFIER, 1) ++ ++static int ++test_main (void) ++{ ++ TEST_VERIFY_EXIT (sysconf (_SC_PAGESIZE) >= buffer_length); ++ test_init (); ++ ++ struct support_next_to_fault left_ntf ++ = support_next_to_fault_allocate (buffer_length * sizeof (CHAR)); ++ CHAR *left_buffer = (CHAR *) left_ntf.buffer; ++ struct support_next_to_fault right_ntf ++ = support_next_to_fault_allocate (buffer_length * sizeof (CHAR)); ++ CHAR *right_buffer = (CHAR *) right_ntf.buffer; ++ ++ FOR_EACH_IMPL (impl, 0) ++ { ++ printf ("info: testing %s\n", impl->name); ++ for (size_t i = 0; i < buffer_length; ++i) ++ left_buffer[i] = 'A'; ++ ++ for (int left_zero_count = 0; left_zero_count <= buffer_length; ++ ++left_zero_count) ++ { ++ if (left_zero_count > 0) ++ left_buffer[buffer_length - left_zero_count] = 0; ++ int left_a_count = buffer_length - left_zero_count; ++ for (size_t i = 0; i < buffer_length; ++i) ++ right_buffer[i] = 'A'; ++ for (int right_zero_count = 0; right_zero_count <= buffer_length; ++ ++right_zero_count) ++ { ++ if (right_zero_count > 0) ++ right_buffer[buffer_length - right_zero_count] = 0; ++ int right_a_count = buffer_length - right_zero_count; ++ for (int left_start_offset = 0; ++ left_start_offset <= buffer_length; ++ ++left_start_offset) ++ { ++ CHAR *left_start_pointer = left_buffer + left_start_offset; ++ int left_maxlen ++ = maximum_length (left_start_offset, left_zero_count); ++ int left_length ++ = string_length (left_a_count, left_start_offset); ++ for (int right_start_offset = 0; ++ right_start_offset <= buffer_length; ++ ++right_start_offset) ++ { ++ CHAR *right_start_pointer ++ = right_buffer + right_start_offset; ++ int right_maxlen ++ = maximum_length (right_start_offset, right_zero_count); ++ int right_length ++ = string_length (right_a_count, right_start_offset); ++ ++ /* Maximum length is modelled after strnlen/wcsnlen, ++ and must be valid for both pointer arguments at ++ the same time. */ ++ int maxlen = MIN (left_maxlen, right_maxlen); ++ ++ for (int length_argument = 0; length_argument <= maxlen; ++ ++length_argument) ++ { ++ if (test_verbose) ++ { ++ printf ("left: zero_count=%d" ++ " a_count=%d start_offset=%d\n", ++ left_zero_count, left_a_count, ++ left_start_offset); ++ printf ("right: zero_count=%d" ++ " a_count=%d start_offset=%d\n", ++ right_zero_count, right_a_count, ++ right_start_offset); ++ printf ("length argument: %d\n", ++ length_argument); ++ } ++ ++ /* Effective lengths bounded by length argument. ++ The effective length determines the ++ outcome of the comparison. */ ++ int left_effective ++ = MIN (left_length, length_argument); ++ int right_effective ++ = MIN (right_length, length_argument); ++ if (left_effective == right_effective) ++ TEST_COMPARE (CALL (impl, ++ left_start_pointer, ++ right_start_pointer, ++ length_argument), 0); ++ else if (left_effective < right_effective) ++ TEST_COMPARE (CALL (impl, ++ left_start_pointer, ++ right_start_pointer, ++ length_argument) < 0, 1); ++ else ++ TEST_COMPARE (CALL (impl, ++ left_start_pointer, ++ right_start_pointer, ++ length_argument) > 0, 1); ++ } ++ } ++ } ++ } ++ } ++ } ++ ++ return 0; ++} ++ ++#include +diff -Nrup a/string/test-strncmp-nonarray.c b/string/test-strncmp-nonarray.c +--- a/string/test-strncmp-nonarray.c 1969-12-31 19:00:00.000000000 -0500 ++++ b/string/test-strncmp-nonarray.c 2024-09-17 14:27:27.538224809 -0400 +@@ -0,0 +1,4 @@ ++#define TEST_IDENTIFIER strncmp ++#define TEST_NAME "strncmp" ++typedef char CHAR; ++#include "test-Xncmp-nonarray.c" +diff -Nrup a/wcsmbs/Makefile b/wcsmbs/Makefile +--- a/wcsmbs/Makefile 2018-08-01 01:10:47.000000000 -0400 ++++ b/wcsmbs/Makefile 2024-09-17 14:31:04.725404041 -0400 +@@ -53,6 +53,9 @@ tests := tst-wcstof wcsmbs-tst1 tst-wcsn + tst-wcstod-round test-char-types tst-fgetwc-after-eof \ + tst-wcstod-nan-sign $(addprefix test-,$(strop-tests)) + ++# This test runs for a long time. ++xtests += test-wcsncmp-nonarray ++ + include ../Rules + + ifeq ($(run-built-tests),yes) +diff -Nrup a/wcsmbs/test-wcsncmp-nonarray.c b/wcsmbs/test-wcsncmp-nonarray.c +--- a/wcsmbs/test-wcsncmp-nonarray.c 1969-12-31 19:00:00.000000000 -0500 ++++ b/wcsmbs/test-wcsncmp-nonarray.c 2024-09-17 14:27:27.539224815 -0400 +@@ -0,0 +1,5 @@ ++#include ++#define TEST_IDENTIFIER wcsncmp ++#define TEST_NAME "wcsncmp" ++typedef wchar_t CHAR; ++#include "../string/test-Xncmp-nonarray.c" diff --git a/SOURCES/glibc-RHEL-61255.patch b/SOURCES/glibc-RHEL-61255.patch new file mode 100644 index 0000000..30d504d --- /dev/null +++ b/SOURCES/glibc-RHEL-61255.patch @@ -0,0 +1,374 @@ +commit 03e1378f94173fc192a81e421457198f7b8a34a0 +Author: Alex Butler +Date: Tue Jun 16 12:44:24 2020 +0000 + + aarch64: MTE compatible strncmp + + Add support for MTE to strncmp. Regression tested with xcheck and benchmarked + with glibc's benchtests on the Cortex-A53, Cortex-A72, and Neoverse N1. + + The existing implementation assumes that any access to the pages in which the + string resides is safe. This assumption is not true when MTE is enabled. This + patch updates the algorithm to ensure that accesses remain within the bounds + of an MTE tag (16-byte chunks) and improves overall performance. + + Co-authored-by: Branislav Rankov + Co-authored-by: Wilco Dijkstra + +diff --git a/sysdeps/aarch64/strncmp.S b/sysdeps/aarch64/strncmp.S +index c5141fab8a..ba2563490e 100644 +--- a/sysdeps/aarch64/strncmp.S ++++ b/sysdeps/aarch64/strncmp.S +@@ -25,7 +25,6 @@ + + #define REP8_01 0x0101010101010101 + #define REP8_7f 0x7f7f7f7f7f7f7f7f +-#define REP8_80 0x8080808080808080 + + /* Parameters and result. */ + #define src1 x0 +@@ -46,15 +45,31 @@ + #define tmp3 x10 + #define zeroones x11 + #define pos x12 +-#define limit_wd x13 +-#define mask x14 +-#define endloop x15 ++#define mask x13 ++#define endloop x14 + #define count mask ++#define offset pos ++#define neg_offset x15 + +-ENTRY_ALIGN_AND_PAD (strncmp, 6, 7) +- DELOUSE (0) +- DELOUSE (1) +- DELOUSE (2) ++/* Define endian dependent shift operations. ++ On big-endian early bytes are at MSB and on little-endian LSB. ++ LS_FW means shifting towards early bytes. ++ LS_BK means shifting towards later bytes. ++ */ ++#ifdef __AARCH64EB__ ++#define LS_FW lsl ++#define LS_BK lsr ++#else ++#define LS_FW lsr ++#define LS_BK lsl ++#endif ++ ++ .text ++ .p2align 6 ++ .rep 9 ++ nop /* Pad so that the loop below fits a cache line. */ ++ .endr ++ENTRY_ALIGN (strncmp, 0) + cbz limit, L(ret0) + eor tmp1, src1, src2 + mov zeroones, #REP8_01 +@@ -62,9 +77,6 @@ ENTRY_ALIGN_AND_PAD (strncmp, 6, 7) + and count, src1, #7 + b.ne L(misaligned8) + cbnz count, L(mutual_align) +- /* Calculate the number of full and partial words -1. */ +- sub limit_wd, limit, #1 /* limit != 0, so no underflow. */ +- lsr limit_wd, limit_wd, #3 /* Convert to Dwords. */ + + /* NUL detection works on the principle that (X - 1) & (~X) & 0x80 + (=> (X - 1) & ~(X | 0x7f)) is non-zero iff a byte is zero, and +@@ -74,56 +86,52 @@ L(loop_aligned): + ldr data1, [src1], #8 + ldr data2, [src2], #8 + L(start_realigned): +- subs limit_wd, limit_wd, #1 ++ subs limit, limit, #8 + sub tmp1, data1, zeroones + orr tmp2, data1, #REP8_7f + eor diff, data1, data2 /* Non-zero if differences found. */ +- csinv endloop, diff, xzr, pl /* Last Dword or differences. */ ++ csinv endloop, diff, xzr, hi /* Last Dword or differences. */ + bics has_nul, tmp1, tmp2 /* Non-zero if NUL terminator. */ + ccmp endloop, #0, #0, eq + b.eq L(loop_aligned) + /* End of performance-critical section -- one 64B cache line. */ + +- /* Not reached the limit, must have found the end or a diff. */ +- tbz limit_wd, #63, L(not_limit) +- +- /* Limit % 8 == 0 => all bytes significant. */ +- ands limit, limit, #7 +- b.eq L(not_limit) +- +- lsl limit, limit, #3 /* Bits -> bytes. */ +- mov mask, #~0 +-#ifdef __AARCH64EB__ +- lsr mask, mask, limit +-#else +- lsl mask, mask, limit +-#endif +- bic data1, data1, mask +- bic data2, data2, mask +- +- /* Make sure that the NUL byte is marked in the syndrome. */ +- orr has_nul, has_nul, mask +- +-L(not_limit): ++L(full_check): ++#ifndef __AARCH64EB__ + orr syndrome, diff, has_nul +- +-#ifndef __AARCH64EB__ ++ add limit, limit, 8 /* Rewind limit to before last subs. */ ++L(syndrome_check): ++ /* Limit was reached. Check if the NUL byte or the difference ++ is before the limit. */ + rev syndrome, syndrome + rev data1, data1 +- /* The MS-non-zero bit of the syndrome marks either the first bit +- that is different, or the top bit of the first zero byte. +- Shifting left now will bring the critical information into the +- top bits. */ + clz pos, syndrome + rev data2, data2 + lsl data1, data1, pos ++ cmp limit, pos, lsr #3 + lsl data2, data2, pos + /* But we need to zero-extend (char is unsigned) the value and then + perform a signed 32-bit subtraction. */ + lsr data1, data1, #56 + sub result, data1, data2, lsr #56 +- RET ++ csel result, result, xzr, hi ++ ret + #else ++ /* Not reached the limit, must have found the end or a diff. */ ++ tbz limit, #63, L(not_limit) ++ add tmp1, limit, 8 ++ cbz limit, L(not_limit) ++ ++ lsl limit, tmp1, #3 /* Bits -> bytes. */ ++ mov mask, #~0 ++ lsr mask, mask, limit ++ bic data1, data1, mask ++ bic data2, data2, mask ++ ++ /* Make sure that the NUL byte is marked in the syndrome. */ ++ orr has_nul, has_nul, mask ++ ++L(not_limit): + /* For big-endian we cannot use the trick with the syndrome value + as carry-propagation can corrupt the upper bits if the trailing + bytes in the string contain 0x01. */ +@@ -134,7 +142,7 @@ L(not_limit): + cmp data1, data2 + cset result, ne + cneg result, result, lo +- RET ++ ret + 1: + /* Re-compute the NUL-byte detection, using a byte-reversed value. */ + rev tmp3, data1 +@@ -144,17 +152,18 @@ L(not_limit): + rev has_nul, has_nul + orr syndrome, diff, has_nul + clz pos, syndrome +- /* The MS-non-zero bit of the syndrome marks either the first bit +- that is different, or the top bit of the first zero byte. ++ /* The most-significant-non-zero bit of the syndrome marks either the ++ first bit that is different, or the top bit of the first zero byte. + Shifting left now will bring the critical information into the + top bits. */ ++L(end_quick): + lsl data1, data1, pos + lsl data2, data2, pos + /* But we need to zero-extend (char is unsigned) the value and then + perform a signed 32-bit subtraction. */ + lsr data1, data1, #56 + sub result, data1, data2, lsr #56 +- RET ++ ret + #endif + + L(mutual_align): +@@ -169,22 +178,12 @@ L(mutual_align): + neg tmp3, count, lsl #3 /* 64 - bits(bytes beyond align). */ + ldr data2, [src2], #8 + mov tmp2, #~0 +- sub limit_wd, limit, #1 /* limit != 0, so no underflow. */ +-#ifdef __AARCH64EB__ +- /* Big-endian. Early bytes are at MSB. */ +- lsl tmp2, tmp2, tmp3 /* Shift (count & 63). */ +-#else +- /* Little-endian. Early bytes are at LSB. */ +- lsr tmp2, tmp2, tmp3 /* Shift (count & 63). */ +-#endif +- and tmp3, limit_wd, #7 +- lsr limit_wd, limit_wd, #3 +- /* Adjust the limit. Only low 3 bits used, so overflow irrelevant. */ +- add limit, limit, count +- add tmp3, tmp3, count ++ LS_FW tmp2, tmp2, tmp3 /* Shift (count & 63). */ ++ /* Adjust the limit and ensure it doesn't overflow. */ ++ adds limit, limit, count ++ csinv limit, limit, xzr, lo + orr data1, data1, tmp2 + orr data2, data2, tmp2 +- add limit_wd, limit_wd, tmp3, lsr #3 + b L(start_realigned) + + .p2align 6 +@@ -203,18 +202,15 @@ L(byte_loop): + b.eq L(byte_loop) + L(done): + sub result, data1, data2 +- RET +- ++ ret + /* Align the SRC1 to a dword by doing a bytewise compare and then do + the dword loop. */ + L(try_misaligned_words): +- lsr limit_wd, limit, #3 +- cbz count, L(do_misaligned) ++ cbz count, L(src1_aligned) + + neg count, count + and count, count, #7 + sub limit, limit, count +- lsr limit_wd, limit, #3 + + L(page_end_loop): + ldrb data1w, [src1], #1 +@@ -225,48 +221,98 @@ L(page_end_loop): + subs count, count, #1 + b.hi L(page_end_loop) + +-L(do_misaligned): +- /* Prepare ourselves for the next page crossing. Unlike the aligned +- loop, we fetch 1 less dword because we risk crossing bounds on +- SRC2. */ +- mov count, #8 +- subs limit_wd, limit_wd, #1 +- b.lo L(done_loop) ++ /* The following diagram explains the comparison of misaligned strings. ++ The bytes are shown in natural order. For little-endian, it is ++ reversed in the registers. The "x" bytes are before the string. ++ The "|" separates data that is loaded at one time. ++ src1 | a a a a a a a a | b b b c c c c c | . . . ++ src2 | x x x x x a a a a a a a a b b b | c c c c c . . . ++ After shifting in each step, the data looks like this: ++ STEP_A STEP_B STEP_C ++ data1 a a a a a a a a b b b c c c c c b b b c c c c c ++ data2 a a a a a a a a b b b 0 0 0 0 0 0 0 0 c c c c c ++ The bytes with "0" are eliminated from the syndrome via mask. ++ Align SRC2 down to 16 bytes. This way we can read 16 bytes at a ++ time from SRC2. The comparison happens in 3 steps. After each step ++ the loop can exit, or read from SRC1 or SRC2. */ ++L(src1_aligned): ++ /* Calculate offset from 8 byte alignment to string start in bits. No ++ need to mask offset since shifts are ignoring upper bits. */ ++ lsl offset, src2, #3 ++ bic src2, src2, #0xf ++ mov mask, -1 ++ neg neg_offset, offset ++ ldr data1, [src1], #8 ++ ldp tmp1, tmp2, [src2], #16 ++ LS_BK mask, mask, neg_offset ++ and neg_offset, neg_offset, #63 /* Need actual value for cmp later. */ ++ /* Skip the first compare if data in tmp1 is irrelevant. */ ++ tbnz offset, 6, L(misaligned_mid_loop) ++ + L(loop_misaligned): +- and tmp2, src2, #0xff8 +- eor tmp2, tmp2, #0xff8 +- cbz tmp2, L(page_end_loop) ++ /* STEP_A: Compare full 8 bytes when there is enough data from SRC2.*/ ++ LS_FW data2, tmp1, offset ++ LS_BK tmp1, tmp2, neg_offset ++ subs limit, limit, #8 ++ orr data2, data2, tmp1 /* 8 bytes from SRC2 combined from two regs.*/ ++ sub has_nul, data1, zeroones ++ eor diff, data1, data2 /* Non-zero if differences found. */ ++ orr tmp3, data1, #REP8_7f ++ csinv endloop, diff, xzr, hi /* If limit, set to all ones. */ ++ bic has_nul, has_nul, tmp3 /* Non-zero if NUL byte found in SRC1. */ ++ orr tmp3, endloop, has_nul ++ cbnz tmp3, L(full_check) + + ldr data1, [src1], #8 +- ldr data2, [src2], #8 +- sub tmp1, data1, zeroones +- orr tmp2, data1, #REP8_7f +- eor diff, data1, data2 /* Non-zero if differences found. */ +- bics has_nul, tmp1, tmp2 /* Non-zero if NUL terminator. */ +- ccmp diff, #0, #0, eq +- b.ne L(not_limit) +- subs limit_wd, limit_wd, #1 +- b.pl L(loop_misaligned) ++L(misaligned_mid_loop): ++ /* STEP_B: Compare first part of data1 to second part of tmp2. */ ++ LS_FW data2, tmp2, offset ++#ifdef __AARCH64EB__ ++ /* For big-endian we do a byte reverse to avoid carry-propagation ++ problem described above. This way we can reuse the has_nul in the ++ next step and also use syndrome value trick at the end. */ ++ rev tmp3, data1 ++ #define data1_fixed tmp3 ++#else ++ #define data1_fixed data1 ++#endif ++ sub has_nul, data1_fixed, zeroones ++ orr tmp3, data1_fixed, #REP8_7f ++ eor diff, data2, data1 /* Non-zero if differences found. */ ++ bic has_nul, has_nul, tmp3 /* Non-zero if NUL terminator. */ ++#ifdef __AARCH64EB__ ++ rev has_nul, has_nul ++#endif ++ cmp limit, neg_offset, lsr #3 ++ orr syndrome, diff, has_nul ++ bic syndrome, syndrome, mask /* Ignore later bytes. */ ++ csinv tmp3, syndrome, xzr, hi /* If limit, set to all ones. */ ++ cbnz tmp3, L(syndrome_check) + +-L(done_loop): +- /* We found a difference or a NULL before the limit was reached. */ +- and limit, limit, #7 +- cbz limit, L(not_limit) +- /* Read the last word. */ +- sub src1, src1, 8 +- sub src2, src2, 8 +- ldr data1, [src1, limit] +- ldr data2, [src2, limit] +- sub tmp1, data1, zeroones +- orr tmp2, data1, #REP8_7f +- eor diff, data1, data2 /* Non-zero if differences found. */ +- bics has_nul, tmp1, tmp2 /* Non-zero if NUL terminator. */ +- ccmp diff, #0, #0, eq +- b.ne L(not_limit) ++ /* STEP_C: Compare second part of data1 to first part of tmp1. */ ++ ldp tmp1, tmp2, [src2], #16 ++ cmp limit, #8 ++ LS_BK data2, tmp1, neg_offset ++ eor diff, data2, data1 /* Non-zero if differences found. */ ++ orr syndrome, diff, has_nul ++ and syndrome, syndrome, mask /* Ignore earlier bytes. */ ++ csinv tmp3, syndrome, xzr, hi /* If limit, set to all ones. */ ++ cbnz tmp3, L(syndrome_check) ++ ++ ldr data1, [src1], #8 ++ sub limit, limit, #8 ++ b L(loop_misaligned) ++ ++#ifdef __AARCH64EB__ ++L(syndrome_check): ++ clz pos, syndrome ++ cmp pos, limit, lsl #3 ++ b.lo L(end_quick) ++#endif + + L(ret0): + mov result, #0 +- RET ++ ret + + END (strncmp) + libc_hidden_builtin_def (strncmp) diff --git a/SOURCES/glibc-RHEL-61259-1.patch b/SOURCES/glibc-RHEL-61259-1.patch new file mode 100644 index 0000000..8a7dcce --- /dev/null +++ b/SOURCES/glibc-RHEL-61259-1.patch @@ -0,0 +1,335 @@ +commit 2f47198b04a02097f438ecb765306fa39568a006 +Author: Rajalakshmi Srinivasaraghavan +Date: Fri Dec 2 14:26:41 2022 -0600 + + powerpc64: Remove old strncmp optimization + + This patch cleans up the power4 strncmp optimization for powerpc64 which + is unlikely to be used anywhere. + + Tested on ppc64le with and without --disable-multi-arch flag. + + Reviewed-by: Paul E. Murphy + Reviewed-by: Adhemerval Zanella + +Conflicts: + sysdeps/powerpc/powerpc64/multiarch/strncmp-power4.S + sysdeps/powerpc/powerpc64/power4/strncmp.S + (copyright year changes upstream) + sysdeps/powerpc/powerpc64/multiarch/strncmp.c - fix indentation + + +diff --git a/sysdeps/powerpc/powerpc64/multiarch/Makefile b/sysdeps/powerpc/powerpc64/multiarch/Makefile +index 626845a43c4e8ded..5b20dab108de14ab 100644 +--- a/sysdeps/powerpc/powerpc64/multiarch/Makefile ++++ b/sysdeps/powerpc/powerpc64/multiarch/Makefile +@@ -12,8 +12,7 @@ sysdep_routines += memcpy-power8-cached memcpy-power7 memcpy-a2 memcpy-power6 \ + strnlen-power8 strnlen-power7 strnlen-ppc64 \ + strcasecmp-power7 strcasecmp_l-power7 \ + strncase-power7 strncase_l-power7 \ +- strncmp-power8 strncmp-power7 \ +- strncmp-power4 strncmp-ppc64 \ ++ strncmp-power8 strncmp-power7 strncmp-ppc64 \ + strchr-power8 strchr-power7 strchr-ppc64 \ + strchrnul-power8 strchrnul-power7 strchrnul-ppc64 \ + strcpy-power8 strcpy-power7 strcpy-ppc64 stpcpy-power8 \ +diff -Nrup a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c +--- a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c 2024-11-21 16:22:27.914201581 -0500 ++++ b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c 2024-11-21 16:25:31.721479517 -0500 +@@ -154,8 +154,6 @@ __libc_ifunc_impl_list (const char *name + __strncmp_power8) + IFUNC_IMPL_ADD (array, i, strncmp, hwcap & PPC_FEATURE_HAS_VSX, + __strncmp_power7) +- IFUNC_IMPL_ADD (array, i, strncmp, hwcap & PPC_FEATURE_POWER4, +- __strncmp_power4) + IFUNC_IMPL_ADD (array, i, strncmp, 1, + __strncmp_ppc)) + +diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncmp-power4.S b/sysdeps/powerpc/powerpc64/multiarch/strncmp-power4.S +deleted file mode 100644 +index 6ead3b6374749e6a..0000000000000000 +--- a/sysdeps/powerpc/powerpc64/multiarch/strncmp-power4.S ++++ /dev/null +@@ -1,23 +0,0 @@ +-/* Copyright (C) 2013-2018 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, see +- . */ +- +-#define STRNCMP __strncmp_power4 +- +-#undef libc_hidden_builtin_def +-#define libc_hidden_builtin_def(name) +- +-#include +diff -Nrup a/sysdeps/powerpc/powerpc64/multiarch/strncmp.c b/sysdeps/powerpc/powerpc64/multiarch/strncmp.c +--- a/sysdeps/powerpc/powerpc64/multiarch/strncmp.c 2024-11-21 19:52:23.420623986 -0500 ++++ b/sysdeps/powerpc/powerpc64/multiarch/strncmp.c 2024-11-21 19:52:02.088475579 -0500 +@@ -26,7 +26,6 @@ + # include "init-arch.h" + + extern __typeof (strncmp) __strncmp_ppc attribute_hidden; +-extern __typeof (strncmp) __strncmp_power4 attribute_hidden; + extern __typeof (strncmp) __strncmp_power7 attribute_hidden; + extern __typeof (strncmp) __strncmp_power8 attribute_hidden; + # ifdef __LITTLE_ENDIAN__ +@@ -41,11 +40,9 @@ libc_ifunc_redirected (__redirect_strncm + (hwcap2 & PPC_FEATURE2_ARCH_3_00) + ? __strncmp_power9 : + # endif +- (hwcap2 & PPC_FEATURE2_ARCH_2_07) +- ? __strncmp_power8 +- : (hwcap & PPC_FEATURE_HAS_VSX) +- ? __strncmp_power7 +- : (hwcap & PPC_FEATURE_POWER4) +- ? __strncmp_power4 +- : __strncmp_ppc); ++ (hwcap2 & PPC_FEATURE2_ARCH_2_07) ++ ? __strncmp_power8 ++ : (hwcap & PPC_FEATURE_HAS_VSX) ++ ? __strncmp_power7 ++ : __strncmp_ppc); + #endif +diff --git a/sysdeps/powerpc/powerpc64/power4/strncmp.S b/sysdeps/powerpc/powerpc64/power4/strncmp.S +deleted file mode 100644 +index cf5f4e5fb8fb2522..0000000000000000 +--- a/sysdeps/powerpc/powerpc64/power4/strncmp.S ++++ /dev/null +@@ -1,225 +0,0 @@ +-/* Optimized strcmp implementation for PowerPC64. +- Copyright (C) 2003-2018 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, see +- . */ +- +-#include +- +-#ifndef STRNCMP +-# define STRNCMP strncmp +-#endif +- +-/* See strlen.s for comments on how the end-of-string testing works. */ +- +-/* int [r3] strncmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */ +- +-ENTRY_TOCLESS (STRNCMP, 4) +- CALL_MCOUNT 3 +- +-#define rTMP2 r0 +-#define rRTN r3 +-#define rSTR1 r3 /* first string arg */ +-#define rSTR2 r4 /* second string arg */ +-#define rN r5 /* max string length */ +-#define rWORD1 r6 /* current word in s1 */ +-#define rWORD2 r7 /* current word in s2 */ +-#define rWORD3 r10 +-#define rWORD4 r11 +-#define rFEFE r8 /* constant 0xfefefefefefefeff (-0x0101010101010101) */ +-#define r7F7F r9 /* constant 0x7f7f7f7f7f7f7f7f */ +-#define rNEG r10 /* ~(word in s1 | 0x7f7f7f7f7f7f7f7f) */ +-#define rBITDIF r11 /* bits that differ in s1 & s2 words */ +-#define rTMP r12 +- +- dcbt 0,rSTR1 +- or rTMP, rSTR2, rSTR1 +- lis r7F7F, 0x7f7f +- dcbt 0,rSTR2 +- clrldi. rTMP, rTMP, 61 +- cmpldi cr1, rN, 0 +- lis rFEFE, -0x101 +- bne L(unaligned) +-/* We are doubleword aligned so set up for two loops. first a double word +- loop, then fall into the byte loop if any residual. */ +- srdi. rTMP, rN, 3 +- clrldi rN, rN, 61 +- addi rFEFE, rFEFE, -0x101 +- addi r7F7F, r7F7F, 0x7f7f +- cmpldi cr1, rN, 0 +- beq L(unaligned) +- +- mtctr rTMP /* Power4 wants mtctr 1st in dispatch group. */ +- ld rWORD1, 0(rSTR1) +- ld rWORD2, 0(rSTR2) +- sldi rTMP, rFEFE, 32 +- insrdi r7F7F, r7F7F, 32, 0 +- add rFEFE, rFEFE, rTMP +- b L(g1) +- +-L(g0): +- ldu rWORD1, 8(rSTR1) +- bne- cr1, L(different) +- ldu rWORD2, 8(rSTR2) +-L(g1): add rTMP, rFEFE, rWORD1 +- nor rNEG, r7F7F, rWORD1 +- bdz L(tail) +- and. rTMP, rTMP, rNEG +- cmpd cr1, rWORD1, rWORD2 +- beq+ L(g0) +- +-/* OK. We've hit the end of the string. We need to be careful that +- we don't compare two strings as different because of gunk beyond +- the end of the strings... */ +- +-#ifdef __LITTLE_ENDIAN__ +-L(endstring): +- addi rTMP2, rTMP, -1 +- beq cr1, L(equal) +- andc rTMP2, rTMP2, rTMP +- rldimi rTMP2, rTMP2, 1, 0 +- and rWORD2, rWORD2, rTMP2 /* Mask off gunk. */ +- and rWORD1, rWORD1, rTMP2 +- cmpd cr1, rWORD1, rWORD2 +- beq cr1, L(equal) +- xor rBITDIF, rWORD1, rWORD2 /* rBITDIF has bits that differ. */ +- neg rNEG, rBITDIF +- and rNEG, rNEG, rBITDIF /* rNEG has LS bit that differs. */ +- cntlzd rNEG, rNEG /* bitcount of the bit. */ +- andi. rNEG, rNEG, 56 /* bitcount to LS byte that differs. */ +- sld rWORD1, rWORD1, rNEG /* shift left to clear MS bytes. */ +- sld rWORD2, rWORD2, rNEG +- xor. rBITDIF, rWORD1, rWORD2 +- sub rRTN, rWORD1, rWORD2 +- blt- L(highbit) +- sradi rRTN, rRTN, 63 /* must return an int. */ +- ori rRTN, rRTN, 1 +- blr +-L(equal): +- li rRTN, 0 +- blr +- +-L(different): +- ld rWORD1, -8(rSTR1) +- xor rBITDIF, rWORD1, rWORD2 /* rBITDIF has bits that differ. */ +- neg rNEG, rBITDIF +- and rNEG, rNEG, rBITDIF /* rNEG has LS bit that differs. */ +- cntlzd rNEG, rNEG /* bitcount of the bit. */ +- andi. rNEG, rNEG, 56 /* bitcount to LS byte that differs. */ +- sld rWORD1, rWORD1, rNEG /* shift left to clear MS bytes. */ +- sld rWORD2, rWORD2, rNEG +- xor. rBITDIF, rWORD1, rWORD2 +- sub rRTN, rWORD1, rWORD2 +- blt- L(highbit) +- sradi rRTN, rRTN, 63 +- ori rRTN, rRTN, 1 +- blr +-L(highbit): +- sradi rRTN, rWORD2, 63 +- ori rRTN, rRTN, 1 +- blr +- +-#else +-L(endstring): +- and rTMP, r7F7F, rWORD1 +- beq cr1, L(equal) +- add rTMP, rTMP, r7F7F +- xor. rBITDIF, rWORD1, rWORD2 +- andc rNEG, rNEG, rTMP +- blt- L(highbit) +- cntlzd rBITDIF, rBITDIF +- cntlzd rNEG, rNEG +- addi rNEG, rNEG, 7 +- cmpd cr1, rNEG, rBITDIF +- sub rRTN, rWORD1, rWORD2 +- blt- cr1, L(equal) +- sradi rRTN, rRTN, 63 /* must return an int. */ +- ori rRTN, rRTN, 1 +- blr +-L(equal): +- li rRTN, 0 +- blr +- +-L(different): +- ld rWORD1, -8(rSTR1) +- xor. rBITDIF, rWORD1, rWORD2 +- sub rRTN, rWORD1, rWORD2 +- blt- L(highbit) +- sradi rRTN, rRTN, 63 +- ori rRTN, rRTN, 1 +- blr +-L(highbit): +- sradi rRTN, rWORD2, 63 +- ori rRTN, rRTN, 1 +- blr +-#endif +- +-/* Oh well. In this case, we just do a byte-by-byte comparison. */ +- .align 4 +-L(tail): +- and. rTMP, rTMP, rNEG +- cmpd cr1, rWORD1, rWORD2 +- bne- L(endstring) +- addi rSTR1, rSTR1, 8 +- bne- cr1, L(different) +- addi rSTR2, rSTR2, 8 +- cmpldi cr1, rN, 0 +-L(unaligned): +- mtctr rN /* Power4 wants mtctr 1st in dispatch group */ +- ble cr1, L(ux) +-L(uz): +- lbz rWORD1, 0(rSTR1) +- lbz rWORD2, 0(rSTR2) +- .align 4 +-L(u1): +- cmpdi cr1, rWORD1, 0 +- bdz L(u4) +- cmpd rWORD1, rWORD2 +- beq- cr1, L(u4) +- bne- L(u4) +- lbzu rWORD3, 1(rSTR1) +- lbzu rWORD4, 1(rSTR2) +- cmpdi cr1, rWORD3, 0 +- bdz L(u3) +- cmpd rWORD3, rWORD4 +- beq- cr1, L(u3) +- bne- L(u3) +- lbzu rWORD1, 1(rSTR1) +- lbzu rWORD2, 1(rSTR2) +- cmpdi cr1, rWORD1, 0 +- bdz L(u4) +- cmpd rWORD1, rWORD2 +- beq- cr1, L(u4) +- bne- L(u4) +- lbzu rWORD3, 1(rSTR1) +- lbzu rWORD4, 1(rSTR2) +- cmpdi cr1, rWORD3, 0 +- bdz L(u3) +- cmpd rWORD3, rWORD4 +- beq- cr1, L(u3) +- bne- L(u3) +- lbzu rWORD1, 1(rSTR1) +- lbzu rWORD2, 1(rSTR2) +- b L(u1) +- +-L(u3): sub rRTN, rWORD3, rWORD4 +- blr +-L(u4): sub rRTN, rWORD1, rWORD2 +- blr +-L(ux): +- li rRTN, 0 +- blr +-END (STRNCMP) +-libc_hidden_builtin_def (strncmp) diff --git a/SOURCES/glibc-RHEL-61259-2.patch b/SOURCES/glibc-RHEL-61259-2.patch new file mode 100644 index 0000000..d8aed62 --- /dev/null +++ b/SOURCES/glibc-RHEL-61259-2.patch @@ -0,0 +1,595 @@ +commit 92fdb11ae7aa1ab6b18622670ea702205cd6fdc5 +Author: Adhemerval Zanella Netto +Date: Tue Feb 28 14:23:59 2023 -0300 + + powerpc: Remove powerpc64 strncmp variants + + The default, and power7 implementation just adds word aligned + access when inputs have the same aligment. The unaligned case + is still done by byte operations. + + This is already covered by the generic implementation, which also add + the unaligned input optimization. + + Checked on powerpc64-linux-gnu built without multi-arch for powerpc64, + power7, power8, and power9 (build for le). + Reviewed-by: Rajalakshmi Srinivasaraghavan + +Conflicts: + sysdeps/powerpc/powerpc64/multiarch/strncmp-power7.S + sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.S + sysdeps/powerpc/powerpc64/power7/strncmp.S + sysdeps/powerpc/powerpc64/strncmp.S + (copyright year changes upstream) + sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c - PPC_FEATURE difference + +diff --git a/sysdeps/powerpc/powerpc64/multiarch/Makefile b/sysdeps/powerpc/powerpc64/multiarch/Makefile +index 5b20dab108de14ab..0ee7ce39d6470d80 100644 +--- a/sysdeps/powerpc/powerpc64/multiarch/Makefile ++++ b/sysdeps/powerpc/powerpc64/multiarch/Makefile +@@ -12,7 +12,7 @@ sysdep_routines += memcpy-power8-cached memcpy-power7 memcpy-a2 memcpy-power6 \ + strnlen-power8 strnlen-power7 strnlen-ppc64 \ + strcasecmp-power7 strcasecmp_l-power7 \ + strncase-power7 strncase_l-power7 \ +- strncmp-power8 strncmp-power7 strncmp-ppc64 \ ++ strncmp-power8 strncmp-ppc64 \ + strchr-power8 strchr-power7 strchr-ppc64 \ + strchrnul-power8 strchrnul-power7 strchrnul-ppc64 \ + strcpy-power8 strcpy-power7 strcpy-ppc64 stpcpy-power8 \ +diff --git a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c +index 914e7d5e28a98b5d..2c84d287ee76a7ea 100644 +--- a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c ++++ b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c +@@ -152,8 +152,6 @@ __libc_ifunc_impl_list (const char *name + #endif + IFUNC_IMPL_ADD (array, i, strncmp, hwcap2 & PPC_FEATURE2_ARCH_2_07, + __strncmp_power8) +- IFUNC_IMPL_ADD (array, i, strncmp, hwcap & PPC_FEATURE_HAS_VSX, +- __strncmp_power7) + IFUNC_IMPL_ADD (array, i, strncmp, 1, + __strncmp_ppc)) + +diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncmp-power7.S b/sysdeps/powerpc/powerpc64/multiarch/strncmp-power7.S +deleted file mode 100644 +index 8282ff076c9e00ce..0000000000000000 +--- a/sysdeps/powerpc/powerpc64/multiarch/strncmp-power7.S ++++ /dev/null +@@ -1,23 +0,0 @@ +-/* Copyright (C) 2013-2018 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, see +- . */ +- +-#define STRNCMP __strncmp_power7 +- +-#undef libc_hidden_builtin_def +-#define libc_hidden_builtin_def(name) +- +-#include +diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.S b/sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.S +deleted file mode 100644 +index c6f325650c9ace3b..0000000000000000 +--- a/sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.S ++++ /dev/null +@@ -1,26 +0,0 @@ +-/* Copyright (C) 2013-2018 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, see +- . */ +- +-#if defined SHARED && IS_IN (libc) +-# define STRNCMP __strncmp_ppc +- +-# undef libc_hidden_builtin_def +-# define libc_hidden_builtin_def(name) \ +- .globl __GI_strncmp; __GI_strncmp = __strncmp_ppc +-#endif +- +-#include +diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.c +new file mode 100644 +index 0000000000000000..09cc009a913ed169 +--- /dev/null ++++ b/sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.c +@@ -0,0 +1,7 @@ ++#if defined SHARED && IS_IN (libc) ++# define STRNCMP __strncmp_ppc ++# undef libc_hidden_builtin_def ++# define libc_hidden_builtin_def(name) \ ++ __hidden_ver1 (__strncmp_ppc, __GI_strncmp, __strncmp_ppc); ++#endif ++#include +diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncmp.c b/sysdeps/powerpc/powerpc64/multiarch/strncmp.c +index 275a558e4afa7d61..df2c0707a919ad79 100644 +--- a/sysdeps/powerpc/powerpc64/multiarch/strncmp.c ++++ b/sysdeps/powerpc/powerpc64/multiarch/strncmp.c +@@ -26,7 +26,6 @@ + # include "init-arch.h" + + extern __typeof (strncmp) __strncmp_ppc attribute_hidden; +-extern __typeof (strncmp) __strncmp_power7 attribute_hidden; + extern __typeof (strncmp) __strncmp_power8 attribute_hidden; + # ifdef __LITTLE_ENDIAN__ + extern __typeof (strncmp) __strncmp_power9 attribute_hidden; +@@ -42,7 +41,5 @@ libc_ifunc_redirected (__redirect_strncm + # endif + (hwcap2 & PPC_FEATURE2_ARCH_2_07) + ? __strncmp_power8 +- : (hwcap & PPC_FEATURE_HAS_VSX) +- ? __strncmp_power7 +- : __strncmp_ppc); ++ : __strncmp_ppc); + #endif +diff --git a/sysdeps/powerpc/powerpc64/power7/strncmp.S b/sysdeps/powerpc/powerpc64/power7/strncmp.S +deleted file mode 100644 +index d91aeb6077a558f2..0000000000000000 +--- a/sysdeps/powerpc/powerpc64/power7/strncmp.S ++++ /dev/null +@@ -1,227 +0,0 @@ +-/* Optimized strcmp implementation for POWER7/PowerPC64. +- Copyright (C) 2010-2018 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, see +- . */ +- +-#include +- +-#ifndef STRNCMP +-# define STRNCMP strncmp +-#endif +- +-/* See strlen.s for comments on how the end-of-string testing works. */ +- +-/* int [r3] strncmp (const char *s1 [r3], +- const char *s2 [r4], +- size_t size [r5]) */ +- +-ENTRY_TOCLESS (STRNCMP, 5) +- CALL_MCOUNT 3 +- +-#define rTMP2 r0 +-#define rRTN r3 +-#define rSTR1 r3 /* first string arg */ +-#define rSTR2 r4 /* second string arg */ +-#define rN r5 /* max string length */ +-#define rWORD1 r6 /* current word in s1 */ +-#define rWORD2 r7 /* current word in s2 */ +-#define rWORD3 r10 +-#define rWORD4 r11 +-#define rFEFE r8 /* constant 0xfefefefefefefeff (-0x0101010101010101) */ +-#define r7F7F r9 /* constant 0x7f7f7f7f7f7f7f7f */ +-#define rNEG r10 /* ~(word in s1 | 0x7f7f7f7f7f7f7f7f) */ +-#define rBITDIF r11 /* bits that differ in s1 & s2 words */ +-#define rTMP r12 +- +- dcbt 0,rSTR1 +- nop +- or rTMP,rSTR2,rSTR1 +- lis r7F7F,0x7f7f +- dcbt 0,rSTR2 +- nop +- clrldi. rTMP,rTMP,61 +- cmpldi cr1,rN,0 +- lis rFEFE,-0x101 +- bne L(unaligned) +-/* We are doubleword aligned so set up for two loops. first a double word +- loop, then fall into the byte loop if any residual. */ +- srdi. rTMP,rN,3 +- clrldi rN,rN,61 +- addi rFEFE,rFEFE,-0x101 +- addi r7F7F,r7F7F,0x7f7f +- cmpldi cr1,rN,0 +- beq L(unaligned) +- +- mtctr rTMP +- ld rWORD1,0(rSTR1) +- ld rWORD2,0(rSTR2) +- sldi rTMP,rFEFE,32 +- insrdi r7F7F,r7F7F,32,0 +- add rFEFE,rFEFE,rTMP +- b L(g1) +- +-L(g0): +- ldu rWORD1,8(rSTR1) +- bne cr1,L(different) +- ldu rWORD2,8(rSTR2) +-L(g1): add rTMP,rFEFE,rWORD1 +- nor rNEG,r7F7F,rWORD1 +- bdz L(tail) +- and. rTMP,rTMP,rNEG +- cmpd cr1,rWORD1,rWORD2 +- beq L(g0) +- +-/* OK. We've hit the end of the string. We need to be careful that +- we don't compare two strings as different because of gunk beyond +- the end of the strings... */ +- +-#ifdef __LITTLE_ENDIAN__ +-L(endstring): +- addi rTMP2, rTMP, -1 +- beq cr1, L(equal) +- andc rTMP2, rTMP2, rTMP +- rldimi rTMP2, rTMP2, 1, 0 +- and rWORD2, rWORD2, rTMP2 /* Mask off gunk. */ +- and rWORD1, rWORD1, rTMP2 +- cmpd cr1, rWORD1, rWORD2 +- beq cr1, L(equal) +- cmpb rBITDIF, rWORD1, rWORD2 /* 0xff on equal bytes. */ +- addi rNEG, rBITDIF, 1 +- orc rNEG, rNEG, rBITDIF /* 0's below LS differing byte. */ +- sldi rNEG, rNEG, 8 /* 1's above LS differing byte. */ +- andc rWORD1, rWORD1, rNEG /* mask off MS bytes. */ +- andc rWORD2, rWORD2, rNEG +- xor. rBITDIF, rWORD1, rWORD2 +- sub rRTN, rWORD1, rWORD2 +- blt L(highbit) +- sradi rRTN, rRTN, 63 /* must return an int. */ +- ori rRTN, rRTN, 1 +- blr +-L(equal): +- li rRTN, 0 +- blr +- +-L(different): +- ld rWORD1, -8(rSTR1) +- cmpb rBITDIF, rWORD1, rWORD2 /* 0xff on equal bytes. */ +- addi rNEG, rBITDIF, 1 +- orc rNEG, rNEG, rBITDIF /* 0's below LS differing byte. */ +- sldi rNEG, rNEG, 8 /* 1's above LS differing byte. */ +- andc rWORD1, rWORD1, rNEG /* mask off MS bytes. */ +- andc rWORD2, rWORD2, rNEG +- xor. rBITDIF, rWORD1, rWORD2 +- sub rRTN, rWORD1, rWORD2 +- blt L(highbit) +- sradi rRTN, rRTN, 63 +- ori rRTN, rRTN, 1 +- blr +-L(highbit): +- sradi rRTN, rWORD2, 63 +- ori rRTN, rRTN, 1 +- blr +- +-#else +-L(endstring): +- and rTMP,r7F7F,rWORD1 +- beq cr1,L(equal) +- add rTMP,rTMP,r7F7F +- xor. rBITDIF,rWORD1,rWORD2 +- andc rNEG,rNEG,rTMP +- blt L(highbit) +- cntlzd rBITDIF,rBITDIF +- cntlzd rNEG,rNEG +- addi rNEG,rNEG,7 +- cmpd cr1,rNEG,rBITDIF +- sub rRTN,rWORD1,rWORD2 +- blt cr1,L(equal) +- sradi rRTN,rRTN,63 /* must return an int. */ +- ori rRTN,rRTN,1 +- blr +-L(equal): +- li rRTN,0 +- blr +- +-L(different): +- ld rWORD1,-8(rSTR1) +- xor. rBITDIF,rWORD1,rWORD2 +- sub rRTN,rWORD1,rWORD2 +- blt L(highbit) +- sradi rRTN,rRTN,63 +- ori rRTN,rRTN,1 +- blr +-L(highbit): +- sradi rRTN,rWORD2,63 +- ori rRTN,rRTN,1 +- blr +-#endif +- +-/* Oh well. In this case, we just do a byte-by-byte comparison. */ +- .align 4 +-L(tail): +- and. rTMP,rTMP,rNEG +- cmpd cr1,rWORD1,rWORD2 +- bne L(endstring) +- addi rSTR1,rSTR1,8 +- bne cr1,L(different) +- addi rSTR2,rSTR2,8 +- cmpldi cr1,rN,0 +-L(unaligned): +- mtctr rN +- ble cr1,L(ux) +-L(uz): +- lbz rWORD1,0(rSTR1) +- lbz rWORD2,0(rSTR2) +- .align 4 +-L(u1): +- cmpdi cr1,rWORD1,0 +- bdz L(u4) +- cmpd rWORD1,rWORD2 +- beq cr1,L(u4) +- bne L(u4) +- lbzu rWORD3,1(rSTR1) +- lbzu rWORD4,1(rSTR2) +- cmpdi cr1,rWORD3,0 +- bdz L(u3) +- cmpd rWORD3,rWORD4 +- beq cr1,L(u3) +- bne L(u3) +- lbzu rWORD1,1(rSTR1) +- lbzu rWORD2,1(rSTR2) +- cmpdi cr1,rWORD1,0 +- bdz L(u4) +- cmpd rWORD1,rWORD2 +- beq cr1,L(u4) +- bne L(u4) +- lbzu rWORD3,1(rSTR1) +- lbzu rWORD4,1(rSTR2) +- cmpdi cr1,rWORD3,0 +- bdz L(u3) +- cmpd rWORD3,rWORD4 +- beq cr1,L(u3) +- bne L(u3) +- lbzu rWORD1,1(rSTR1) +- lbzu rWORD2,1(rSTR2) +- b L(u1) +- +-L(u3): sub rRTN,rWORD3,rWORD4 +- blr +-L(u4): sub rRTN,rWORD1,rWORD2 +- blr +-L(ux): +- li rRTN,0 +- blr +-END (STRNCMP) +-libc_hidden_builtin_def (strncmp) +diff --git a/sysdeps/powerpc/powerpc64/strncmp.S b/sysdeps/powerpc/powerpc64/strncmp.S +deleted file mode 100644 +index 40a230242cbdf733..0000000000000000 +--- a/sysdeps/powerpc/powerpc64/strncmp.S ++++ /dev/null +@@ -1,210 +0,0 @@ +-/* Optimized strcmp implementation for PowerPC64. +- Copyright (C) 2003-2018 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, see +- . */ +- +-#include +- +-/* See strlen.s for comments on how the end-of-string testing works. */ +- +-/* int [r3] strncmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */ +- +-#ifndef STRNCMP +-# define STRNCMP strncmp +-#endif +- +-ENTRY_TOCLESS (STRNCMP, 4) +- CALL_MCOUNT 3 +- +-#define rTMP2 r0 +-#define rRTN r3 +-#define rSTR1 r3 /* first string arg */ +-#define rSTR2 r4 /* second string arg */ +-#define rN r5 /* max string length */ +-#define rWORD1 r6 /* current word in s1 */ +-#define rWORD2 r7 /* current word in s2 */ +-#define rFEFE r8 /* constant 0xfefefefefefefeff (-0x0101010101010101) */ +-#define r7F7F r9 /* constant 0x7f7f7f7f7f7f7f7f */ +-#define rNEG r10 /* ~(word in s1 | 0x7f7f7f7f7f7f7f7f) */ +-#define rBITDIF r11 /* bits that differ in s1 & s2 words */ +-#define rTMP r12 +- +- dcbt 0,rSTR1 +- or rTMP, rSTR2, rSTR1 +- lis r7F7F, 0x7f7f +- dcbt 0,rSTR2 +- clrldi. rTMP, rTMP, 61 +- cmpldi cr1, rN, 0 +- lis rFEFE, -0x101 +- bne L(unaligned) +-/* We are doubleword aligned so set up for two loops. first a double word +- loop, then fall into the byte loop if any residual. */ +- srdi. rTMP, rN, 3 +- clrldi rN, rN, 61 +- addi rFEFE, rFEFE, -0x101 +- addi r7F7F, r7F7F, 0x7f7f +- cmpldi cr1, rN, 0 +- beq L(unaligned) +- +- mtctr rTMP /* Power4 wants mtctr 1st in dispatch group. */ +- ld rWORD1, 0(rSTR1) +- ld rWORD2, 0(rSTR2) +- sldi rTMP, rFEFE, 32 +- insrdi r7F7F, r7F7F, 32, 0 +- add rFEFE, rFEFE, rTMP +- b L(g1) +- +-L(g0): +- ldu rWORD1, 8(rSTR1) +- bne- cr1, L(different) +- ldu rWORD2, 8(rSTR2) +-L(g1): add rTMP, rFEFE, rWORD1 +- nor rNEG, r7F7F, rWORD1 +- bdz L(tail) +- and. rTMP, rTMP, rNEG +- cmpd cr1, rWORD1, rWORD2 +- beq+ L(g0) +- +-/* OK. We've hit the end of the string. We need to be careful that +- we don't compare two strings as different because of gunk beyond +- the end of the strings... */ +- +-#ifdef __LITTLE_ENDIAN__ +-L(endstring): +- addi rTMP2, rTMP, -1 +- beq cr1, L(equal) +- andc rTMP2, rTMP2, rTMP +- rldimi rTMP2, rTMP2, 1, 0 +- and rWORD2, rWORD2, rTMP2 /* Mask off gunk. */ +- and rWORD1, rWORD1, rTMP2 +- cmpd cr1, rWORD1, rWORD2 +- beq cr1, L(equal) +- xor rBITDIF, rWORD1, rWORD2 /* rBITDIF has bits that differ. */ +- neg rNEG, rBITDIF +- and rNEG, rNEG, rBITDIF /* rNEG has LS bit that differs. */ +- cntlzd rNEG, rNEG /* bitcount of the bit. */ +- andi. rNEG, rNEG, 56 /* bitcount to LS byte that differs. */ +- sld rWORD1, rWORD1, rNEG /* shift left to clear MS bytes. */ +- sld rWORD2, rWORD2, rNEG +- xor. rBITDIF, rWORD1, rWORD2 +- sub rRTN, rWORD1, rWORD2 +- blt- L(highbit) +- sradi rRTN, rRTN, 63 /* must return an int. */ +- ori rRTN, rRTN, 1 +- blr +-L(equal): +- li rRTN, 0 +- blr +- +-L(different): +- ld rWORD1, -8(rSTR1) +- xor rBITDIF, rWORD1, rWORD2 /* rBITDIF has bits that differ. */ +- neg rNEG, rBITDIF +- and rNEG, rNEG, rBITDIF /* rNEG has LS bit that differs. */ +- cntlzd rNEG, rNEG /* bitcount of the bit. */ +- andi. rNEG, rNEG, 56 /* bitcount to LS byte that differs. */ +- sld rWORD1, rWORD1, rNEG /* shift left to clear MS bytes. */ +- sld rWORD2, rWORD2, rNEG +- xor. rBITDIF, rWORD1, rWORD2 +- sub rRTN, rWORD1, rWORD2 +- blt- L(highbit) +- sradi rRTN, rRTN, 63 +- ori rRTN, rRTN, 1 +- blr +-L(highbit): +- sradi rRTN, rWORD2, 63 +- ori rRTN, rRTN, 1 +- blr +- +-#else +-L(endstring): +- and rTMP, r7F7F, rWORD1 +- beq cr1, L(equal) +- add rTMP, rTMP, r7F7F +- xor. rBITDIF, rWORD1, rWORD2 +- andc rNEG, rNEG, rTMP +- blt- L(highbit) +- cntlzd rBITDIF, rBITDIF +- cntlzd rNEG, rNEG +- addi rNEG, rNEG, 7 +- cmpd cr1, rNEG, rBITDIF +- sub rRTN, rWORD1, rWORD2 +- blt- cr1, L(equal) +- sradi rRTN, rRTN, 63 /* must return an int. */ +- ori rRTN, rRTN, 1 +- blr +-L(equal): +- li rRTN, 0 +- blr +- +-L(different): +- ld rWORD1, -8(rSTR1) +- xor. rBITDIF, rWORD1, rWORD2 +- sub rRTN, rWORD1, rWORD2 +- blt- L(highbit) +- sradi rRTN, rRTN, 63 +- ori rRTN, rRTN, 1 +- blr +-L(highbit): +- sradi rRTN, rWORD2, 63 +- ori rRTN, rRTN, 1 +- blr +-#endif +- +-/* Oh well. In this case, we just do a byte-by-byte comparison. */ +- .align 4 +-L(tail): +- and. rTMP, rTMP, rNEG +- cmpd cr1, rWORD1, rWORD2 +- bne- L(endstring) +- addi rSTR1, rSTR1, 8 +- bne- cr1, L(different) +- addi rSTR2, rSTR2, 8 +- cmpldi cr1, rN, 0 +-L(unaligned): +- mtctr rN /* Power4 wants mtctr 1st in dispatch group */ +- bgt cr1, L(uz) +-L(ux): +- li rRTN, 0 +- blr +- .align 4 +-L(uz): +- lbz rWORD1, 0(rSTR1) +- lbz rWORD2, 0(rSTR2) +- nop +- b L(u1) +-L(u0): +- lbzu rWORD2, 1(rSTR2) +-L(u1): +- bdz L(u3) +- cmpdi cr1, rWORD1, 0 +- cmpd rWORD1, rWORD2 +- beq- cr1, L(u3) +- lbzu rWORD1, 1(rSTR1) +- bne- L(u2) +- lbzu rWORD2, 1(rSTR2) +- bdz L(u3) +- cmpdi cr1, rWORD1, 0 +- cmpd rWORD1, rWORD2 +- bne- L(u3) +- lbzu rWORD1, 1(rSTR1) +- bne+ cr1, L(u0) +- +-L(u2): lbzu rWORD1, -1(rSTR1) +-L(u3): sub rRTN, rWORD1, rWORD2 +- blr +-END (STRNCMP) +-libc_hidden_builtin_def (strncmp) diff --git a/SOURCES/glibc-RHEL-67806.patch b/SOURCES/glibc-RHEL-67806.patch new file mode 100644 index 0000000..a0e38e7 --- /dev/null +++ b/SOURCES/glibc-RHEL-67806.patch @@ -0,0 +1,845 @@ +From e1d3312015e8f70344620375aedf91afe7e7e7a4 Mon Sep 17 00:00:00 2001 +From: lijianglin +Date: Tue, 27 Jun 2023 20:15:49 +0800 +Subject: add GB18030-2022 charmap and test the entire GB18030 charmap [BZ + #30243] + +support GB18030-2022 after add and change some transcoding relationship +of GB18030-2022.Details are as follows: +add 25 transcoding relationship + UE81E 0x82359037 + UE826 0x82359038 + UE82B 0x82359039 + UE82C 0x82359130 + UE832 0x82359131 + UE843 0x82359132 + UE854 0x82359133 + UE864 0x82359134 + UE78D 0x84318236 + UE78F 0x84318237 + UE78E 0x84318238 + UE790 0x84318239 + UE791 0x84318330 + UE792 0x84318331 + UE793 0x84318332 + UE794 0x84318333 + UE795 0x84318334 + UE796 0x84318335 + UE816 0xfe51 + UE817 0xfe52 + UE818 0xfe53 + UE831 0xfe6c + UE83B 0xfe76 + UE855 0xfe91 +change 6 transcoding relationship + U20087 0x95329031 + U20089 0x95329033 + U200CC 0x95329730 + U215D7 0x9536b937 + U2298F 0x9630ba35 + U241FE 0x9635b630 +Test the entire GB18030 charmap, not only the Unicode BMP part. + +Co-authored-by: yangyanchao +Co-authored-by: liqingqing +Co-authored-by: Bruno Haible +Reviewed-by: Andreas Schwab +Reviewed-by: Mike FABIAN + +diff --git a/iconvdata/gb18030.c b/iconvdata/gb18030.c +index 9996a59eaf..be6cfe652c 100644 +--- a/iconvdata/gb18030.c ++++ b/iconvdata/gb18030.c +@@ -6009,49 +6009,50 @@ static const uint16_t __twobyte_to_ucs[] = + [0x5dc2] = 0xfa0e, [0x5dc3] = 0xfa0f, [0x5dc4] = 0xfa11, [0x5dc5] = 0xfa13, + [0x5dc6] = 0xfa14, [0x5dc7] = 0xfa18, [0x5dc8] = 0xfa1f, [0x5dc9] = 0xfa20, + [0x5dca] = 0xfa21, [0x5dcb] = 0xfa23, [0x5dcc] = 0xfa24, [0x5dcd] = 0xfa27, +- [0x5dce] = 0xfa28, [0x5dcf] = 0xfa29, [0x5dd0] = 0x2e81, [0x5dd4] = 0x2e84, +- [0x5dd5] = 0x3473, [0x5dd6] = 0x3447, [0x5dd7] = 0x2e88, [0x5dd8] = 0x2e8b, +- [0x5dd9] = 0x9fb4, [0x5dda] = 0x359e, [0x5ddb] = 0x361a, [0x5ddc] = 0x360e, +- [0x5ddd] = 0x2e8c, [0x5dde] = 0x2e97, [0x5ddf] = 0x396e, [0x5de0] = 0x3918, +- [0x5de1] = 0x9fb5, [0x5de2] = 0x39cf, [0x5de3] = 0x39df, [0x5de4] = 0x3a73, +- [0x5de5] = 0x39d0, [0x5de6] = 0x9fb6, [0x5de7] = 0x9fb7, [0x5de8] = 0x3b4e, +- [0x5de9] = 0x3c6e, [0x5dea] = 0x3ce0, [0x5deb] = 0x2ea7, [0x5ded] = 0x9fb8, ++ [0x5dce] = 0xfa28, [0x5dcf] = 0xfa29, [0x5dd0] = 0x2e81, [0x5dd1] = 0xe816, ++ [0x5dd2] = 0xe817, [0x5dd3] = 0xe818, [0x5dd4] = 0x2e84, [0x5dd5] = 0x3473, ++ [0x5dd6] = 0x3447, [0x5dd7] = 0x2e88, [0x5dd8] = 0x2e8b, [0x5dd9] = 0x9fb4, ++ [0x5dda] = 0x359e, [0x5ddb] = 0x361a, [0x5ddc] = 0x360e, [0x5ddd] = 0x2e8c, ++ [0x5dde] = 0x2e97, [0x5ddf] = 0x396e, [0x5de0] = 0x3918, [0x5de1] = 0x9fb5, ++ [0x5de2] = 0x39cf, [0x5de3] = 0x39df, [0x5de4] = 0x3a73, [0x5de5] = 0x39d0, ++ [0x5de6] = 0x9fb6, [0x5de7] = 0x9fb7, [0x5de8] = 0x3b4e, [0x5de9] = 0x3c6e, ++ [0x5dea] = 0x3ce0, [0x5deb] = 0x2ea7, [0x5dec] = 0xe831, [0x5ded] = 0x9fb8, + [0x5dee] = 0x2eaa, [0x5def] = 0x4056, [0x5df0] = 0x415f, [0x5df1] = 0x2eae, + [0x5df2] = 0x4337, [0x5df3] = 0x2eb3, [0x5df4] = 0x2eb6, [0x5df5] = 0x2eb7, +- [0x5df7] = 0x43b1, [0x5df8] = 0x43ac, [0x5df9] = 0x2ebb, [0x5dfa] = 0x43dd, +- [0x5dfb] = 0x44d6, [0x5dfc] = 0x4661, [0x5dfd] = 0x464c, [0x5dfe] = 0x9fb9, +- [0x5e00] = 0x4723, [0x5e01] = 0x4729, [0x5e02] = 0x477c, [0x5e03] = 0x478d, +- [0x5e04] = 0x2eca, [0x5e05] = 0x4947, [0x5e06] = 0x497a, [0x5e07] = 0x497d, +- [0x5e08] = 0x4982, [0x5e09] = 0x4983, [0x5e0a] = 0x4985, [0x5e0b] = 0x4986, +- [0x5e0c] = 0x499f, [0x5e0d] = 0x499b, [0x5e0e] = 0x49b7, [0x5e0f] = 0x49b6, +- [0x5e10] = 0x9fba, [0x5e12] = 0x4ca3, [0x5e13] = 0x4c9f, [0x5e14] = 0x4ca0, +- [0x5e15] = 0x4ca1, [0x5e16] = 0x4c77, [0x5e17] = 0x4ca2, [0x5e18] = 0x4d13, +- [0x5e19] = 0x4d14, [0x5e1a] = 0x4d15, [0x5e1b] = 0x4d16, [0x5e1c] = 0x4d17, +- [0x5e1d] = 0x4d18, [0x5e1e] = 0x4d19, [0x5e1f] = 0x4dae, [0x5e20] = 0x9fbb, +- [0x5e21] = 0xe468, [0x5e22] = 0xe469, [0x5e23] = 0xe46a, [0x5e24] = 0xe46b, +- [0x5e25] = 0xe46c, [0x5e26] = 0xe46d, [0x5e27] = 0xe46e, [0x5e28] = 0xe46f, +- [0x5e29] = 0xe470, [0x5e2a] = 0xe471, [0x5e2b] = 0xe472, [0x5e2c] = 0xe473, +- [0x5e2d] = 0xe474, [0x5e2e] = 0xe475, [0x5e2f] = 0xe476, [0x5e30] = 0xe477, +- [0x5e31] = 0xe478, [0x5e32] = 0xe479, [0x5e33] = 0xe47a, [0x5e34] = 0xe47b, +- [0x5e35] = 0xe47c, [0x5e36] = 0xe47d, [0x5e37] = 0xe47e, [0x5e38] = 0xe47f, +- [0x5e39] = 0xe480, [0x5e3a] = 0xe481, [0x5e3b] = 0xe482, [0x5e3c] = 0xe483, +- [0x5e3d] = 0xe484, [0x5e3e] = 0xe485, [0x5e3f] = 0xe486, [0x5e40] = 0xe487, +- [0x5e41] = 0xe488, [0x5e42] = 0xe489, [0x5e43] = 0xe48a, [0x5e44] = 0xe48b, +- [0x5e45] = 0xe48c, [0x5e46] = 0xe48d, [0x5e47] = 0xe48e, [0x5e48] = 0xe48f, +- [0x5e49] = 0xe490, [0x5e4a] = 0xe491, [0x5e4b] = 0xe492, [0x5e4c] = 0xe493, +- [0x5e4d] = 0xe494, [0x5e4e] = 0xe495, [0x5e4f] = 0xe496, [0x5e50] = 0xe497, +- [0x5e51] = 0xe498, [0x5e52] = 0xe499, [0x5e53] = 0xe49a, [0x5e54] = 0xe49b, +- [0x5e55] = 0xe49c, [0x5e56] = 0xe49d, [0x5e57] = 0xe49e, [0x5e58] = 0xe49f, +- [0x5e59] = 0xe4a0, [0x5e5a] = 0xe4a1, [0x5e5b] = 0xe4a2, [0x5e5c] = 0xe4a3, +- [0x5e5d] = 0xe4a4, [0x5e5e] = 0xe4a5, [0x5e5f] = 0xe4a6, [0x5e60] = 0xe4a7, +- [0x5e61] = 0xe4a8, [0x5e62] = 0xe4a9, [0x5e63] = 0xe4aa, [0x5e64] = 0xe4ab, +- [0x5e65] = 0xe4ac, [0x5e66] = 0xe4ad, [0x5e67] = 0xe4ae, [0x5e68] = 0xe4af, +- [0x5e69] = 0xe4b0, [0x5e6a] = 0xe4b1, [0x5e6b] = 0xe4b2, [0x5e6c] = 0xe4b3, +- [0x5e6d] = 0xe4b4, [0x5e6e] = 0xe4b5, [0x5e6f] = 0xe4b6, [0x5e70] = 0xe4b7, +- [0x5e71] = 0xe4b8, [0x5e72] = 0xe4b9, [0x5e73] = 0xe4ba, [0x5e74] = 0xe4bb, +- [0x5e75] = 0xe4bc, [0x5e76] = 0xe4bd, [0x5e77] = 0xe4be, [0x5e78] = 0xe4bf, +- [0x5e79] = 0xe4c0, [0x5e7a] = 0xe4c1, [0x5e7b] = 0xe4c2, [0x5e7c] = 0xe4c3, +- [0x5e7d] = 0xe4c4, [0x5e7e] = 0xe4c5, ++ [0x5df6] = 0xe83b, [0x5df7] = 0x43b1, [0x5df8] = 0x43ac, [0x5df9] = 0x2ebb, ++ [0x5dfa] = 0x43dd, [0x5dfb] = 0x44d6, [0x5dfc] = 0x4661, [0x5dfd] = 0x464c, ++ [0x5dfe] = 0x9fb9, [0x5e00] = 0x4723, [0x5e01] = 0x4729, [0x5e02] = 0x477c, ++ [0x5e03] = 0x478d, [0x5e04] = 0x2eca, [0x5e05] = 0x4947, [0x5e06] = 0x497a, ++ [0x5e07] = 0x497d, [0x5e08] = 0x4982, [0x5e09] = 0x4983, [0x5e0a] = 0x4985, ++ [0x5e0b] = 0x4986, [0x5e0c] = 0x499f, [0x5e0d] = 0x499b, [0x5e0e] = 0x49b7, ++ [0x5e0f] = 0x49b6, [0x5e10] = 0x9fba, [0x5e11] = 0xe855, [0x5e12] = 0x4ca3, ++ [0x5e13] = 0x4c9f, [0x5e14] = 0x4ca0, [0x5e15] = 0x4ca1, [0x5e16] = 0x4c77, ++ [0x5e17] = 0x4ca2, [0x5e18] = 0x4d13, [0x5e19] = 0x4d14, [0x5e1a] = 0x4d15, ++ [0x5e1b] = 0x4d16, [0x5e1c] = 0x4d17, [0x5e1d] = 0x4d18, [0x5e1e] = 0x4d19, ++ [0x5e1f] = 0x4dae, [0x5e20] = 0x9fbb, [0x5e21] = 0xe468, [0x5e22] = 0xe469, ++ [0x5e23] = 0xe46a, [0x5e24] = 0xe46b, [0x5e25] = 0xe46c, [0x5e26] = 0xe46d, ++ [0x5e27] = 0xe46e, [0x5e28] = 0xe46f, [0x5e29] = 0xe470, [0x5e2a] = 0xe471, ++ [0x5e2b] = 0xe472, [0x5e2c] = 0xe473, [0x5e2d] = 0xe474, [0x5e2e] = 0xe475, ++ [0x5e2f] = 0xe476, [0x5e30] = 0xe477, [0x5e31] = 0xe478, [0x5e32] = 0xe479, ++ [0x5e33] = 0xe47a, [0x5e34] = 0xe47b, [0x5e35] = 0xe47c, [0x5e36] = 0xe47d, ++ [0x5e37] = 0xe47e, [0x5e38] = 0xe47f, [0x5e39] = 0xe480, [0x5e3a] = 0xe481, ++ [0x5e3b] = 0xe482, [0x5e3c] = 0xe483, [0x5e3d] = 0xe484, [0x5e3e] = 0xe485, ++ [0x5e3f] = 0xe486, [0x5e40] = 0xe487, [0x5e41] = 0xe488, [0x5e42] = 0xe489, ++ [0x5e43] = 0xe48a, [0x5e44] = 0xe48b, [0x5e45] = 0xe48c, [0x5e46] = 0xe48d, ++ [0x5e47] = 0xe48e, [0x5e48] = 0xe48f, [0x5e49] = 0xe490, [0x5e4a] = 0xe491, ++ [0x5e4b] = 0xe492, [0x5e4c] = 0xe493, [0x5e4d] = 0xe494, [0x5e4e] = 0xe495, ++ [0x5e4f] = 0xe496, [0x5e50] = 0xe497, [0x5e51] = 0xe498, [0x5e52] = 0xe499, ++ [0x5e53] = 0xe49a, [0x5e54] = 0xe49b, [0x5e55] = 0xe49c, [0x5e56] = 0xe49d, ++ [0x5e57] = 0xe49e, [0x5e58] = 0xe49f, [0x5e59] = 0xe4a0, [0x5e5a] = 0xe4a1, ++ [0x5e5b] = 0xe4a2, [0x5e5c] = 0xe4a3, [0x5e5d] = 0xe4a4, [0x5e5e] = 0xe4a5, ++ [0x5e5f] = 0xe4a6, [0x5e60] = 0xe4a7, [0x5e61] = 0xe4a8, [0x5e62] = 0xe4a9, ++ [0x5e63] = 0xe4aa, [0x5e64] = 0xe4ab, [0x5e65] = 0xe4ac, [0x5e66] = 0xe4ad, ++ [0x5e67] = 0xe4ae, [0x5e68] = 0xe4af, [0x5e69] = 0xe4b0, [0x5e6a] = 0xe4b1, ++ [0x5e6b] = 0xe4b2, [0x5e6c] = 0xe4b3, [0x5e6d] = 0xe4b4, [0x5e6e] = 0xe4b5, ++ [0x5e6f] = 0xe4b6, [0x5e70] = 0xe4b7, [0x5e71] = 0xe4b8, [0x5e72] = 0xe4b9, ++ [0x5e73] = 0xe4ba, [0x5e74] = 0xe4bb, [0x5e75] = 0xe4bc, [0x5e76] = 0xe4bd, ++ [0x5e77] = 0xe4be, [0x5e78] = 0xe4bf, [0x5e79] = 0xe4c0, [0x5e7a] = 0xe4c1, ++ [0x5e7b] = 0xe4c2, [0x5e7c] = 0xe4c3, [0x5e7d] = 0xe4c4, [0x5e7e] = 0xe4c5, + }; + + /* Table for GB18030 -> UCS-4, containing the four-byte characters only, +@@ -8680,7 +8681,9 @@ static const uint16_t __fourbyte_to_ucs[0x99e2 - 6637 - 2110 - 14404 - 4295] = + [0x2838] = 0x9fa6, [0x2839] = 0x9fa7, [0x283a] = 0x9fa8, [0x283b] = 0x9fa9, + [0x283c] = 0x9faa, [0x283d] = 0x9fab, [0x283e] = 0x9fac, [0x283f] = 0x9fad, + [0x2840] = 0x9fae, [0x2841] = 0x9faf, [0x2842] = 0x9fb0, [0x2843] = 0x9fb1, +- [0x2844] = 0x9fb2, [0x2845] = 0x9fb3, [0x284e] = 0xe76c, [0x284f] = 0xe7c8, ++ [0x2844] = 0x9fb2, [0x2845] = 0x9fb3, [0x2846] = 0xe81e, [0x2847] = 0xe826, ++ [0x2848] = 0xe82b, [0x2849] = 0xe82c, [0x284a] = 0xe832, [0x284b] = 0xe843, ++ [0x284c] = 0xe854, [0x284d] = 0xe864, [0x284e] = 0xe76c, [0x284f] = 0xe7c8, + [0x2850] = 0xe7e7, [0x2851] = 0xe7e8, [0x2852] = 0xe7e9, [0x2853] = 0xe7ea, + [0x2854] = 0xe7eb, [0x2855] = 0xe7ec, [0x2856] = 0xe7ed, [0x2857] = 0xe7ee, + [0x2858] = 0xe7ef, [0x2859] = 0xe7f0, [0x285a] = 0xe7f1, [0x285b] = 0xe7f2, +@@ -9008,84 +9011,86 @@ static const uint16_t __fourbyte_to_ucs[0x99e2 - 6637 - 2110 - 14404 - 4295] = + [0x2d60] = 0xfe02, [0x2d61] = 0xfe03, [0x2d62] = 0xfe04, [0x2d63] = 0xfe05, + [0x2d64] = 0xfe06, [0x2d65] = 0xfe07, [0x2d66] = 0xfe08, [0x2d67] = 0xfe09, + [0x2d68] = 0xfe0a, [0x2d69] = 0xfe0b, [0x2d6a] = 0xfe0c, [0x2d6b] = 0xfe0d, +- [0x2d6c] = 0xfe0e, [0x2d6d] = 0xfe0f, [0x2d78] = 0xfe1a, [0x2d79] = 0xfe1b, +- [0x2d7a] = 0xfe1c, [0x2d7b] = 0xfe1d, [0x2d7c] = 0xfe1e, [0x2d7d] = 0xfe1f, +- [0x2d7e] = 0xfe20, [0x2d7f] = 0xfe21, [0x2d80] = 0xfe22, [0x2d81] = 0xfe23, +- [0x2d82] = 0xfe24, [0x2d83] = 0xfe25, [0x2d84] = 0xfe26, [0x2d85] = 0xfe27, +- [0x2d86] = 0xfe28, [0x2d87] = 0xfe29, [0x2d88] = 0xfe2a, [0x2d89] = 0xfe2b, +- [0x2d8a] = 0xfe2c, [0x2d8b] = 0xfe2d, [0x2d8c] = 0xfe2e, [0x2d8d] = 0xfe2f, +- [0x2d8e] = 0xfe32, [0x2d8f] = 0xfe45, [0x2d90] = 0xfe46, [0x2d91] = 0xfe47, +- [0x2d92] = 0xfe48, [0x2d93] = 0xfe53, [0x2d94] = 0xfe58, [0x2d95] = 0xfe67, +- [0x2d96] = 0xfe6c, [0x2d97] = 0xfe6d, [0x2d98] = 0xfe6e, [0x2d99] = 0xfe6f, +- [0x2d9a] = 0xfe70, [0x2d9b] = 0xfe71, [0x2d9c] = 0xfe72, [0x2d9d] = 0xfe73, +- [0x2d9e] = 0xfe74, [0x2d9f] = 0xfe75, [0x2da0] = 0xfe76, [0x2da1] = 0xfe77, +- [0x2da2] = 0xfe78, [0x2da3] = 0xfe79, [0x2da4] = 0xfe7a, [0x2da5] = 0xfe7b, +- [0x2da6] = 0xfe7c, [0x2da7] = 0xfe7d, [0x2da8] = 0xfe7e, [0x2da9] = 0xfe7f, +- [0x2daa] = 0xfe80, [0x2dab] = 0xfe81, [0x2dac] = 0xfe82, [0x2dad] = 0xfe83, +- [0x2dae] = 0xfe84, [0x2daf] = 0xfe85, [0x2db0] = 0xfe86, [0x2db1] = 0xfe87, +- [0x2db2] = 0xfe88, [0x2db3] = 0xfe89, [0x2db4] = 0xfe8a, [0x2db5] = 0xfe8b, +- [0x2db6] = 0xfe8c, [0x2db7] = 0xfe8d, [0x2db8] = 0xfe8e, [0x2db9] = 0xfe8f, +- [0x2dba] = 0xfe90, [0x2dbb] = 0xfe91, [0x2dbc] = 0xfe92, [0x2dbd] = 0xfe93, +- [0x2dbe] = 0xfe94, [0x2dbf] = 0xfe95, [0x2dc0] = 0xfe96, [0x2dc1] = 0xfe97, +- [0x2dc2] = 0xfe98, [0x2dc3] = 0xfe99, [0x2dc4] = 0xfe9a, [0x2dc5] = 0xfe9b, +- [0x2dc6] = 0xfe9c, [0x2dc7] = 0xfe9d, [0x2dc8] = 0xfe9e, [0x2dc9] = 0xfe9f, +- [0x2dca] = 0xfea0, [0x2dcb] = 0xfea1, [0x2dcc] = 0xfea2, [0x2dcd] = 0xfea3, +- [0x2dce] = 0xfea4, [0x2dcf] = 0xfea5, [0x2dd0] = 0xfea6, [0x2dd1] = 0xfea7, +- [0x2dd2] = 0xfea8, [0x2dd3] = 0xfea9, [0x2dd4] = 0xfeaa, [0x2dd5] = 0xfeab, +- [0x2dd6] = 0xfeac, [0x2dd7] = 0xfead, [0x2dd8] = 0xfeae, [0x2dd9] = 0xfeaf, +- [0x2dda] = 0xfeb0, [0x2ddb] = 0xfeb1, [0x2ddc] = 0xfeb2, [0x2ddd] = 0xfeb3, +- [0x2dde] = 0xfeb4, [0x2ddf] = 0xfeb5, [0x2de0] = 0xfeb6, [0x2de1] = 0xfeb7, +- [0x2de2] = 0xfeb8, [0x2de3] = 0xfeb9, [0x2de4] = 0xfeba, [0x2de5] = 0xfebb, +- [0x2de6] = 0xfebc, [0x2de7] = 0xfebd, [0x2de8] = 0xfebe, [0x2de9] = 0xfebf, +- [0x2dea] = 0xfec0, [0x2deb] = 0xfec1, [0x2dec] = 0xfec2, [0x2ded] = 0xfec3, +- [0x2dee] = 0xfec4, [0x2def] = 0xfec5, [0x2df0] = 0xfec6, [0x2df1] = 0xfec7, +- [0x2df2] = 0xfec8, [0x2df3] = 0xfec9, [0x2df4] = 0xfeca, [0x2df5] = 0xfecb, +- [0x2df6] = 0xfecc, [0x2df7] = 0xfecd, [0x2df8] = 0xfece, [0x2df9] = 0xfecf, +- [0x2dfa] = 0xfed0, [0x2dfb] = 0xfed1, [0x2dfc] = 0xfed2, [0x2dfd] = 0xfed3, +- [0x2dfe] = 0xfed4, [0x2dff] = 0xfed5, [0x2e00] = 0xfed6, [0x2e01] = 0xfed7, +- [0x2e02] = 0xfed8, [0x2e03] = 0xfed9, [0x2e04] = 0xfeda, [0x2e05] = 0xfedb, +- [0x2e06] = 0xfedc, [0x2e07] = 0xfedd, [0x2e08] = 0xfede, [0x2e09] = 0xfedf, +- [0x2e0a] = 0xfee0, [0x2e0b] = 0xfee1, [0x2e0c] = 0xfee2, [0x2e0d] = 0xfee3, +- [0x2e0e] = 0xfee4, [0x2e0f] = 0xfee5, [0x2e10] = 0xfee6, [0x2e11] = 0xfee7, +- [0x2e12] = 0xfee8, [0x2e13] = 0xfee9, [0x2e14] = 0xfeea, [0x2e15] = 0xfeeb, +- [0x2e16] = 0xfeec, [0x2e17] = 0xfeed, [0x2e18] = 0xfeee, [0x2e19] = 0xfeef, +- [0x2e1a] = 0xfef0, [0x2e1b] = 0xfef1, [0x2e1c] = 0xfef2, [0x2e1d] = 0xfef3, +- [0x2e1e] = 0xfef4, [0x2e1f] = 0xfef5, [0x2e20] = 0xfef6, [0x2e21] = 0xfef7, +- [0x2e22] = 0xfef8, [0x2e23] = 0xfef9, [0x2e24] = 0xfefa, [0x2e25] = 0xfefb, +- [0x2e26] = 0xfefc, [0x2e27] = 0xfefd, [0x2e28] = 0xfefe, [0x2e29] = 0xfeff, +- [0x2e2a] = 0xff00, [0x2e2b] = 0xff5f, [0x2e2c] = 0xff60, [0x2e2d] = 0xff61, +- [0x2e2e] = 0xff62, [0x2e2f] = 0xff63, [0x2e30] = 0xff64, [0x2e31] = 0xff65, +- [0x2e32] = 0xff66, [0x2e33] = 0xff67, [0x2e34] = 0xff68, [0x2e35] = 0xff69, +- [0x2e36] = 0xff6a, [0x2e37] = 0xff6b, [0x2e38] = 0xff6c, [0x2e39] = 0xff6d, +- [0x2e3a] = 0xff6e, [0x2e3b] = 0xff6f, [0x2e3c] = 0xff70, [0x2e3d] = 0xff71, +- [0x2e3e] = 0xff72, [0x2e3f] = 0xff73, [0x2e40] = 0xff74, [0x2e41] = 0xff75, +- [0x2e42] = 0xff76, [0x2e43] = 0xff77, [0x2e44] = 0xff78, [0x2e45] = 0xff79, +- [0x2e46] = 0xff7a, [0x2e47] = 0xff7b, [0x2e48] = 0xff7c, [0x2e49] = 0xff7d, +- [0x2e4a] = 0xff7e, [0x2e4b] = 0xff7f, [0x2e4c] = 0xff80, [0x2e4d] = 0xff81, +- [0x2e4e] = 0xff82, [0x2e4f] = 0xff83, [0x2e50] = 0xff84, [0x2e51] = 0xff85, +- [0x2e52] = 0xff86, [0x2e53] = 0xff87, [0x2e54] = 0xff88, [0x2e55] = 0xff89, +- [0x2e56] = 0xff8a, [0x2e57] = 0xff8b, [0x2e58] = 0xff8c, [0x2e59] = 0xff8d, +- [0x2e5a] = 0xff8e, [0x2e5b] = 0xff8f, [0x2e5c] = 0xff90, [0x2e5d] = 0xff91, +- [0x2e5e] = 0xff92, [0x2e5f] = 0xff93, [0x2e60] = 0xff94, [0x2e61] = 0xff95, +- [0x2e62] = 0xff96, [0x2e63] = 0xff97, [0x2e64] = 0xff98, [0x2e65] = 0xff99, +- [0x2e66] = 0xff9a, [0x2e67] = 0xff9b, [0x2e68] = 0xff9c, [0x2e69] = 0xff9d, +- [0x2e6a] = 0xff9e, [0x2e6b] = 0xff9f, [0x2e6c] = 0xffa0, [0x2e6d] = 0xffa1, +- [0x2e6e] = 0xffa2, [0x2e6f] = 0xffa3, [0x2e70] = 0xffa4, [0x2e71] = 0xffa5, +- [0x2e72] = 0xffa6, [0x2e73] = 0xffa7, [0x2e74] = 0xffa8, [0x2e75] = 0xffa9, +- [0x2e76] = 0xffaa, [0x2e77] = 0xffab, [0x2e78] = 0xffac, [0x2e79] = 0xffad, +- [0x2e7a] = 0xffae, [0x2e7b] = 0xffaf, [0x2e7c] = 0xffb0, [0x2e7d] = 0xffb1, +- [0x2e7e] = 0xffb2, [0x2e7f] = 0xffb3, [0x2e80] = 0xffb4, [0x2e81] = 0xffb5, +- [0x2e82] = 0xffb6, [0x2e83] = 0xffb7, [0x2e84] = 0xffb8, [0x2e85] = 0xffb9, +- [0x2e86] = 0xffba, [0x2e87] = 0xffbb, [0x2e88] = 0xffbc, [0x2e89] = 0xffbd, +- [0x2e8a] = 0xffbe, [0x2e8b] = 0xffbf, [0x2e8c] = 0xffc0, [0x2e8d] = 0xffc1, +- [0x2e8e] = 0xffc2, [0x2e8f] = 0xffc3, [0x2e90] = 0xffc4, [0x2e91] = 0xffc5, +- [0x2e92] = 0xffc6, [0x2e93] = 0xffc7, [0x2e94] = 0xffc8, [0x2e95] = 0xffc9, +- [0x2e96] = 0xffca, [0x2e97] = 0xffcb, [0x2e98] = 0xffcc, [0x2e99] = 0xffcd, +- [0x2e9a] = 0xffce, [0x2e9b] = 0xffcf, [0x2e9c] = 0xffd0, [0x2e9d] = 0xffd1, +- [0x2e9e] = 0xffd2, [0x2e9f] = 0xffd3, [0x2ea0] = 0xffd4, [0x2ea1] = 0xffd5, +- [0x2ea2] = 0xffd6, [0x2ea3] = 0xffd7, [0x2ea4] = 0xffd8, [0x2ea5] = 0xffd9, +- [0x2ea6] = 0xffda, [0x2ea7] = 0xffdb, [0x2ea8] = 0xffdc, [0x2ea9] = 0xffdd, +- [0x2eaa] = 0xffde, [0x2eab] = 0xffdf, ++ [0x2d6c] = 0xfe0e, [0x2d6d] = 0xfe0f, [0x2d6e] = 0xe78d, [0x2d6f] = 0xe78f, ++ [0x2d70] = 0xe78e, [0x2d71] = 0xe790, [0x2d72] = 0xe791, [0x2d73] = 0xe792, ++ [0x2d74] = 0xe793, [0x2d75] = 0xe794, [0x2d76] = 0xe795, [0x2d77] = 0xe796, ++ [0x2d78] = 0xfe1a, [0x2d79] = 0xfe1b, [0x2d7a] = 0xfe1c, [0x2d7b] = 0xfe1d, ++ [0x2d7c] = 0xfe1e, [0x2d7d] = 0xfe1f, [0x2d7e] = 0xfe20, [0x2d7f] = 0xfe21, ++ [0x2d80] = 0xfe22, [0x2d81] = 0xfe23, [0x2d82] = 0xfe24, [0x2d83] = 0xfe25, ++ [0x2d84] = 0xfe26, [0x2d85] = 0xfe27, [0x2d86] = 0xfe28, [0x2d87] = 0xfe29, ++ [0x2d88] = 0xfe2a, [0x2d89] = 0xfe2b, [0x2d8a] = 0xfe2c, [0x2d8b] = 0xfe2d, ++ [0x2d8c] = 0xfe2e, [0x2d8d] = 0xfe2f, [0x2d8e] = 0xfe32, [0x2d8f] = 0xfe45, ++ [0x2d90] = 0xfe46, [0x2d91] = 0xfe47, [0x2d92] = 0xfe48, [0x2d93] = 0xfe53, ++ [0x2d94] = 0xfe58, [0x2d95] = 0xfe67, [0x2d96] = 0xfe6c, [0x2d97] = 0xfe6d, ++ [0x2d98] = 0xfe6e, [0x2d99] = 0xfe6f, [0x2d9a] = 0xfe70, [0x2d9b] = 0xfe71, ++ [0x2d9c] = 0xfe72, [0x2d9d] = 0xfe73, [0x2d9e] = 0xfe74, [0x2d9f] = 0xfe75, ++ [0x2da0] = 0xfe76, [0x2da1] = 0xfe77, [0x2da2] = 0xfe78, [0x2da3] = 0xfe79, ++ [0x2da4] = 0xfe7a, [0x2da5] = 0xfe7b, [0x2da6] = 0xfe7c, [0x2da7] = 0xfe7d, ++ [0x2da8] = 0xfe7e, [0x2da9] = 0xfe7f, [0x2daa] = 0xfe80, [0x2dab] = 0xfe81, ++ [0x2dac] = 0xfe82, [0x2dad] = 0xfe83, [0x2dae] = 0xfe84, [0x2daf] = 0xfe85, ++ [0x2db0] = 0xfe86, [0x2db1] = 0xfe87, [0x2db2] = 0xfe88, [0x2db3] = 0xfe89, ++ [0x2db4] = 0xfe8a, [0x2db5] = 0xfe8b, [0x2db6] = 0xfe8c, [0x2db7] = 0xfe8d, ++ [0x2db8] = 0xfe8e, [0x2db9] = 0xfe8f, [0x2dba] = 0xfe90, [0x2dbb] = 0xfe91, ++ [0x2dbc] = 0xfe92, [0x2dbd] = 0xfe93, [0x2dbe] = 0xfe94, [0x2dbf] = 0xfe95, ++ [0x2dc0] = 0xfe96, [0x2dc1] = 0xfe97, [0x2dc2] = 0xfe98, [0x2dc3] = 0xfe99, ++ [0x2dc4] = 0xfe9a, [0x2dc5] = 0xfe9b, [0x2dc6] = 0xfe9c, [0x2dc7] = 0xfe9d, ++ [0x2dc8] = 0xfe9e, [0x2dc9] = 0xfe9f, [0x2dca] = 0xfea0, [0x2dcb] = 0xfea1, ++ [0x2dcc] = 0xfea2, [0x2dcd] = 0xfea3, [0x2dce] = 0xfea4, [0x2dcf] = 0xfea5, ++ [0x2dd0] = 0xfea6, [0x2dd1] = 0xfea7, [0x2dd2] = 0xfea8, [0x2dd3] = 0xfea9, ++ [0x2dd4] = 0xfeaa, [0x2dd5] = 0xfeab, [0x2dd6] = 0xfeac, [0x2dd7] = 0xfead, ++ [0x2dd8] = 0xfeae, [0x2dd9] = 0xfeaf, [0x2dda] = 0xfeb0, [0x2ddb] = 0xfeb1, ++ [0x2ddc] = 0xfeb2, [0x2ddd] = 0xfeb3, [0x2dde] = 0xfeb4, [0x2ddf] = 0xfeb5, ++ [0x2de0] = 0xfeb6, [0x2de1] = 0xfeb7, [0x2de2] = 0xfeb8, [0x2de3] = 0xfeb9, ++ [0x2de4] = 0xfeba, [0x2de5] = 0xfebb, [0x2de6] = 0xfebc, [0x2de7] = 0xfebd, ++ [0x2de8] = 0xfebe, [0x2de9] = 0xfebf, [0x2dea] = 0xfec0, [0x2deb] = 0xfec1, ++ [0x2dec] = 0xfec2, [0x2ded] = 0xfec3, [0x2dee] = 0xfec4, [0x2def] = 0xfec5, ++ [0x2df0] = 0xfec6, [0x2df1] = 0xfec7, [0x2df2] = 0xfec8, [0x2df3] = 0xfec9, ++ [0x2df4] = 0xfeca, [0x2df5] = 0xfecb, [0x2df6] = 0xfecc, [0x2df7] = 0xfecd, ++ [0x2df8] = 0xfece, [0x2df9] = 0xfecf, [0x2dfa] = 0xfed0, [0x2dfb] = 0xfed1, ++ [0x2dfc] = 0xfed2, [0x2dfd] = 0xfed3, [0x2dfe] = 0xfed4, [0x2dff] = 0xfed5, ++ [0x2e00] = 0xfed6, [0x2e01] = 0xfed7, [0x2e02] = 0xfed8, [0x2e03] = 0xfed9, ++ [0x2e04] = 0xfeda, [0x2e05] = 0xfedb, [0x2e06] = 0xfedc, [0x2e07] = 0xfedd, ++ [0x2e08] = 0xfede, [0x2e09] = 0xfedf, [0x2e0a] = 0xfee0, [0x2e0b] = 0xfee1, ++ [0x2e0c] = 0xfee2, [0x2e0d] = 0xfee3, [0x2e0e] = 0xfee4, [0x2e0f] = 0xfee5, ++ [0x2e10] = 0xfee6, [0x2e11] = 0xfee7, [0x2e12] = 0xfee8, [0x2e13] = 0xfee9, ++ [0x2e14] = 0xfeea, [0x2e15] = 0xfeeb, [0x2e16] = 0xfeec, [0x2e17] = 0xfeed, ++ [0x2e18] = 0xfeee, [0x2e19] = 0xfeef, [0x2e1a] = 0xfef0, [0x2e1b] = 0xfef1, ++ [0x2e1c] = 0xfef2, [0x2e1d] = 0xfef3, [0x2e1e] = 0xfef4, [0x2e1f] = 0xfef5, ++ [0x2e20] = 0xfef6, [0x2e21] = 0xfef7, [0x2e22] = 0xfef8, [0x2e23] = 0xfef9, ++ [0x2e24] = 0xfefa, [0x2e25] = 0xfefb, [0x2e26] = 0xfefc, [0x2e27] = 0xfefd, ++ [0x2e28] = 0xfefe, [0x2e29] = 0xfeff, [0x2e2a] = 0xff00, [0x2e2b] = 0xff5f, ++ [0x2e2c] = 0xff60, [0x2e2d] = 0xff61, [0x2e2e] = 0xff62, [0x2e2f] = 0xff63, ++ [0x2e30] = 0xff64, [0x2e31] = 0xff65, [0x2e32] = 0xff66, [0x2e33] = 0xff67, ++ [0x2e34] = 0xff68, [0x2e35] = 0xff69, [0x2e36] = 0xff6a, [0x2e37] = 0xff6b, ++ [0x2e38] = 0xff6c, [0x2e39] = 0xff6d, [0x2e3a] = 0xff6e, [0x2e3b] = 0xff6f, ++ [0x2e3c] = 0xff70, [0x2e3d] = 0xff71, [0x2e3e] = 0xff72, [0x2e3f] = 0xff73, ++ [0x2e40] = 0xff74, [0x2e41] = 0xff75, [0x2e42] = 0xff76, [0x2e43] = 0xff77, ++ [0x2e44] = 0xff78, [0x2e45] = 0xff79, [0x2e46] = 0xff7a, [0x2e47] = 0xff7b, ++ [0x2e48] = 0xff7c, [0x2e49] = 0xff7d, [0x2e4a] = 0xff7e, [0x2e4b] = 0xff7f, ++ [0x2e4c] = 0xff80, [0x2e4d] = 0xff81, [0x2e4e] = 0xff82, [0x2e4f] = 0xff83, ++ [0x2e50] = 0xff84, [0x2e51] = 0xff85, [0x2e52] = 0xff86, [0x2e53] = 0xff87, ++ [0x2e54] = 0xff88, [0x2e55] = 0xff89, [0x2e56] = 0xff8a, [0x2e57] = 0xff8b, ++ [0x2e58] = 0xff8c, [0x2e59] = 0xff8d, [0x2e5a] = 0xff8e, [0x2e5b] = 0xff8f, ++ [0x2e5c] = 0xff90, [0x2e5d] = 0xff91, [0x2e5e] = 0xff92, [0x2e5f] = 0xff93, ++ [0x2e60] = 0xff94, [0x2e61] = 0xff95, [0x2e62] = 0xff96, [0x2e63] = 0xff97, ++ [0x2e64] = 0xff98, [0x2e65] = 0xff99, [0x2e66] = 0xff9a, [0x2e67] = 0xff9b, ++ [0x2e68] = 0xff9c, [0x2e69] = 0xff9d, [0x2e6a] = 0xff9e, [0x2e6b] = 0xff9f, ++ [0x2e6c] = 0xffa0, [0x2e6d] = 0xffa1, [0x2e6e] = 0xffa2, [0x2e6f] = 0xffa3, ++ [0x2e70] = 0xffa4, [0x2e71] = 0xffa5, [0x2e72] = 0xffa6, [0x2e73] = 0xffa7, ++ [0x2e74] = 0xffa8, [0x2e75] = 0xffa9, [0x2e76] = 0xffaa, [0x2e77] = 0xffab, ++ [0x2e78] = 0xffac, [0x2e79] = 0xffad, [0x2e7a] = 0xffae, [0x2e7b] = 0xffaf, ++ [0x2e7c] = 0xffb0, [0x2e7d] = 0xffb1, [0x2e7e] = 0xffb2, [0x2e7f] = 0xffb3, ++ [0x2e80] = 0xffb4, [0x2e81] = 0xffb5, [0x2e82] = 0xffb6, [0x2e83] = 0xffb7, ++ [0x2e84] = 0xffb8, [0x2e85] = 0xffb9, [0x2e86] = 0xffba, [0x2e87] = 0xffbb, ++ [0x2e88] = 0xffbc, [0x2e89] = 0xffbd, [0x2e8a] = 0xffbe, [0x2e8b] = 0xffbf, ++ [0x2e8c] = 0xffc0, [0x2e8d] = 0xffc1, [0x2e8e] = 0xffc2, [0x2e8f] = 0xffc3, ++ [0x2e90] = 0xffc4, [0x2e91] = 0xffc5, [0x2e92] = 0xffc6, [0x2e93] = 0xffc7, ++ [0x2e94] = 0xffc8, [0x2e95] = 0xffc9, [0x2e96] = 0xffca, [0x2e97] = 0xffcb, ++ [0x2e98] = 0xffcc, [0x2e99] = 0xffcd, [0x2e9a] = 0xffce, [0x2e9b] = 0xffcf, ++ [0x2e9c] = 0xffd0, [0x2e9d] = 0xffd1, [0x2e9e] = 0xffd2, [0x2e9f] = 0xffd3, ++ [0x2ea0] = 0xffd4, [0x2ea1] = 0xffd5, [0x2ea2] = 0xffd6, [0x2ea3] = 0xffd7, ++ [0x2ea4] = 0xffd8, [0x2ea5] = 0xffd9, [0x2ea6] = 0xffda, [0x2ea7] = 0xffdb, ++ [0x2ea8] = 0xffdc, [0x2ea9] = 0xffdd, [0x2eaa] = 0xffde, [0x2eab] = 0xffdf, + }; + + /* Table for UCS-4 -> GB18030, for the range U+0080..U+9FBB. +@@ -23437,71 +23442,79 @@ static const unsigned char __ucs_to_gb18030_tab2[][2] = + [0x0783] = "\xa5\xfd", [0x0784] = "\xa5\xfe", [0x0785] = "\xa6\xb9", + [0x0786] = "\xa6\xba", [0x0787] = "\xa6\xbb", [0x0788] = "\xa6\xbc", + [0x0789] = "\xa6\xbd", [0x078a] = "\xa6\xbe", [0x078b] = "\xa6\xbf", +- [0x078c] = "\xa6\xc0", [0x0797] = "\xa6\xf6", [0x0798] = "\xa6\xf7", +- [0x0799] = "\xa6\xf8", [0x079a] = "\xa6\xf9", [0x079b] = "\xa6\xfa", +- [0x079c] = "\xa6\xfb", [0x079d] = "\xa6\xfc", [0x079e] = "\xa6\xfd", +- [0x079f] = "\xa6\xfe", [0x07a0] = "\xa7\xc2", [0x07a1] = "\xa7\xc3", +- [0x07a2] = "\xa7\xc4", [0x07a3] = "\xa7\xc5", [0x07a4] = "\xa7\xc6", +- [0x07a5] = "\xa7\xc7", [0x07a6] = "\xa7\xc8", [0x07a7] = "\xa7\xc9", +- [0x07a8] = "\xa7\xca", [0x07a9] = "\xa7\xcb", [0x07aa] = "\xa7\xcc", +- [0x07ab] = "\xa7\xcd", [0x07ac] = "\xa7\xce", [0x07ad] = "\xa7\xcf", +- [0x07ae] = "\xa7\xd0", [0x07af] = "\xa7\xf2", [0x07b0] = "\xa7\xf3", +- [0x07b1] = "\xa7\xf4", [0x07b2] = "\xa7\xf5", [0x07b3] = "\xa7\xf6", +- [0x07b4] = "\xa7\xf7", [0x07b5] = "\xa7\xf8", [0x07b6] = "\xa7\xf9", +- [0x07b7] = "\xa7\xfa", [0x07b8] = "\xa7\xfb", [0x07b9] = "\xa7\xfc", +- [0x07ba] = "\xa7\xfd", [0x07bb] = "\xa7\xfe", [0x07bc] = "\xa8\x96", +- [0x07bd] = "\xa8\x97", [0x07be] = "\xa8\x98", [0x07bf] = "\xa8\x99", +- [0x07c0] = "\xa8\x9a", [0x07c1] = "\xa8\x9b", [0x07c2] = "\xa8\x9c", +- [0x07c3] = "\xa8\x9d", [0x07c4] = "\xa8\x9e", [0x07c5] = "\xa8\x9f", +- [0x07c6] = "\xa8\xa0", [0x07c7] = "\x00\x01", [0x07c8] = "\x65\x9e", +- [0x07c9] = "\xa8\xc1", [0x07ca] = "\xa8\xc2", [0x07cb] = "\xa8\xc3", +- [0x07cc] = "\xa8\xc4", [0x07cd] = "\xa8\xea", [0x07ce] = "\xa8\xeb", +- [0x07cf] = "\xa8\xec", [0x07d0] = "\xa8\xed", [0x07d1] = "\xa8\xee", +- [0x07d2] = "\xa8\xef", [0x07d3] = "\xa8\xf0", [0x07d4] = "\xa8\xf1", +- [0x07d5] = "\xa8\xf2", [0x07d6] = "\xa8\xf3", [0x07d7] = "\xa8\xf4", +- [0x07d8] = "\xa8\xf5", [0x07d9] = "\xa8\xf6", [0x07da] = "\xa8\xf7", +- [0x07db] = "\xa8\xf8", [0x07dc] = "\xa8\xf9", [0x07dd] = "\xa8\xfa", +- [0x07de] = "\xa8\xfb", [0x07df] = "\xa8\xfc", [0x07e0] = "\xa8\xfd", +- [0x07e1] = "\xa8\xfe", [0x07e2] = "\xa9\x58", [0x07e3] = "\xa9\x5b", +- [0x07e4] = "\xa9\x5d", [0x07e5] = "\xa9\x5e", [0x07e6] = "\xa9\x5f", +- [0x07e7] = "\x65\x9f", [0x07e8] = "\x65\xa0", [0x07e9] = "\x65\xa1", +- [0x07ea] = "\x65\xa2", [0x07eb] = "\x65\xa3", [0x07ec] = "\x65\xa4", +- [0x07ed] = "\x65\xa5", [0x07ee] = "\x65\xa6", [0x07ef] = "\x65\xa7", +- [0x07f0] = "\x65\xa8", [0x07f1] = "\x65\xa9", [0x07f2] = "\x65\xaa", +- [0x07f3] = "\x65\xab", [0x07f4] = "\xa9\x97", [0x07f5] = "\xa9\x98", +- [0x07f6] = "\xa9\x99", [0x07f7] = "\xa9\x9a", [0x07f8] = "\xa9\x9b", +- [0x07f9] = "\xa9\x9c", [0x07fa] = "\xa9\x9d", [0x07fb] = "\xa9\x9e", +- [0x07fc] = "\xa9\x9f", [0x07fd] = "\xa9\xa0", [0x07fe] = "\xa9\xa1", +- [0x07ff] = "\xa9\xa2", [0x0800] = "\xa9\xa3", [0x0801] = "\xa9\xf0", +- [0x0802] = "\xa9\xf1", [0x0803] = "\xa9\xf2", [0x0804] = "\xa9\xf3", +- [0x0805] = "\xa9\xf4", [0x0806] = "\xa9\xf5", [0x0807] = "\xa9\xf6", +- [0x0808] = "\xa9\xf7", [0x0809] = "\xa9\xf8", [0x080a] = "\xa9\xf9", +- [0x080b] = "\xa9\xfa", [0x080c] = "\xa9\xfb", [0x080d] = "\xa9\xfc", +- [0x080e] = "\xa9\xfd", [0x080f] = "\xa9\xfe", [0x0810] = "\xd7\xfa", +- [0x0811] = "\xd7\xfb", [0x0812] = "\xd7\xfc", [0x0813] = "\xd7\xfd", +- [0x0814] = "\xd7\xfe", [0x0815] = "\x65\xac", [0x0819] = "\x65\xad", +- [0x081a] = "\x65\xae", [0x081b] = "\x65\xaf", [0x081c] = "\x65\xb0", +- [0x081d] = "\x65\xb1", [0x081f] = "\x65\xb2", [0x0820] = "\x65\xb3", +- [0x0821] = "\x65\xb4", [0x0822] = "\x65\xb5", [0x0823] = "\x65\xb6", +- [0x0824] = "\x65\xb7", [0x0825] = "\x65\xb8", [0x0827] = "\x65\xb9", ++ [0x078c] = "\xa6\xc0", [0x078d] = "\x7b\x84", [0x078e] = "\x7b\x86", ++ [0x078f] = "\x7b\x85", [0x0790] = "\x7b\x87", [0x0791] = "\x7b\x88", ++ [0x0792] = "\x7b\x89", [0x0793] = "\x7b\x8a", [0x0794] = "\x7b\x8b", ++ [0x0795] = "\x7b\x8c", [0x0796] = "\x7b\x8d", [0x0797] = "\xa6\xf6", ++ [0x0798] = "\xa6\xf7", [0x0799] = "\xa6\xf8", [0x079a] = "\xa6\xf9", ++ [0x079b] = "\xa6\xfa", [0x079c] = "\xa6\xfb", [0x079d] = "\xa6\xfc", ++ [0x079e] = "\xa6\xfd", [0x079f] = "\xa6\xfe", [0x07a0] = "\xa7\xc2", ++ [0x07a1] = "\xa7\xc3", [0x07a2] = "\xa7\xc4", [0x07a3] = "\xa7\xc5", ++ [0x07a4] = "\xa7\xc6", [0x07a5] = "\xa7\xc7", [0x07a6] = "\xa7\xc8", ++ [0x07a7] = "\xa7\xc9", [0x07a8] = "\xa7\xca", [0x07a9] = "\xa7\xcb", ++ [0x07aa] = "\xa7\xcc", [0x07ab] = "\xa7\xcd", [0x07ac] = "\xa7\xce", ++ [0x07ad] = "\xa7\xcf", [0x07ae] = "\xa7\xd0", [0x07af] = "\xa7\xf2", ++ [0x07b0] = "\xa7\xf3", [0x07b1] = "\xa7\xf4", [0x07b2] = "\xa7\xf5", ++ [0x07b3] = "\xa7\xf6", [0x07b4] = "\xa7\xf7", [0x07b5] = "\xa7\xf8", ++ [0x07b6] = "\xa7\xf9", [0x07b7] = "\xa7\xfa", [0x07b8] = "\xa7\xfb", ++ [0x07b9] = "\xa7\xfc", [0x07ba] = "\xa7\xfd", [0x07bb] = "\xa7\xfe", ++ [0x07bc] = "\xa8\x96", [0x07bd] = "\xa8\x97", [0x07be] = "\xa8\x98", ++ [0x07bf] = "\xa8\x99", [0x07c0] = "\xa8\x9a", [0x07c1] = "\xa8\x9b", ++ [0x07c2] = "\xa8\x9c", [0x07c3] = "\xa8\x9d", [0x07c4] = "\xa8\x9e", ++ [0x07c5] = "\xa8\x9f", [0x07c6] = "\xa8\xa0", [0x07c7] = "\x00\x01", ++ [0x07c8] = "\x65\x9e", [0x07c9] = "\xa8\xc1", [0x07ca] = "\xa8\xc2", ++ [0x07cb] = "\xa8\xc3", [0x07cc] = "\xa8\xc4", [0x07cd] = "\xa8\xea", ++ [0x07ce] = "\xa8\xeb", [0x07cf] = "\xa8\xec", [0x07d0] = "\xa8\xed", ++ [0x07d1] = "\xa8\xee", [0x07d2] = "\xa8\xef", [0x07d3] = "\xa8\xf0", ++ [0x07d4] = "\xa8\xf1", [0x07d5] = "\xa8\xf2", [0x07d6] = "\xa8\xf3", ++ [0x07d7] = "\xa8\xf4", [0x07d8] = "\xa8\xf5", [0x07d9] = "\xa8\xf6", ++ [0x07da] = "\xa8\xf7", [0x07db] = "\xa8\xf8", [0x07dc] = "\xa8\xf9", ++ [0x07dd] = "\xa8\xfa", [0x07de] = "\xa8\xfb", [0x07df] = "\xa8\xfc", ++ [0x07e0] = "\xa8\xfd", [0x07e1] = "\xa8\xfe", [0x07e2] = "\xa9\x58", ++ [0x07e3] = "\xa9\x5b", [0x07e4] = "\xa9\x5d", [0x07e5] = "\xa9\x5e", ++ [0x07e6] = "\xa9\x5f", [0x07e7] = "\x65\x9f", [0x07e8] = "\x65\xa0", ++ [0x07e9] = "\x65\xa1", [0x07ea] = "\x65\xa2", [0x07eb] = "\x65\xa3", ++ [0x07ec] = "\x65\xa4", [0x07ed] = "\x65\xa5", [0x07ee] = "\x65\xa6", ++ [0x07ef] = "\x65\xa7", [0x07f0] = "\x65\xa8", [0x07f1] = "\x65\xa9", ++ [0x07f2] = "\x65\xaa", [0x07f3] = "\x65\xab", [0x07f4] = "\xa9\x97", ++ [0x07f5] = "\xa9\x98", [0x07f6] = "\xa9\x99", [0x07f7] = "\xa9\x9a", ++ [0x07f8] = "\xa9\x9b", [0x07f9] = "\xa9\x9c", [0x07fa] = "\xa9\x9d", ++ [0x07fb] = "\xa9\x9e", [0x07fc] = "\xa9\x9f", [0x07fd] = "\xa9\xa0", ++ [0x07fe] = "\xa9\xa1", [0x07ff] = "\xa9\xa2", [0x0800] = "\xa9\xa3", ++ [0x0801] = "\xa9\xf0", [0x0802] = "\xa9\xf1", [0x0803] = "\xa9\xf2", ++ [0x0804] = "\xa9\xf3", [0x0805] = "\xa9\xf4", [0x0806] = "\xa9\xf5", ++ [0x0807] = "\xa9\xf6", [0x0808] = "\xa9\xf7", [0x0809] = "\xa9\xf8", ++ [0x080a] = "\xa9\xf9", [0x080b] = "\xa9\xfa", [0x080c] = "\xa9\xfb", ++ [0x080d] = "\xa9\xfc", [0x080e] = "\xa9\xfd", [0x080f] = "\xa9\xfe", ++ [0x0810] = "\xd7\xfa", [0x0811] = "\xd7\xfb", [0x0812] = "\xd7\xfc", ++ [0x0813] = "\xd7\xfd", [0x0814] = "\xd7\xfe", [0x0815] = "\x65\xac", ++ [0x0816] = "\xfe\x51", [0x0817] = "\xfe\x52", [0x0818] = "\xfe\x53", ++ [0x0819] = "\x65\xad", [0x081a] = "\x65\xae", [0x081b] = "\x65\xaf", ++ [0x081c] = "\x65\xb0", [0x081d] = "\x65\xb1", [0x081e] = "\x2d\x51", ++ [0x081f] = "\x65\xb2", [0x0820] = "\x65\xb3", [0x0821] = "\x65\xb4", ++ [0x0822] = "\x65\xb5", [0x0823] = "\x65\xb6", [0x0824] = "\x65\xb7", ++ [0x0825] = "\x65\xb8", [0x0826] = "\x2d\x52", [0x0827] = "\x65\xb9", + [0x0828] = "\x65\xba", [0x0829] = "\x65\xbb", [0x082a] = "\x65\xbc", +- [0x082d] = "\x65\xbd", [0x082e] = "\x65\xbe", [0x082f] = "\x65\xbf", +- [0x0830] = "\x65\xc0", [0x0833] = "\x65\xc1", [0x0834] = "\x65\xc2", +- [0x0835] = "\x65\xc3", [0x0836] = "\x65\xc4", [0x0837] = "\x65\xc5", +- [0x0838] = "\x65\xc6", [0x0839] = "\x65\xc7", [0x083a] = "\x65\xc8", +- [0x083c] = "\x65\xc9", [0x083d] = "\x65\xca", [0x083e] = "\x65\xcb", +- [0x083f] = "\x65\xcc", [0x0840] = "\x65\xcd", [0x0841] = "\x65\xce", +- [0x0842] = "\x65\xcf", [0x0844] = "\x65\xd0", [0x0845] = "\x65\xd1", ++ [0x082b] = "\x2d\x53", [0x082c] = "\x2d\x54", [0x082d] = "\x65\xbd", ++ [0x082e] = "\x65\xbe", [0x082f] = "\x65\xbf", [0x0830] = "\x65\xc0", ++ [0x0831] = "\xfe\x6c", [0x0832] = "\x2d\x55", [0x0833] = "\x65\xc1", ++ [0x0834] = "\x65\xc2", [0x0835] = "\x65\xc3", [0x0836] = "\x65\xc4", ++ [0x0837] = "\x65\xc5", [0x0838] = "\x65\xc6", [0x0839] = "\x65\xc7", ++ [0x083a] = "\x65\xc8", [0x083b] = "\xfe\x76", [0x083c] = "\x65\xc9", ++ [0x083d] = "\x65\xca", [0x083e] = "\x65\xcb", [0x083f] = "\x65\xcc", ++ [0x0840] = "\x65\xcd", [0x0841] = "\x65\xce", [0x0842] = "\x65\xcf", ++ [0x0843] = "\x2d\x56", [0x0844] = "\x65\xd0", [0x0845] = "\x65\xd1", + [0x0846] = "\x65\xd2", [0x0847] = "\x65\xd3", [0x0848] = "\x65\xd4", + [0x0849] = "\x65\xd5", [0x084a] = "\x65\xd6", [0x084b] = "\x65\xd7", + [0x084c] = "\x65\xd8", [0x084d] = "\x65\xd9", [0x084e] = "\x65\xda", + [0x084f] = "\x65\xdb", [0x0850] = "\x65\xdc", [0x0851] = "\x65\xdd", +- [0x0852] = "\x65\xde", [0x0853] = "\x65\xdf", [0x0856] = "\x65\xe0", +- [0x0857] = "\x65\xe1", [0x0858] = "\x65\xe2", [0x0859] = "\x65\xe3", +- [0x085a] = "\x65\xe4", [0x085b] = "\x65\xe5", [0x085c] = "\x65\xe6", +- [0x085d] = "\x65\xe7", [0x085e] = "\x65\xe8", [0x085f] = "\x65\xe9", +- [0x0860] = "\x65\xea", [0x0861] = "\x65\xeb", [0x0862] = "\x65\xec", +- [0x0863] = "\x65\xed", [0x0865] = "\xfd\x9c", [0x0866] = "\x76\xb5", ++ [0x0852] = "\x65\xde", [0x0853] = "\x65\xdf", [0x0854] = "\x2d\x57", ++ [0x0855] = "\xfe\x91", [0x0856] = "\x65\xe0", [0x0857] = "\x65\xe1", ++ [0x0858] = "\x65\xe2", [0x0859] = "\x65\xe3", [0x085a] = "\x65\xe4", ++ [0x085b] = "\x65\xe5", [0x085c] = "\x65\xe6", [0x085d] = "\x65\xe7", ++ [0x085e] = "\x65\xe8", [0x085f] = "\x65\xe9", [0x0860] = "\x65\xea", ++ [0x0861] = "\x65\xeb", [0x0862] = "\x65\xec", [0x0863] = "\x65\xed", ++ [0x0864] = "\x2d\x58", [0x0865] = "\xfd\x9c", [0x0866] = "\x76\xb5", + [0x0867] = "\x76\xb6", [0x0868] = "\x76\xb7", [0x0869] = "\x76\xb8", + [0x086a] = "\x76\xb9", [0x086b] = "\x76\xba", [0x086c] = "\x76\xbb", + [0x086d] = "\x76\xbc", [0x086e] = "\x76\xbd", [0x086f] = "\x76\xbe", +@@ -24211,24 +24224,8 @@ static const unsigned char __ucs_to_gb18030_tab2[][2] = + || (ch = __twobyte_to_ucs[idx], \ + ch == 0 && *inptr != '\0')) \ + { \ +- /* Handle a few special cases. */ \ +- if (idx == 0x5dd1) \ +- ch = 0x20087; \ +- else if (idx == 0x5dd2) \ +- ch = 0x20089; \ +- else if (idx == 0x5dd3) \ +- ch = 0x200cc; \ +- else if (idx == 0x5dec) \ +- ch = 0x215D7; \ +- else if (idx == 0x5df6) \ +- ch = 0x2298F; \ +- else if (idx == 0x5e11) \ +- ch = 0x241FE; \ +- else \ +- { \ +- /* This is an illegal character. */ \ +- STANDARD_FROM_LOOP_ERR_HANDLER (2); \ +- } \ ++ /* This is an illegal character. */ \ ++ STANDARD_FROM_LOOP_ERR_HANDLER (2); \ + } \ + \ + inptr += 2; \ +@@ -24320,17 +24317,35 @@ static const unsigned char __ucs_to_gb18030_tab2[][2] = + len = 4; \ + } \ + else if (ch == 0x20087) \ +- cp = (const unsigned char *) "\xfe\x51"; \ ++ { \ ++ idx = 0x3E2CF; \ ++ len = 4; \ ++ } \ + else if (ch == 0x20089) \ +- cp = (const unsigned char *) "\xfe\x52"; \ ++ { \ ++ idx = 0x3E2D1; \ ++ len = 4; \ ++ } \ + else if (ch == 0x200CC) \ +- cp = (const unsigned char *) "\xfe\x53"; \ ++ { \ ++ idx = 0x3E314; \ ++ len = 4; \ ++ } \ + else if (ch == 0x215d7) \ +- cp = (const unsigned char *) "\xfe\x6c"; \ ++ { \ ++ idx = 0x3F81F; \ ++ len = 4; \ ++ } \ + else if (ch == 0x2298F) \ +- cp = (const unsigned char *) "\xfe\x76"; \ ++ { \ ++ idx = 0x40BD7; \ ++ len = 4; \ ++ } \ + else if (ch == 0x241FE) \ +- cp = (const unsigned char *) "\xfe\x91"; \ ++ { \ ++ idx = 0x42446; \ ++ len = 4; \ ++ } \ + else if (ch >= 0x10000 && ch <= 0x10FFFF) \ + { \ + idx = ch + 0x1E248; \ +diff --git a/iconvdata/tst-table-from.c b/iconvdata/tst-table-from.c +index 09aaaf0942..55a7113d8c 100644 +--- a/iconvdata/tst-table-from.c ++++ b/iconvdata/tst-table-from.c +@@ -194,10 +194,9 @@ main (int argc, char *argv[]) + exit (1); + } + +- /* When testing UTF-8 or GB18030, stop at 0x10000, otherwise the output ++ /* When testing UTF-8, stop at 0x10000, otherwise the output + file gets too big. */ +- bmp_only = (strcmp (charset, "UTF-8") == 0 +- || strcmp (charset, "GB18030") == 0); ++ bmp_only = (strcmp (charset, "UTF-8") == 0); + search_depth = (strcmp (charset, "UTF-8") == 0 ? 3 : 4); + + { +diff --git a/iconvdata/tst-table-to.c b/iconvdata/tst-table-to.c +index 4dec4acad1..2b75f0c6e8 100644 +--- a/iconvdata/tst-table-to.c ++++ b/iconvdata/tst-table-to.c +@@ -32,6 +32,7 @@ main (int argc, char *argv[]) + const char *charset; + iconv_t cd; + int bmp_only; ++ int no_tags; + + if (argc != 2) + { +@@ -47,16 +48,19 @@ main (int argc, char *argv[]) + return 1; + } + +- /* When testing UTF-8 or GB18030, stop at 0x10000, otherwise the output ++ /* When testing UTF-8, stop at 0x10000, otherwise the output + file gets too big. */ +- bmp_only = (strcmp (charset, "UTF-8") == 0 ++ bmp_only = (strcmp (charset, "UTF-8") == 0); ++ /* When testing any encoding other than UTF-8 or GB18030, stop at 0xE0000, ++ because the conversion drops Unicode tag characters (range ++ U+E0000..U+E007F). */ ++ no_tags = !(strcmp (charset, "UTF-8") == 0 + || strcmp (charset, "GB18030") == 0); + + { + unsigned int i; + unsigned char buf[10]; +- +- for (i = 0; i < (bmp_only ? 0x10000 : 0x30000); i++) ++ for (i = 0; i < (bmp_only ? 0x10000 : no_tags ? 0xE0000 : 0x110000); i++) + { + unsigned char in[6]; + unsigned int incount = +diff --git a/iconvdata/tst-table.sh b/iconvdata/tst-table.sh +index bc6f542b24..7ba15bbf5c 100755 +--- a/iconvdata/tst-table.sh ++++ b/iconvdata/tst-table.sh +@@ -37,7 +37,8 @@ set -e + < ../localedata/charmaps/${charmap:-$charset} \ + > ${objpfx}tst-${charset}.charmap.table + # When the charset is GB18030, truncate this table because for this encoding, +-# the tst-table-from and tst-table-to programs scan the Unicode BMP only. ++# the charmap contains ranges (.. notation), which the ++# tst-table-charmap.sh script does not grok. + if test ${charset} = GB18030; then + grep '0x....$' < ${objpfx}tst-${charset}.charmap.table \ + > ${objpfx}tst-${charset}.truncated.table +@@ -73,25 +74,42 @@ diff ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.inverse.table + + # Check 1: charmap and iconv forward should be identical, except for + # precomposed characters. +-if test -f ${precomposed}; then +- cat ${objpfx}tst-${charset}.table ${precomposed} | sort | uniq -u \ +- > ${objpfx}tst-${charset}.tmp.table +- cmp -s ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.tmp.table || ++{ if test -f ${precomposed}; then ++ cat ${objpfx}tst-${charset}.table ${precomposed} | sort | uniq -u ++ else ++ cat ${objpfx}tst-${charset}.table ++ fi ++} | { if test ${charset} = GB18030; then grep '0x....$'; else cat; fi; } \ ++ > ${objpfx}tst-${charset}.tmp1.table ++cmp -s ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.tmp1.table || + exit 1 +-else +- cmp -s ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.table || +- exit 1 +-fi + + # Check 2: the difference between the charmap and iconv backward. +-if test -f ${irreversible}; then +- cat ${objpfx}tst-${charset}.charmap.table ${irreversible} | sort | uniq -u \ +- > ${objpfx}tst-${charset}.tmp.table +- cmp -s ${objpfx}tst-${charset}.tmp.table ${objpfx}tst-${charset}.inverse.table || +- exit 1 +-else +- cmp -s ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.inverse.table || ++{ if test -f ${irreversible}; then ++ cat ${objpfx}tst-${charset}.charmap.table ${irreversible} | sort | uniq -u ++ else ++ cat ${objpfx}tst-${charset}.charmap.table ++ fi ++} | { if test ${charset} = GB18030; then grep '0x....$'; else cat; fi; } \ ++ > ${objpfx}tst-${charset}.tmp2c.table ++cat ${objpfx}tst-${charset}.inverse.table \ ++ | { if test ${charset} = GB18030; then grep '0x....$'; else cat; fi; } \ ++ > ${objpfx}tst-${charset}.tmp2i.table ++cmp -s ${objpfx}tst-${charset}.tmp2c.table ${objpfx}tst-${charset}.tmp2i.table || + exit 1 ++ ++# Check 3: the difference between iconv forward and iconv backward. This is ++# necessary only for GB18030, because ${objpfx}tst-${charset}.charmap.table ++# is truncated for this encoding (see above). ++if test ${charset} = GB18030; then ++ { if test -f ${irreversible}; then ++ cat ${objpfx}tst-${charset}.table ${irreversible} | sort | uniq -u ++ else ++ cat ${objpfx}tst-${charset}.table ++ fi ++ } > ${objpfx}tst-${charset}.tmp3.table ++ cmp -s ${objpfx}tst-${charset}.tmp3.table ${objpfx}tst-${charset}.inverse.table || ++ exit 1 + fi + + exit 0 +diff --git a/localedata/charmaps/GB18030 b/localedata/charmaps/GB18030 +index ad6728c5bd..fc3b1d2d40 100644 +--- a/localedata/charmaps/GB18030 ++++ b/localedata/charmaps/GB18030 +@@ -57234,32 +57234,16 @@ CHARMAP + /xa6/xbe + /xa6/xbf + /xa6/xc0 +-% The newest GB 18030-2005 standard still uses some private use area +-% code points. Any implementation which has Unicode 4.1 or newer +-% support should not use these PUA code points, and instead should +-% map these entries to their equivalent non-PUA code points. There +-% are 24 idiograms in GB 18030-2005 which have non-PUA equivalents. +-% In glibc we only support roundtrip code points, and so must choose +-% between supporting the old PUA code points, or using the newer +-% non-PUA code points. We choose to use the non-PUA code points to +-% be compatible with ICU's similar choice. In choosing the non-PUA +-% code points we can no longer convert the old PUA code points back +-% to GB-18030-2005 (technically only fixable if we added support +-% for non-roundtrip code points e.g. ICU's "fallback mapping"). +-% The recommendation to use the non-PUA code points, where available, +-% is based on "CJKV Information Processing" 2nd Ed. by Dr. Ken Lunde. +-% +-% These 10 PUA mappings use equivalents from to . +-% /xa6/xd9 +-% /xa6/xda +-% /xa6/xdb +-% /xa6/xdc +-% /xa6/xdd +-% /xa6/xde +-% /xa6/xdf +-% /xa6/xec +-% /xa6/xed +-% /xa6/xf3 ++ /x84/x31/x82/x36 ++ /x84/x31/x82/x38 ++ /x84/x31/x82/x37 ++ /x84/x31/x82/x39 ++ /x84/x31/x83/x30 ++ /x84/x31/x83/x31 ++ /x84/x31/x83/x32 ++ /x84/x31/x83/x33 ++ /x84/x31/x83/x34 ++ /x84/x31/x83/x35 + /xa6/xf6 + /xa6/xf7 + /xa6/xf8 +@@ -57387,17 +57371,15 @@ CHARMAP + /xd7/xfd + /xd7/xfe + /x83/x36/xc9/x34 +-% These 3 PUA mappings use equivalents , and . +-% /xfe/x51 +-% /xfe/x52 +-% /xfe/x53 ++ /xfe/x51 ++ /xfe/x52 ++ /xfe/x53 + /x83/x36/xc9/x35 + /x83/x36/xc9/x36 + /x83/x36/xc9/x37 + /x83/x36/xc9/x38 + /x83/x36/xc9/x39 +-% This 1 PUA mapping uses the equivalent . +-% /xfe/x59 ++ /x82/x35/x90/x37 + /x83/x36/xca/x30 + /x83/x36/xca/x31 + /x83/x36/xca/x32 +@@ -57405,22 +57387,19 @@ CHARMAP + /x83/x36/xca/x34 + /x83/x36/xca/x35 + /x83/x36/xca/x36 +-% This 1 PUA mapping uses the equivalent . +-% /xfe/x61 ++ /x82/x35/x90/x38 + /x83/x36/xca/x37 + /x83/x36/xca/x38 + /x83/x36/xca/x39 + /x83/x36/xcb/x30 +-% These 2 PUA mappings use the equivalents and . +-% /xfe/x66 +-% /xfe/x67 ++ /x82/x35/x90/x39 ++ /x82/x35/x91/x30 + /x83/x36/xcb/x31 + /x83/x36/xcb/x32 + /x83/x36/xcb/x33 + /x83/x36/xcb/x34 +-% These 2 PUA mappings use the equivalents and . +-% /xfe/x6c +-% /xfe/x6d ++ /xfe/x6c ++ /x82/x35/x91/x31 + /x83/x36/xcb/x35 + /x83/x36/xcb/x36 + /x83/x36/xcb/x37 +@@ -57429,8 +57408,7 @@ CHARMAP + /x83/x36/xcc/x30 + /x83/x36/xcc/x31 + /x83/x36/xcc/x32 +-% This 1 PUA mapping uses the equivalent . +-% /xfe/x76 ++ /xfe/x76 + /x83/x36/xcc/x33 + /x83/x36/xcc/x34 + /x83/x36/xcc/x35 +@@ -57438,8 +57416,7 @@ CHARMAP + /x83/x36/xcc/x37 + /x83/x36/xcc/x38 + /x83/x36/xcc/x39 +-% This 1 PUA mapping uses the equivalent . +-% /xfe/x7e ++ /x82/x35/x91/x32 + /x83/x36/xcd/x30 + /x83/x36/xcd/x31 + /x83/x36/xcd/x32 +@@ -57456,9 +57433,8 @@ CHARMAP + /x83/x36/xce/x33 + /x83/x36/xce/x34 + /x83/x36/xce/x35 +-% These 2 PUA mappings use the equivalents and . +-% /xfe/x90 +-% /xfe/x91 ++ /x82/x35/x91/x33 ++ /xfe/x91 + /x83/x36/xce/x36 + /x83/x36/xce/x37 + /x83/x36/xce/x38 +@@ -57473,8 +57449,7 @@ CHARMAP + /x83/x36/xcf/x37 + /x83/x36/xcf/x38 + /x83/x36/xcf/x39 +-% This 1 PUA mapping uses the equivalent . +-% /xfe/xa0 ++ /x82/x35/x91/x34 + /x83/x36/xd0/x30 + /x83/x36/xd0/x31 + /x83/x36/xd0/x32 +@@ -70447,19 +70422,14 @@ CHARMAP + .. /x95/x32/x8d/x30 + .. /x95/x32/x8e/x30 + .. /x95/x32/x8f/x30 +- /x95/x32/x90/x30 +- /xfe/x51 +- /x95/x32/x90/x32 +- /xfe/x52 +-.. /x95/x32/x90/x34 ++.. /x95/x32/x90/x30 + .. /x95/x32/x91/x30 + .. /x95/x32/x92/x30 + .. /x95/x32/x93/x30 + .. /x95/x32/x94/x30 + .. /x95/x32/x95/x30 + .. /x95/x32/x96/x30 +- /xfe/x53 +-.. /x95/x32/x97/x31 ++.. /x95/x32/x97/x30 + .. /x95/x32/x98/x30 + .. /x95/x32/x99/x30 + .. /x95/x32/x9a/x30 +@@ -70998,8 +70968,7 @@ CHARMAP + .. /x95/x36/xb7/x30 + .. /x95/x36/xb8/x30 + .. /x95/x36/xb9/x30 +- /xfe/x6c +-.. /x95/x36/xb9/x38 ++.. /x95/x36/xb9/x37 + .. /x95/x36/xba/x30 + .. /x95/x36/xbb/x30 + .. /x95/x36/xbc/x30 +@@ -71505,8 +71474,7 @@ CHARMAP + .. /x96/x30/xb8/x30 + .. /x96/x30/xb9/x30 + .. /x96/x30/xba/x30 +- /xfe/x76 +-.. /x96/x30/xba/x36 ++.. /x96/x30/xba/x35 + .. /x96/x30/xbb/x30 + .. /x96/x30/xbc/x30 + .. /x96/x30/xbd/x30 +@@ -72132,8 +72100,7 @@ CHARMAP + .. /x96/x35/xb3/x30 + .. /x96/x35/xb4/x30 + .. /x96/x35/xb5/x30 +- /xfe/x91 +-.. /x96/x35/xb6/x31 ++.. /x96/x35/xb6/x30 + .. /x96/x35/xb7/x30 + .. /x96/x35/xb8/x30 + .. /x96/x35/xb9/x30 diff --git a/SPECS/glibc.spec b/SPECS/glibc.spec index e80d62f..6565cf1 100644 --- a/SPECS/glibc.spec +++ b/SPECS/glibc.spec @@ -55,12 +55,6 @@ %undefine with_docs %undefine with_valgrind %endif -############################################################################## -# Auxiliary arches are those arches that can be built in addition -# to the core supported arches. You either install an auxarch or -# you install the base arch, not both. You would do this in order -# to provide a more optimized version of the package for your arch. -%define auxarches athlon alphaev6 # Only some architectures have static PIE support. %define pie_arches %{ix86} x86_64 @@ -75,17 +69,6 @@ # RHEL 8 does not have a working %%dnl macro. %define comment() %{nil} -############################################################################## -# Any architecture/kernel combination that supports running 32-bit and 64-bit -# code in userspace is considered a biarch arch. -%define biarcharches %{ix86} x86_64 %{power64} s390 s390x -############################################################################## -# If the debug information is split into two packages, the core debuginfo -# pacakge and the common debuginfo package then the arch should be listed -# here. If the arch is not listed here then a single core debuginfo package -# will be created for the architecture. -%define debuginfocommonarches %{biarcharches} alpha alphaev6 - ############################################################################## # Utility functions for pre/post scripts. Stick them at the beginning of # any lua %pre, %post, %postun, etc. sections to have them expand into @@ -132,7 +115,7 @@ end \ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: %{glibcrelease}.5 +Release: %{glibcrelease}.11 # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -193,6 +176,70 @@ rpm.define("__find_debuginfo " .. wrapper .. " " .. sysroot .. " " .. original) %define _no_recompute_build_ids 1 %undefine _unique_build_ids +# glibc_ldso: ABI-specific program interpreter name. Used for debuginfo +# extraction (wrap-find-debuginfo.sh) and smoke testing ($run_ldso below). +# glibc_has_libnldbl: libnldbl_nonshared.a is built and installed. +# glibc_has_libmvec: libmvec is built and installed. +%ifarch %{ix86} +%global glibc_ldso /lib/ld-linux.so.2 +%global glibc_has_libnldbl 0 +%global glibc_has_libmvec 0 +%endif +%ifarch aarch64 +%global glibc_ldso /lib/ld-linux-aarch64.so.1 +%global glibc_has_libnldbl 0 +%global glibc_has_libmvec 0 +%endif +%ifarch ppc +%global glibc_ldso /lib/ld.so.1 +%global glibc_has_libnldbl 1 +%global glibc_has_libmvec 0 +%endif +%ifarch ppc64 +%global glibc_ldso /lib64/ld64.so.1 +%global glibc_has_libnldbl 1 +%global glibc_has_libmvec 0 +%endif +%ifarch ppc64le +%global glibc_ldso /lib64/ld64.so.2 +%global glibc_has_libnldbl 1 +%global glibc_has_libmvec 0 +%endif +%ifarch riscv64 +%global glibc_ldso /lib/ld-linux-riscv64-lp64d.so.1 +%global glibc_has_libnldbl 0 +%global glibc_has_libmvec 0 +%endif +%ifarch s390 +%global glibc_ldso /lib/ld.so.1 +%global glibc_has_libnldbl 0 +%global glibc_has_libmvec 0 +%endif +%ifarch s390x +%global glibc_ldso /lib/ld64.so.1 +%global glibc_has_libnldbl 1 +%global glibc_has_libmvec 0 +%endif +%ifarch x86_64 x86_64_v2 x86_64_v3 x86_64_v4 +%global glibc_ldso /lib64/ld-linux-x86-64.so.2 +%global glibc_has_libnldbl 0 +%global glibc_has_libmvec 1 +%endif + +# This is necessary to enable source RPM building under noarch, as +# used by some build environments. +%ifarch noarch +%global glibc_ldso /lib/ld.so +%global glibc_has_libnldbl 0 +%global glibc_has_libmvec 0 +%endif + +# If the architecture places the official ld.so name under /lib, +# but we use /lib64, we need to install both files. +%if "%{_lib}" == "lib64" && "%{dirname:%{glibc_ldso}}" == "/lib" +%global glibc_ldso_alternate %{_libdir}/%{basename:%{glibc_ldso}} +%endif + ############################################################################## # Patches: # - See each individual patch file for origin and upstream status. @@ -1195,12 +1242,32 @@ Patch1007: glibc-RHEL-39994-2.patch Patch1008: glibc-RHEL-36147-1.patch Patch1009: glibc-RHEL-36147-2.patch Patch1010: glibc-RHEL-36147-3.patch +Patch1011: glibc-RHEL-49490-1.patch +Patch1012: glibc-RHEL-49490-2.patch +Patch1013: glibc-RHEL-61255.patch +Patch1014: glibc-RHEL-61259-1.patch +Patch1015: glibc-RHEL-61259-2.patch +Patch1016: glibc-RHEL-67806.patch ############################################################################## # Continued list of core "glibc" package information: ############################################################################## Obsoletes: glibc-profile < 2.4 Provides: ldconfig +Provides: /sbin/ldconfig +# Historic file paths provided for backwards compatibility. +Provides: %{glibc_ldso} +%if %{defined glibc_ldso_alternate} +Provides: %{glibc_ldso_alternate} +%endif +Provides: /%{_lib}/libanl.so.1 +Provides: /%{_lib}/libc.so.6 +Provides: /%{_lib}/libdl.so.2 +Provides: /%{_lib}/libm.so.6 +Provides: /%{_lib}/libpthread.so.0 +Provides: /%{_lib}/libresolv.so.2 +Provides: /%{_lib}/librt.so.1 +Provides: /%{_lib}/libutil.so.1 # The dynamic linker supports DT_GNU_HASH Provides: rtld(GNU_HASH) @@ -1552,10 +1619,7 @@ Supplements: (glibc and (]]..suppl..[[)) The glibc-langpack-]]..lang..[[ package includes the basic information required to support the ]]..lang..[[ language in your applications. -%ifnarch %{auxarches} %files -f langpack-]]..lang..[[.filelist langpack-]]..lang..[[ - -%endif ]])) end @@ -1590,9 +1654,7 @@ Requires: %{name}-common = %{version}-%{release} This is a Meta package that is used to install minimal language packs. This package ensures you can use C, POSIX, or C.UTF-8 locales, but nothing else. It is designed for assembling a minimal system. -%ifnarch %{auxarches} %files minimal-langpack -%endif # Infrequently used iconv converter modules. %package gconv-extra @@ -1912,9 +1974,6 @@ build # distribution that supports multiple installed glibc versions. %define glibc_sysroot $RPM_BUILD_ROOT -# Remove existing file lists. -find . -type f -name '*.filelist' -exec rm -rf {} \; - # Ensure the permissions of errlist.c do not change. When the file is # regenerated the Makefile sets the permissions to 444. We set it to 644 # to match what comes out of git. The tarball of the git archive won't have @@ -1927,11 +1986,21 @@ chmod 644 sysdeps/gnu/errlist.c # Reload compiler and build options that were used during %%build. GCC=`cat Gcc` +# Create symbolic links for UsrMove. +# Do not include sbin to work around lorax bug RHEL-67332. +# See below: Remove UsrMove symbolic links. +usrmove_file_names="bin lib lib64" +for d in $usrmove_file_names ; do + mkdir -p "%{glibc_sysroot}/usr/$d" + ln -s "usr/$d" "%{glibc_sysroot}/$d" +done + %ifarch riscv64 -# RISC-V ABI wants to install everything in /lib64/lp64d or /usr/lib64/lp64d. +# RISC-V ABI wants to install everything in /usr/lib64/lp64d. +# Make these be symlinks to /usr/lib64. See: # Make these be symlinks to /lib64 or /usr/lib64 respectively. See: # https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/DRHT5YTPK4WWVGL3GIN5BF2IKX2ODHZ3/ -for d in %{glibc_sysroot}%{_libdir} %{glibc_sysroot}/%{_lib}; do +for d in %{glibc_sysroot}%{_libdir}; do mkdir -p $d (cd $d && ln -sf . lp64d) done @@ -1940,16 +2009,13 @@ done # Build and install: make -j1 install_root=%{glibc_sysroot} install -C build-%{target} -# If we are not building an auxiliary arch then install all of the supported -# locales. -%ifnarch %{auxarches} +# Install all of the supported locales. pushd build-%{target} # Do not use a parallel make here because the hardlink optimization in # localedef is not fully reproducible when running concurrently. make install_root=%{glibc_sysroot} \ install-locales -C ../localedata objdir=`pwd` popd -%endif # install_different: # Install all core libraries into DESTDIR/SUBDIR. Either the file is @@ -1986,14 +2052,14 @@ install_different() libbase=${lib#*/} # Take care that `libbaseso' has a * that needs expanding so # take care with quoting. - libbaseso=$(basename %{glibc_sysroot}/%{_lib}/${libbase}-*.so) + libbaseso=$(basename %{glibc_sysroot}%{_libdir}/${libbase}-*.so) # Only install if different from default build library. if cmp -s ${lib}.so ../build-%{target}/${lib}.so; then ln -sf "$subdir_up"/$libbaseso $libdestdir/$libbaseso else cp -a ${lib}.so $libdestdir/$libbaseso fi - dlib=$libdestdir/$(basename %{glibc_sysroot}/%{_lib}/${libbase}.so.*) + dlib=$libdestdir/$(basename %{glibc_sysroot}%{_libdir}/${libbase}.so.*) ln -sf $libbaseso $dlib done } @@ -2012,11 +2078,10 @@ popd # XXX: This looks like a bug in glibc that accidentally installed these # wrong files. We probably don't need this today. rm -f %{glibc_sysroot}/%{_libdir}/libNoVersion* -rm -f %{glibc_sysroot}/%{_lib}/libNoVersion* # Remove the old nss modules. -rm -f %{glibc_sysroot}/%{_lib}/libnss1-* -rm -f %{glibc_sysroot}/%{_lib}/libnss-*.so.1 +rm -f %{glibc_sysroot}%{_libdir}/libnss1-* +rm -f %{glibc_sysroot}%{_libdir}/libnss-*.so.1 # This statically linked binary is no longer necessary in a world where # the default Fedora install uses an initramfs, and further we have rpm-ostree @@ -2064,7 +2129,6 @@ rm -f %{glibc_sysroot}%{_infodir}/libc.info* # Create locale sub-package file lists ############################################################################## -%ifnarch %{auxarches} olddir=`pwd` pushd %{glibc_sysroot}%{_prefix}/lib/locale rm -f locale-archive @@ -2122,7 +2186,6 @@ do done popd mv %{glibc_sysroot}%{_prefix}/lib/locale/*.filelist . -%endif ############################################################################## # Install configuration files for services @@ -2130,25 +2193,21 @@ mv %{glibc_sysroot}%{_prefix}/lib/locale/*.filelist . install -p -m 644 nss/nsswitch.conf %{glibc_sysroot}/etc/nsswitch.conf -%ifnarch %{auxarches} # This is for ncsd - in glibc 2.2 install -m 644 nscd/nscd.conf %{glibc_sysroot}/etc mkdir -p %{glibc_sysroot}%{_tmpfilesdir} install -m 644 %{SOURCE4} %{buildroot}%{_tmpfilesdir} -mkdir -p %{glibc_sysroot}/lib/systemd/system -install -m 644 nscd/nscd.service nscd/nscd.socket %{glibc_sysroot}/lib/systemd/system -%endif +mkdir -p %{glibc_sysroot}%{_prefix}/lib/systemd/system +install -m 644 nscd/nscd.service nscd/nscd.socket %{glibc_sysroot}%{_prefix}/lib/systemd/system # Include ld.so.conf echo 'include ld.so.conf.d/*.conf' > %{glibc_sysroot}/etc/ld.so.conf truncate -s 0 %{glibc_sysroot}/etc/ld.so.cache chmod 644 %{glibc_sysroot}/etc/ld.so.conf mkdir -p %{glibc_sysroot}/etc/ld.so.conf.d -%ifnarch %{auxarches} mkdir -p %{glibc_sysroot}/etc/sysconfig truncate -s 0 %{glibc_sysroot}/etc/sysconfig/nscd truncate -s 0 %{glibc_sysroot}/etc/gai.conf -%endif # Include %{_libdir}/gconv/gconv-modules.cache truncate -s 0 %{glibc_sysroot}%{_libdir}/gconv/gconv-modules.cache @@ -2193,7 +2252,7 @@ popd %ifarch s390x # Compatibility symlink mkdir -p %{glibc_sysroot}/lib -ln -sf /%{_lib}/ld64.so.1 %{glibc_sysroot}/lib/ld64.so.1 +ln -sf %{_libdir}/ld64.so.1 %{glibc_sysroot}/lib/ld64.so.1 %endif %if %{with benchtests} @@ -2233,18 +2292,9 @@ popd rm -f %{glibc_sysroot}%{_infodir}/dir %endif -%ifnarch %{auxarches} mkdir -p %{glibc_sysroot}/var/{db,run}/nscd touch %{glibc_sysroot}/var/{db,run}/nscd/{passwd,group,hosts,services} touch %{glibc_sysroot}/var/run/nscd/{socket,nscd.pid} -%endif - -# Move libpcprofile.so and libmemusage.so into the proper library directory. -# They can be moved without any real consequences because users would not use -# them directly. -mkdir -p %{glibc_sysroot}%{_libdir} -mv -f %{glibc_sysroot}/%{_lib}/lib{pcprofile,memusage}.so \ - %{glibc_sysroot}%{_libdir} # Strip all of the installed object files. strip -g %{glibc_sysroot}%{_libdir}/*.o @@ -2258,7 +2308,7 @@ strip -g %{glibc_sysroot}%{_libdir}/*.o # such that static linking works and produces the most minimally sized # static application possible. ############################################################################### -pushd %{glibc_sysroot}%{_prefix}/%{_lib}/ +pushd %{glibc_sysroot}%{_libdir}/ $GCC -r -nostdlib -o libpthread.o -Wl,--whole-archive ./libpthread.a rm libpthread.a ar rcs libpthread.a libpthread.o @@ -2284,370 +2334,89 @@ done # that have old linker scripts that reference this file. We ship this only # in compat-libpthread-nonshared sub-package. ############################################################################## -ar cr %{glibc_sysroot}%{_prefix}/%{_lib}/libpthread_nonshared.a +ar cr %{glibc_sysroot}%{_libdir}/libpthread_nonshared.a -############################################################################## -# Beyond this point in the install process we no longer modify the set of -# installed files, with one exception, for auxarches we cleanup the file list -# at the end and remove files which we don't intend to ship. We need the file -# list to effect a proper cleanup, and so it happens last. -############################################################################## +# Remove UsrMove symbolic links. +# These should not end in the packaged contents. +# They are part of the filesystem package. +for d in $usrmove_file_names ; do + rm "%{glibc_sysroot}/$d" +done ############################################################################## -# Build the file lists used for describing the package and subpackages. +# Beyond this point in the install process we no longer modify the set of +# installed files. ############################################################################## -# There are several main file lists (and many more for -# the langpack sub-packages (langpack-${lang}.filelist)): -# * master.filelist -# - Master file list from which all other lists are built. -# * glibc.filelist -# - Files for the glibc packages. -# * common.filelist -# - Flies for the common subpackage. -# * utils.filelist -# - Files for the utils subpackage. -# * nscd.filelist -# - Files for the nscd subpackage. -# * devel.filelist -# - Files for the devel subpackage. -# * doc.filelist -# - Files for the documentation subpackage. -# * headers.filelist -# - Files for the headers subpackage. -# * static.filelist -# - Files for the static subpackage. -# * libnsl.filelist -# - Files for the libnsl subpackage -# * nss_db.filelist -# * nss_hesiod.filelist -# - File lists for nss_* NSS module subpackages. -# * nss-devel.filelist -# - File list with the .so symbolic links for NSS packages. -# * compat-libpthread-nonshared.filelist. -# - File list for compat-libpthread-nonshared subpackage. - -# Create the main file lists. This way we can append to any one of them later -# wihtout having to create it. Note these are removed at the start of the -# install phase. -touch master.filelist -touch glibc.filelist -touch common.filelist -touch utils.filelist -touch gconv.filelist -touch nscd.filelist -touch devel.filelist -touch doc.filelist -touch headers.filelist -touch static.filelist -touch libnsl.filelist -touch nss_db.filelist -touch nss_hesiod.filelist -touch nss-devel.filelist -touch compat-libpthread-nonshared.filelist - -############################################################################### -# Master file list, excluding a few things. -############################################################################### -{ - # List all files or links that we have created during install. - # Files with 'etc' are configuration files, likewise 'gconv-modules' - # and 'gconv-modules.cache' are caches, and we exclude them. - find %{glibc_sysroot} \( -type f -o -type l \) \ - \( \ - -name etc -printf "%%%%config " -o \ - -name gconv-modules.cache \ - -printf "%%%%verify(not md5 size mtime) " -o \ - -name gconv-modules* \ - -printf "%%%%verify(not md5 size mtime) %%%%config(noreplace) " \ - , \ - ! -path "*/lib/debug/*" -printf "/%%P\n" \) - # List all directories with a %%dir prefix. We omit the info directory and - # all directories in (and including) /usr/share/locale. - find %{glibc_sysroot} -type d \ - \( -path '*%{_prefix}/share/locale' -prune -o \ - \( -path '*%{_prefix}/share/*' \ -%if %{with docs} - ! -path '*%{_infodir}' -o \ -%endif - -path "*%{_prefix}/include/*" \ - \) -printf "%%%%dir /%%P\n" \) -} | { - # Also remove the *.mo entries. We will add them to the - # language specific sub-packages. - # libnss_ files go into subpackages related to NSS modules. - # and .*/share/i18n/charmaps/.*), they go into the sub-package - # "locale-source": - sed -e '\,.*/share/locale/\([^/_]\+\).*/LC_MESSAGES/.*\.mo,d' \ - -e '\,.*/share/i18n/locales/.*,d' \ - -e '\,.*/share/i18n/charmaps/.*,d' \ - -e '\,.*/etc/\(localtime\|nsswitch.conf\|ld\.so\.conf\|ld\.so\.cache\|default\|rpc\|gai\.conf\),d' \ - -e '\,.*/%{_libdir}/lib\(pcprofile\|memusage\)\.so,d' \ - -e '\,.*/bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\),d' -} | sort > master.filelist - -# The master file list is now used by each subpackage to list their own -# files. We go through each package and subpackage now and create their lists. -# Each subpackage picks the files from the master list that they need. -# The order of the subpackage list generation does not matter. - -# Make the master file list read-only after this point to avoid accidental -# modification. -chmod 0444 master.filelist - -############################################################################### -# glibc -############################################################################### - -# Add all files with the following exceptions: -# - The info files '%{_infodir}/dir' -# - The partial (lib*_p.a) static libraries, include files. -# - The static files, objects, unversioned DSOs, and nscd. -# - The bin, locale, some sbin, and share. -# - We want iconvconfig in the main package and we do this by using -# a double negation of -v and [^i] so it removes all files in -# sbin *but* iconvconfig. -# - All the libnss files (we add back the ones we want later). -# - All bench test binaries. -# - The aux-cache, since it's handled specially in the files section. -# - The build-locale-archive binary since it's in the all-langpacks package. -# - Extra gconv modules. We add the required modules later. -cat master.filelist \ - | grep -v \ - -e '%{_infodir}' \ - -e '%{_libdir}/lib.*_p.a' \ - -e '%{_prefix}/include' \ - -e '%{_libdir}/lib.*\.a' \ - -e '%{_libdir}/.*\.o' \ - -e '%{_libdir}/lib.*\.so' \ - -e '%{_libdir}/gconv/.*\.so$' \ - -e '%{_libdir}/gconv/gconv-modules.d/gconv-modules-extra\.conf$' \ - -e 'nscd' \ - -e '%{_prefix}/bin' \ - -e '%{_prefix}/lib/locale' \ - -e '%{_prefix}/sbin/[^i]' \ - -e '%{_prefix}/share' \ - -e '/var/db/Makefile' \ - -e '/libnss_.*\.so[0-9.]*$' \ - -e '/libnsl' \ - -e 'glibc-benchtests' \ - -e 'aux-cache' \ - -e 'build-locale-archive' \ - > glibc.filelist - -# Add specific files: -# - The nss_files, nss_compat, and nss_db files. -# - The libmemusage.so and libpcprofile.so used by utils. -for module in compat files dns; do - cat master.filelist \ - | grep -E \ - -e "/libnss_$module(\.so\.[0-9.]+|-[0-9.]+\.so)$" \ - >> glibc.filelist -done -grep -e "libmemusage.so" -e "libpcprofile.so" master.filelist >> glibc.filelist - -############################################################################### -# glibc-gconv-extra -############################################################################### - -grep -e "gconv-modules-extra.conf" master.filelist > gconv.filelist - -# Put the essential gconv modules into the main package. -GconvBaseModules="ANSI_X3.110 ISO8859-15 ISO8859-1 CP1252" -GconvBaseModules="$GconvBaseModules UNICODE UTF-16 UTF-32 UTF-7" -%ifarch s390 s390x -GconvBaseModules="$GconvBaseModules ISO-8859-1_CP037_Z900 UTF8_UTF16_Z9" -GconvBaseModules="$GconvBaseModules UTF16_UTF32_Z9 UTF8_UTF32_Z9" -%endif -GconvAllModules=$(cat master.filelist | - sed -n 's|%{_libdir}/gconv/\(.*\)\.so|\1|p') - -# Put the base modules into glibc and the rest into glibc-gconv-extra -for conv in $GconvAllModules; do - if echo $GconvBaseModules | grep -q $conv; then - grep -E -e "%{_libdir}/gconv/$conv.so$" \ - master.filelist >> glibc.filelist - else - grep -E -e "%{_libdir}/gconv/$conv.so$" \ - master.filelist >> gconv.filelist - fi -done - - -############################################################################### -# glibc-devel -############################################################################### - -# Put some static files into the devel package. -grep '%{_libdir}/lib.*\.a' master.filelist \ - | grep '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \ - > devel.filelist - -# Put all of the object files and *.so (not the versioned ones) into the -# devel package. -grep '%{_libdir}/.*\.o' < master.filelist >> devel.filelist -grep '%{_libdir}/lib.*\.so' < master.filelist >> devel.filelist -# The exceptions are: -# - libmemusage.so and libpcprofile.so in glibc used by utils. -# - libnss_*.so which are in nss-devel. -sed -i -e '\,libmemusage.so,d' \ - -e '\,libpcprofile.so,d' \ - -e '\,/libnss_[a-z]*\.so$,d' \ - devel.filelist - -############################################################################### -# glibc-doc -############################################################################### - -%if %{with docs} -# Put the info files into the doc file list, but exclude the generated dir. -grep '%{_infodir}' master.filelist | grep -v '%{_infodir}/dir' > doc.filelist -grep '%{_docdir}' master.filelist >> doc.filelist -%endif - -############################################################################### -# glibc-headers -############################################################################### - -# The glibc-headers package includes only common files which are identical -# across all multilib packages. We must keep gnu/stubs.h and gnu/lib-names.h -# in the glibc-headers package, but the -32, -64, -64-v1, and -64-v2 versions -# go into the development packages. -grep '%{_prefix}/include/gnu/stubs-.*\.h$' < master.filelist >> devel.filelist || : -grep '%{_prefix}/include/gnu/lib-names-.*\.h$' < master.filelist >> devel.filelist || : -# Put the include files into headers file list. -grep '%{_prefix}/include' < master.filelist \ - | egrep -v '%{_prefix}/include/gnu/stubs-.*\.h$' \ - | egrep -v '%{_prefix}/include/gnu/lib-names-.*\.h$' \ - > headers.filelist - -############################################################################### -# glibc-static -############################################################################### - -# Put the rest of the static files into the static package. -grep '%{_libdir}/lib.*\.a' < master.filelist \ - | grep -v '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \ - > static.filelist - -############################################################################### -# glibc-common -############################################################################### - -# All of the bin and certain sbin files go into the common package except -# iconvconfig which needs to go in glibc, and build-locale-archive which -# needs to go into glibc-all-langpacks. Likewise nscd is excluded because -# it goes in nscd. The iconvconfig binary is kept in the main glibc package -# because we use it in the post-install scriptlet to rebuild the -# gconv-modules.cache. -grep '%{_prefix}/bin' master.filelist >> common.filelist -grep '%{_prefix}/sbin' master.filelist \ - | grep -v '%{_prefix}/sbin/iconvconfig' \ - | grep -v '%{_prefix}/sbin/build-locale-archive' \ - | grep -v 'nscd' >> common.filelist -# All of the files under share go into the common package since they should be -# multilib-independent. -# Exceptions: -# - The actual share directory, not owned by us. -# - The info files which go into doc, and the info directory. -# - All documentation files, which go into doc. -grep '%{_prefix}/share' master.filelist \ - | grep -v \ - -e '%{_prefix}/share/info/libc.info.*' \ - -e '%%dir %{prefix}/share/info' \ - -e '%%dir %{prefix}/share' \ - -e '%{_docdir}' \ - >> common.filelist - -############################################################################### -# nscd -############################################################################### - -# The nscd binary must go into the nscd subpackage. -echo '%{_prefix}/sbin/nscd' > nscd.filelist - -############################################################################### -# glibc-utils -############################################################################### - -# Add the utils scripts and programs to the utils subpackage. -cat > utils.filelist < nss_$module.filelist -done - -############################################################################### -# nss-devel -############################################################################### - -# Symlinks go into the nss-devel package (instead of the main devel -# package). -grep '/libnss_[a-z]*\.so$' master.filelist > nss-devel.filelist - -############################################################################### -# libnsl -############################################################################### - -# Prepare the libnsl-related file lists. -grep '/libnsl-[0-9.]*.so$' master.filelist > libnsl.filelist -test $(wc -l < libnsl.filelist) -eq 1 -%if %{with benchtests} -############################################################################### -# glibc-benchtests -############################################################################### +# Placement of files in subpackages is mostly controlled by the +# %%files section below. There are some exceptions where a subset of +# files are put in one package and need to be elided from another +# package, and it's not possible to do this easily using explicit file +# lists or directory matching. For these exceptions. .filelist file +# are created. + +# Make the sorting below more consistent. +export LC_ALL=C + +# `make_sysroot_filelist PATH FIND-ARGS LIST` writes %%files section +# lines for files and directories in the sysroot under PATH to the +# file LIST, with FIND-ARGS passed to the find command. The output is +# passed through sort. +make_sysroot_filelist () { + ( + find "%{glibc_sysroot}$1" \( -type f -o -type l \) $2 \ + -printf "$1/%%P\n" || true + find "%{glibc_sysroot}$1" -type d $2 -printf "%%%%dir $1/%%P\n" || true + ) | sort > "$3" +} -# List of benchmarks. -find build-%{target}/benchtests -type f -executable | while read b; do - echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)" -done >> benchtests.filelist -# ... and the makefile. -for b in %{SOURCE9} %{SOURCE10}; do - echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)" >> benchtests.filelist -done -# ... and finally, the comparison scripts. -echo "%{_prefix}/libexec/glibc-benchtests/benchout.schema.json" >> benchtests.filelist -echo "%{_prefix}/libexec/glibc-benchtests/compare_bench.py*" >> benchtests.filelist -echo "%{_prefix}/libexec/glibc-benchtests/import_bench.py*" >> benchtests.filelist -echo "%{_prefix}/libexec/glibc-benchtests/validate_benchout.py*" >> benchtests.filelist -%endif +# `remove_from_filelist FILE1 FILE2` removes the lines from FILE1 +# which are also in FILE2. The lines must not contain tabs, and the +# file is sorted as a side effect. The input files must be sorted +# according to the sort command. +remove_from_filelist () { + comm -23 "$1" "$2" > "$1.tmp" + mv "$1.tmp" "$1" +} -############################################################################### -# compat-libpthread-nonshared -############################################################################### -echo "%{_libdir}/libpthread_nonshared.a" >> compat-libpthread-nonshared.filelist +# `split_sysroot_file_list DIR FIND-ARGS REGEXP MAIN-LIST EXCEPTIONS-LIST` +# creates a list of files in the sysroot subdirectory # DIR. +# Files and directories are enumerated with the find command, +# passing FIND-ARGS as an extra argument. Those output paths that +# match REGEXP (an POSIX extended regular expression; all whitespace +# in it is removed before matching) are put into EXCEPTIONS-LIST. The +# remaining files are put into MAIN-LIST. +split_sysroot_file_list () { + make_sysroot_filelist "$1" "$2" "$4" + grep -E -e "$(printf %%s "$3" | tr -d '[:space:]')" < "$4" > "$5" + remove_from_filelist "$4" "$5" +} -############################################################################## -# Delete files that we do not intended to ship with the auxarch. -# This is the only place where we touch the installed files after generating -# the file lists. -############################################################################## -%ifarch %{auxarches} -echo Cutting down the list of unpackaged files -sed -e '/%%dir/d;/%%config/d;/%%verify/d;s/%%lang([^)]*) //;s#^/*##' \ - common.filelist devel.filelist static.filelist headers.filelist \ - utils.filelist nscd.filelist \ -%ifarch %{debuginfocommonarches} - debuginfocommon.filelist \ -%endif - | (cd %{glibc_sysroot}; xargs --no-run-if-empty rm -f 2> /dev/null || :) -%comment Matches: %ifarch %{auxarches} -%endif +# glibc-devel historically contains a subset of the files in +# /usr/include/gnu. The remaining headers are in glibc-headers. +# The -regex clause skips /usr/include, which is owned by the +# filesystem package. +split_sysroot_file_list \ + %{_includedir} '( ! -regex .*%{_includedir}$ )' \ + '%{_includedir}/gnu/(stubs|lib-names)-.*\.h$' \ + headers.filelist devel.filelist + +# The primary gconv converters are in the glibc package, the rest goes +# into glibc-gconv-extra. The Z9 and Z900 subpatterns are for +# s390x-specific converters. The -name clause skips over files +# that are not loadable gconv modules. +split_sysroot_file_list \ + %{_libdir}/gconv '-name *.so' \ + 'gconv/ + (ANSI_X3\.110 + |CP1252 + |ISO8859-15? + |UNICODE + |UTF-[0-9]+ + |ISO-8859-1_CP037_Z900 + |UTF(8|16)_UTF(16|32)_Z9 + )\.so$' \ + gconv-extra.filelist glibc.filelist ############################################################################## # Run the glibc testsuite @@ -2716,15 +2485,15 @@ popd echo ====================TESTING END===================== PLTCMD='/^Relocation section .*\(\.rela\?\.plt\|\.rela\.IA_64\.pltoff\)/,/^$/p' echo ====================PLT RELOCS LD.SO================ -readelf -Wr %{glibc_sysroot}/%{_lib}/ld-*.so | sed -n -e "$PLTCMD" +readelf -Wr %{glibc_sysroot}%{_libdir}/ld-*.so | sed -n -e "$PLTCMD" echo ====================PLT RELOCS LIBC.SO============== -readelf -Wr %{glibc_sysroot}/%{_lib}/libc-*.so | sed -n -e "$PLTCMD" +readelf -Wr %{glibc_sysroot}%{_libdir}/libc-*.so | sed -n -e "$PLTCMD" echo ====================PLT RELOCS END================== # Obtain a way to run the dynamic loader. Avoid matching the symbolic # link and then pick the first loader (although there should be only # one). -run_ldso="$(find %{glibc_sysroot}/%{_lib}/ld-*.so -type f | LC_ALL=C sort | head -n1) --library-path %{glibc_sysroot}/%{_lib}" +run_ldso="$(find %{glibc_sysroot}%{_libdir}/ld-*.so -type f | LC_ALL=C sort | head -n1) --library-path %{glibc_sysroot}%{_libdir}" # Show the auxiliary vector as seen by the new library # (even if we do not perform the valgrind test). @@ -2936,20 +2705,60 @@ fi %systemd_postun_with_restart nscd.service %files -f glibc.filelist -%dir %{_prefix}/%{_lib}/audit -%if %{buildpower9} -%dir /%{_lib}/glibc-hwcaps/power9 +/sbin/ldconfig +%{_sbindir}/iconvconfig +%{_libexecdir}/getconf +%{_prefix}%{glibc_ldso} +%{?glibc_ldso_alternate} +%{_libdir}/ld-%{version}.so +%{_libdir}/libBrokenLocale-%{version}.so +%{_libdir}/libBrokenLocale.so.1 +%{_libdir}/libSegFault.so +%{_libdir}/libanl-%{version}.so +%{_libdir}/libanl.so.1 +%{_libdir}/libc-%{version}.so +%{_libdir}/libc.so.6 +%{_libdir}/libdl-%{version}.so +%{_libdir}/libdl.so.2 +%{_libdir}/libm-%{version}.so +%{_libdir}/libm.so.6 +%{_libdir}/libnss_compat-%{version}.so +%{_libdir}/libnss_compat.so.2 +%{_libdir}/libnss_dns-%{version}.so +%{_libdir}/libnss_dns.so.2 +%{_libdir}/libnss_files-%{version}.so +%{_libdir}/libnss_files.so.2 +%{_libdir}/libpthread-%{version}.so +%{_libdir}/libpthread.so.0 +%{_libdir}/libresolv-%{version}.so +%{_libdir}/libresolv.so.2 +%{_libdir}/librt-%{version}.so +%{_libdir}/librt.so.1 +%{_libdir}/libthread_db-1.0.so +%{_libdir}/libthread_db.so.1 +%{_libdir}/libutil-%{version}.so +%{_libdir}/libutil.so.1 +%{_libdir}/libmemusage.so +%{_libdir}/libpcprofile.so +%{_libdir}/audit +%if %{glibc_has_libmvec} +%{_libdir}/libmvec-%{version}.so +%{_libdir}/libmvec.so.1 %endif -%ifarch s390x -/lib/ld64.so.1 +%if %{buildpower9} +%{_libdir}/glibc-hwcaps %endif %verify(not md5 size mtime link) %config(noreplace) /etc/nsswitch.conf %verify(not md5 size mtime) %config(noreplace) /etc/ld.so.conf %verify(not md5 size mtime) %config(noreplace) /etc/rpc %dir /etc/ld.so.conf.d -%dir %{_prefix}/libexec/getconf %dir %{_libdir}/gconv %dir %{_libdir}/gconv/gconv-modules.d +%verify(not md5 size mtime) %config(noreplace) %{_libdir}/gconv/gconv-modules +%verify(not md5 size mtime) %{_libdir}/gconv/gconv-modules.cache +%ifarch s390x +%verify(not md5 size mtime) %config(noreplace) %{_libdir}/gconv/gconv-modules.d/gconv-modules-s390.conf +%endif %dir %attr(0700,root,root) /var/cache/ldconfig %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/cache/ldconfig/aux-cache %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache @@ -2958,11 +2767,32 @@ fi %{!?_licensedir:%global license %%doc} %license COPYING COPYING.LIB LICENSES -%ifnarch %{auxarches} -%files -f common.filelist common +%files common +%{_bindir}/catchsegv +%{_bindir}/gencat +%{_bindir}/getconf +%{_bindir}/getent +%{_bindir}/iconv +%{_bindir}/ld.so +%{_bindir}/ldd +%{_bindir}/locale +%{_bindir}/localedef +%{_bindir}/makedb +%{_bindir}/pldd +%{_bindir}/sotruss +%{_bindir}/sprof +%{_bindir}/tzselect +%{_sbindir}/zdump +%{_sbindir}/zic +%dir %{_datarootdir}/i18n +%dir %{_datarootdir}/i18n/locales +%dir %{_datarootdir}/i18n/charmaps %dir %{_prefix}/lib/locale -%dir %{_prefix}/lib/locale/C.utf8 -%{_prefix}/lib/locale/C.utf8/* +%{_datarootdir}/locale/locale.alias +%{_prefix}/lib/locale/C.utf8 +%ifarch %{ix86} +%{_bindir}/lddlibc4 +%endif %files all-langpacks %attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive.tmpl @@ -2971,31 +2801,73 @@ fi %attr(0700,root,root) %{_prefix}/sbin/build-locale-archive %files locale-source -%dir %{_prefix}/share/i18n/locales -%{_prefix}/share/i18n/locales/* -%dir %{_prefix}/share/i18n/charmaps -%{_prefix}/share/i18n/charmaps/* +%{_datarootdir}/i18n/locales +%{_datarootdir}/i18n/charmaps %files -f devel.filelist devel +%{_libdir}/*.o +%{_libdir}/libBrokenLocale.so +%{_libdir}/libanl.so +%{_libdir}/libc.so +%{_libdir}/libc_nonshared.a +%{_libdir}/libdl.so +%{_libdir}/libg.a +%{_libdir}/libm.so +%{_libdir}/libmcheck.a +%{_libdir}/libpthread.so +%{_libdir}/libpthread_nonshared.a +%{_libdir}/libresolv.so +%{_libdir}/librt.so +%{_libdir}/libthread_db.so +%{_libdir}/libutil.so +%if %{glibc_has_libnldbl} +%{_libdir}/libnldbl_nonshared.a +%endif +%if %{glibc_has_libmvec} +%{_libdir}/libmvec.so +%{_libdir}/libmvec_nonshared.a +%endif %if %{with docs} -%files -f doc.filelist doc +%files doc +%{_datarootdir}/doc +%{_infodir}/*.info* %endif -%files -f static.filelist static +%files static +%{_libdir}/libBrokenLocale.a +%{_libdir}/libanl.a +%{_libdir}/libc.a +%{_libdir}/libdl.a +%{_libdir}/libm.a +%{_libdir}/libpthread.a +%{_libdir}/libresolv.a +%{_libdir}/librt.a +%{_libdir}/libutil.a +%if %{glibc_has_libmvec} +%{_libdir}/libm-%{version}.a +%{_libdir}/libmvec.a +%endif %files -f headers.filelist headers -%files -f utils.filelist utils +%files utils +%{_bindir}/memusage +%{_bindir}/memusagestat +%{_bindir}/mtrace +%{_bindir}/pcprofiledump +%{_bindir}/xtrace -%files -f gconv.filelist gconv-extra +%files -f gconv-extra.filelist gconv-extra +%verify(not md5 size mtime) %config(noreplace) %{_libdir}/gconv/gconv-modules.d/gconv-modules-extra.conf -%files -f nscd.filelist -n nscd +%files -n nscd +%{_sbindir}/nscd %config(noreplace) /etc/nscd.conf %dir %attr(0755,root,root) /var/run/nscd %dir %attr(0755,root,root) /var/db/nscd -/lib/systemd/system/nscd.service -/lib/systemd/system/nscd.socket +%{_prefix}/lib/systemd/system/nscd.service +%{_prefix}/lib/systemd/system/nscd.socket %{_tmpfilesdir}/nscd.conf %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/nscd.pid %attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/socket @@ -3008,24 +2880,54 @@ fi %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/hosts %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/services %ghost %config(missingok,noreplace) /etc/sysconfig/nscd -%endif -%files -f nss_db.filelist -n nss_db +%files -n nss_db +%{_libdir}/libnss_db-%{version}.so +%{_libdir}/libnss_db.so.2 /var/db/Makefile -%files -f nss_hesiod.filelist -n nss_hesiod +%files -n nss_hesiod +%{_libdir}/libnss_hesiod-%{version}.so +%{_libdir}/libnss_hesiod.so.2 %doc hesiod/README.hesiod -%files -f nss-devel.filelist nss-devel +%files nss-devel +%{_libdir}/libnss_compat.so +%{_libdir}/libnss_db.so +%{_libdir}/libnss_dns.so +%{_libdir}/libnss_files.so +%{_libdir}/libnss_hesiod.so -%files -f libnsl.filelist -n libnsl -/%{_lib}/libnsl.so.1 +%files -n libnsl +%{_libdir}/libnsl-%{version}.so +%{_libdir}/libnsl.so.1 %if %{with benchtests} -%files benchtests -f benchtests.filelist +%files benchtests +%{_libexecdir}/glibc-benchtests %endif -%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared +%files -n compat-libpthread-nonshared +%{_libdir}/libpthread_nonshared.a %changelog +* Mon Dec 9 2024 DJ Delorie - 2.28-251.11 +- add GB18030-2022 charmap and tests (RHEL-67806) + +* Thu Nov 21 2024 Patsy Griffin - 2.28-251.10 +- Remove some unused ppc64le string functions (RHEL-61259) + +* Wed Nov 13 2024 Florian Weimer - 2.28-251.9 +- Use /sbin/ldconfig path for lorax compatibility (RHEL-63048) + +* Mon Nov 11 2024 Patsy Griffin - 2.28-251.8 +- aarch64: MTE compatible strncmp (RHEL-61255) + +* Wed Oct 23 2024 Florian Weimer - 2.28-251.7 +- Use UsrMove path destination in the RPM files (RHEL-63048) + +* Tue Sep 17 2024 Patsy Griffin - 2.28-251.6 +- s390x: Fix segfault in wcsncmp +- Enhanced test coverage for strncmp, wcsncmp (RHEL-49490) + * Fri Aug 16 2024 Patsy Griffin - 2.28-251.5 - elf: Clarify and invert second argument of _dl_allocate_tls_init - elf: Avoid re-initializing already allocated TLS in dlopen (RHEL-36147)