Removed
Link Here
|
1 |
commit 5e9091dab8858b25210a91d22fbbbfdee9c969ad |
2 |
Author: Roland McGrath <mcgrathr@google.com> |
3 |
Date: 2023-09-05T12:28:31-07:00 |
4 |
|
5 |
gold: Use char16_t, char32_t instead of uint16_t, uint32_t as character types |
6 |
|
7 |
The std::basic_string template type is only specified for |
8 |
instantiations using character types. Newer (LLVM) libc++ |
9 |
implementations no longer allow non-character integer types |
10 |
to be used. |
11 |
|
12 |
gold/ |
13 |
* output.cc: Include <uchar.h>. |
14 |
(Output_section::add_merge_input_section): Use char16_t and |
15 |
char32_t for 2- and 4-byte entry size, respectively. |
16 |
* stringpool.cc: Include <uchar.h>. |
17 |
(Stringpool_template): Explicitly instantiate for char16_t, |
18 |
char32_t instead of uint16_t, uint32_t. |
19 |
* merge.cc (Output_merge_string): Likewise. |
20 |
|
21 |
diff --git gold/ChangeLog gold/ChangeLog |
22 |
index 93a1125cfed..54fb1c16e17 100644 |
23 |
--- gold/ChangeLog |
24 |
+++ gold/ChangeLog |
25 |
@@ -1,3 +1,17 @@ |
26 |
+2023-09-05 Roland McGrath <mcgrathr@google.com> |
27 |
+ |
28 |
+ The std::basic_string template type is only specified for |
29 |
+ instantiations using character types. Newer (LLVM) libc++ |
30 |
+ implementations no longer allow non-character integer types |
31 |
+ to be used. |
32 |
+ * output.cc: Include <uchar.h>. |
33 |
+ (Output_section::add_merge_input_section): Use char16_t and |
34 |
+ char32_t for 2- and 4-byte entry size, respectively. |
35 |
+ * stringpool.cc: Include <uchar.h>. |
36 |
+ (Stringpool_template): Explicitly instantiate for char16_t, |
37 |
+ char32_t instead of uint16_t, uint32_t. |
38 |
+ * merge.cc (Output_merge_string): Likewise. |
39 |
+ |
40 |
2023-07-03 Nick Clifton <nickc@redhat.com> |
41 |
|
42 |
* po/gold.pot: Regenerate. |
43 |
diff --git gold/merge.cc gold/merge.cc |
44 |
index c12efc9905e..ce31a792443 100644 |
45 |
--- gold/merge.cc |
46 |
+++ gold/merge.cc |
47 |
@@ -665,10 +665,10 @@ template |
48 |
class Output_merge_string<char>; |
49 |
|
50 |
template |
51 |
-class Output_merge_string<uint16_t>; |
52 |
+class Output_merge_string<char16_t>; |
53 |
|
54 |
template |
55 |
-class Output_merge_string<uint32_t>; |
56 |
+class Output_merge_string<char32_t>; |
57 |
|
58 |
#if defined(HAVE_TARGET_32_LITTLE) || defined(HAVE_TARGET_32_BIG) |
59 |
template |
60 |
diff --git gold/output.cc gold/output.cc |
61 |
index a1978eb5f32..6053e4db33d 100644 |
62 |
--- gold/output.cc |
63 |
+++ gold/output.cc |
64 |
@@ -29,6 +29,7 @@ |
65 |
#include <unistd.h> |
66 |
#include <sys/stat.h> |
67 |
#include <algorithm> |
68 |
+#include <uchar.h> |
69 |
|
70 |
#ifdef HAVE_SYS_MMAN_H |
71 |
#include <sys/mman.h> |
72 |
@@ -2706,10 +2707,10 @@ Output_section::add_merge_input_section(Relobj* object, unsigned int shndx, |
73 |
pomb = new Output_merge_string<char>(addralign); |
74 |
break; |
75 |
case 2: |
76 |
- pomb = new Output_merge_string<uint16_t>(addralign); |
77 |
+ pomb = new Output_merge_string<char16_t>(addralign); |
78 |
break; |
79 |
case 4: |
80 |
- pomb = new Output_merge_string<uint32_t>(addralign); |
81 |
+ pomb = new Output_merge_string<char32_t>(addralign); |
82 |
break; |
83 |
default: |
84 |
return false; |
85 |
diff --git gold/stringpool.cc gold/stringpool.cc |
86 |
index a2cd44d5244..b5ac1dd34ca 100644 |
87 |
--- gold/stringpool.cc |
88 |
+++ gold/stringpool.cc |
89 |
@@ -25,6 +25,7 @@ |
90 |
#include <cstring> |
91 |
#include <algorithm> |
92 |
#include <vector> |
93 |
+#include <uchar.h> |
94 |
|
95 |
#include "output.h" |
96 |
#include "parameters.h" |
97 |
@@ -527,9 +528,9 @@ template |
98 |
class Stringpool_template<char>; |
99 |
|
100 |
template |
101 |
-class Stringpool_template<uint16_t>; |
102 |
+class Stringpool_template<char16_t>; |
103 |
|
104 |
template |
105 |
-class Stringpool_template<uint32_t>; |
106 |
+class Stringpool_template<char32_t>; |
107 |
|
108 |
} // End namespace gold. |