Skip to content

Commit 44a500c

Browse files
committed
Auto merge of rust-lang#106646 - Amanieu:ilp32-object, r=Mark-Simulacrum
Fix aarch64-unknown-linux-gnu_ilp32 target This was broken because the synthetic object files produced by rustc were for 64-bit AArch64, which caused link failures when combined with 32-bit ILP32 object files. This PR updates the object crate to 0.30.1 which adds support for generating ILP32 AArch64 object files.
2 parents c0b8735 + a529ba8 commit 44a500c

File tree

4 files changed

+63
-25
lines changed

4 files changed

+63
-25
lines changed

Cargo.lock

+50-21
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ dependencies = [
3535
"version_check",
3636
]
3737

38+
[[package]]
39+
name = "ahash"
40+
version = "0.8.2"
41+
source = "registry+https://github.com/rust-lang/crates.io-index"
42+
checksum = "bf6ccdb167abbf410dcb915cabd428929d7f6a04980b54a11f26a39f1c7f7107"
43+
dependencies = [
44+
"cfg-if",
45+
"once_cell",
46+
"version_check",
47+
]
48+
3849
[[package]]
3950
name = "aho-corasick"
4051
version = "0.7.18"
@@ -107,7 +118,7 @@ version = "0.1.1"
107118
source = "registry+https://github.com/rust-lang/crates.io-index"
108119
checksum = "276881980556fdadeb88aa1ffc667e4d2e8fe72531dfabcb7a82bb3c9ea9ba31"
109120
dependencies = [
110-
"object",
121+
"object 0.29.0",
111122
]
112123

113124
[[package]]
@@ -193,7 +204,7 @@ dependencies = [
193204
"cfg-if",
194205
"libc",
195206
"miniz_oxide",
196-
"object",
207+
"object 0.29.0",
197208
"rustc-demangle",
198209
]
199210

