This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit ce05553
authored
Rollup merge of rust-lang#71234 - maurer:init-array, r=cuviper
rustllvm: Use .init_array rather than .ctors
LLVM TargetMachines default to using the (now-legacy) .ctors
representation of init functions. Mixing .ctors and .init_array
representations can cause issues when linking with lld.
This happens in practice for:
* Our profiling runtime which is currently implicitly built with
.init_array since it is built by clang, which sets this field.
* External C/C++ code that may be linked into the same process.
Fixes: rust-lang#71233File tree
7 files changed
+23
-1
lines changed- src
- librustc_codegen_llvm
- back
- llvm
- librustc_interface
- librustc_session
- librustc_target/spec
- rustllvm
7 files changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
168 | 175 | | |
169 | 176 | | |
170 | 177 | | |
| |||
184 | 191 | | |
185 | 192 | | |
186 | 193 | | |
| 194 | + | |
187 | 195 | | |
188 | 196 | | |
189 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1956 | 1956 | | |
1957 | 1957 | | |
1958 | 1958 | | |
| 1959 | + | |
1959 | 1960 | | |
1960 | 1961 | | |
1961 | 1962 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
| 574 | + | |
574 | 575 | | |
575 | 576 | | |
576 | 577 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1010 | 1010 | | |
1011 | 1011 | | |
1012 | 1012 | | |
| 1013 | + | |
| 1014 | + | |
1013 | 1015 | | |
1014 | 1016 | | |
1015 | 1017 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
882 | 882 | | |
883 | 883 | | |
884 | 884 | | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
885 | 889 | | |
886 | 890 | | |
887 | 891 | | |
| |||
972 | 976 | | |
973 | 977 | | |
974 | 978 | | |
| 979 | + | |
975 | 980 | | |
976 | 981 | | |
977 | 982 | | |
| |||
1312 | 1317 | | |
1313 | 1318 | | |
1314 | 1319 | | |
| 1320 | + | |
1315 | 1321 | | |
1316 | 1322 | | |
1317 | 1323 | | |
| |||
1541 | 1547 | | |
1542 | 1548 | | |
1543 | 1549 | | |
| 1550 | + | |
1544 | 1551 | | |
1545 | 1552 | | |
1546 | 1553 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
| 450 | + | |
| 451 | + | |
451 | 452 | | |
452 | 453 | | |
453 | 454 | | |
| |||
473 | 474 | | |
474 | 475 | | |
475 | 476 | | |
| 477 | + | |
476 | 478 | | |
477 | 479 | | |
478 | 480 | | |
| |||
0 commit comments