@@ -1774,9 +1785,9 @@ dependencies = [
17741785

17751786
[[package]]
17761787
name = "gimli"
1777-
version = "0.26.1"
1788+
version = "0.26.2"
17781789
source = "registry+https://github.com/rust-lang/crates.io-index"
1779-
checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4"
1790+
checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d"
17801791
dependencies = [
17811792
"compiler_builtins",
17821793
"fallible-iterator",
@@ -1887,12 +1898,21 @@ version = "0.12.3"
18871898
source = "registry+https://github.com/rust-lang/crates.io-index"
18881899
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
18891900
dependencies = [
1890-
"ahash",
1901+
"ahash 0.7.4",
18911902
"compiler_builtins",
18921903
"rustc-std-workspace-alloc",
18931904
"rustc-std-workspace-core",
18941905
]
18951906

1907+
[[package]]
1908+
name = "hashbrown"
1909+
version = "0.13.1"
1910+
source = "registry+https://github.com/rust-lang/crates.io-index"
1911+
checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038"
1912+
dependencies = [
1913+
"ahash 0.8.2",
1914+
]
1915+
18961916
[[package]]
18971917
name = "heck"
18981918
version = "0.4.0"
@@ -2129,12 +2149,12 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
21292149

21302150
[[package]]
21312151
name = "indexmap"
2132-
version = "1.9.1"
2152+
version = "1.9.2"
21332153
source = "registry+https://github.com/rust-lang/crates.io-index"
2134-
checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"
2154+
checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
21352155
dependencies = [
21362156
"autocfg",
2137-
"hashbrown",
2157+
"hashbrown 0.12.3",
21382158
"rustc-rayon",
21392159
"serde",
21402160
]
@@ -2740,13 +2760,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
27402760
checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53"
27412761
dependencies = [
27422762
"compiler_builtins",
2763+
"memchr",
2764+
"rustc-std-workspace-alloc",
2765+
"rustc-std-workspace-core",
2766+
]
2767+
2768+
[[package]]
2769+
name = "object"
2770+
version = "0.30.1"
2771+
source = "registry+https://github.com/rust-lang/crates.io-index"
2772+
checksum = "8d864c91689fdc196779b98dba0aceac6118594c2df6ee5d943eb6a8df4d107a"
2773+
dependencies = [
27432774
"crc32fast",
27442775
"flate2",
2745-
"hashbrown",
2776+
"hashbrown 0.13.1",
27462777
"indexmap",
27472778
"memchr",
2748-
"rustc-std-workspace-alloc",
2749-
"rustc-std-workspace-core",
27502779
]
27512780

27522781
[[package]]
@@ -3791,7 +3820,7 @@ dependencies = [
37913820
"cstr",
37923821
"libc",
37933822
"measureme",
3794-
"object",
3823+
"object 0.30.1",
37953824
"rustc-demangle",
37963825
"rustc_ast",
37973826
"rustc_attr",
@@ -3826,7 +3855,7 @@ dependencies = [
38263855
"itertools",
38273856
"jobserver",
38283857
"libc",
3829-
"object",
3858+
"object 0.30.1",
38303859
"pathdiff",
38313860
"regex",
38323861
"rustc_arena",
@@ -5296,11 +5325,11 @@ dependencies = [
52965325
"core",
52975326
"dlmalloc",
52985327
"fortanix-sgx-abi",
5299-
"hashbrown",
5328+
"hashbrown 0.12.3",
53005329
"hermit-abi 0.2.6",
53015330
"libc",
53025331
"miniz_oxide",
5303-
"object",
5332+
"object 0.29.0",
53045333
"panic_abort",
53055334
"panic_unwind",
53065335
"profiler_builtins",
@@ -5549,13 +5578,13 @@ dependencies = [
55495578

55505579
[[package]]
55515580
name = "thorin-dwp"
5552-
version = "0.3.0"
5581+
version = "0.4.0"
55535582
source = "registry+https://github.com/rust-lang/crates.io-index"
5554-
checksum = "e6cb0c7868d7f90407531108ab03263d9452a8811b7cdd87675343a40d4aa254"
5583+
checksum = "da8fbf660a019b6bf11ea95762041464aa9099cc293b6a66d77cea5107619671"
55555584
dependencies = [
55565585
"gimli",
5557-
"hashbrown",
5558-
"object",
5586+
"hashbrown 0.12.3",
5587+
"object 0.30.1",
55595588
"tracing",
55605589
]
55615590

@@ -6090,9 +6119,9 @@ checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c"
60906119

60916120
[[package]]
60926121
name = "version_check"
6093-
version = "0.9.3"
6122+
version = "0.9.4"
60946123
source = "registry+https://github.com/rust-lang/crates.io-index"
6095-
checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe"
6124+
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
60966125

60976126
[[package]]
60986127
name = "vte"

compiler/rustc_codegen_llvm/Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ bitflags = "1.0"
1111
cstr = "0.2"
1212
libc = "0.2"
1313
measureme = "10.0.0"
14-
object = { version = "0.29.0", default-features = false, features = ["std", "read"] }
14+
object = { version = "0.30.1", default-features = false, features = [
15+
"std",
16+
"read",
17+
] }
1518
tracing = "0.1"
1619
rustc_middle = { path = "../rustc_middle" }
1720
rustc-demangle = "0.1.21"

compiler/rustc_codegen_ssa/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ tracing = "0.1"
1515
libc = "0.2.50"
1616
jobserver = "0.1.22"
1717
tempfile = "3.2"
18-
thorin-dwp = "0.3"
18+
thorin-dwp = "0.4"
1919
pathdiff = "0.2.0"
2020
serde_json = "1.0.59"
2121
snap = "1"
@@ -44,6 +44,6 @@ rustc_session = { path = "../rustc_session" }
4444
rustc_const_eval = { path = "../rustc_const_eval" }
4545

4646
[dependencies.object]
47-
version = "0.29.0"
47+
version = "0.30.1"
4848
default-features = false
4949
features = ["read_core", "elf", "macho", "pe", "unaligned", "archive", "write"]

compiler/rustc_codegen_ssa/src/back/metadata.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,13 @@ pub(crate) fn create_object_file(sess: &Session) -> Option<write::Object<'static
100100
};
101101
let architecture = match &sess.target.arch[..] {
102102
"arm" => Architecture::Arm,
103-
"aarch64" => Architecture::Aarch64,
103+
"aarch64" => {
104+
if sess.target.pointer_width == 32 {
105+
Architecture::Aarch64_Ilp32
106+
} else {
107+
Architecture::Aarch64
108+
}
109+
}
104110
"x86" => Architecture::I386,
105111
"s390x" => Architecture::S390x,
106112
"mips" => Architecture::Mips,

0 commit comments

Comments
 (0)