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.
This commit is contained in:
parent
c361616c3c
commit
a529ba8f67
4 changed files with 64 additions and 26 deletions
|
@ -15,7 +15,7 @@ tracing = "0.1"
|
|||
libc = "0.2.50"
|
||||
jobserver = "0.1.22"
|
||||
tempfile = "3.2"
|
||||
thorin-dwp = "0.3"
|
||||
thorin-dwp = "0.4"
|
||||
pathdiff = "0.2.0"
|
||||
serde_json = "1.0.59"
|
||||
snap = "1"
|
||||
|
@ -43,6 +43,6 @@ rustc_session = { path = "../rustc_session" }
|
|||
rustc_const_eval = { path = "../rustc_const_eval" }
|
||||
|
||||
[dependencies.object]
|
||||
version = "0.29.0"
|
||||
version = "0.30.1"
|
||||
default-features = false
|
||||
features = ["read_core", "elf", "macho", "pe", "unaligned", "archive", "write"]
|
||||
|
|
|
@ -100,7 +100,13 @@ pub(crate) fn create_object_file(sess: &Session) -> Option<write::Object<'static
|
|||
};
|
||||
let architecture = match &sess.target.arch[..] {
|
||||
"arm" => Architecture::Arm,
|
||||
"aarch64" => Architecture::Aarch64,
|
||||
"aarch64" => {
|
||||
if sess.target.pointer_width == 32 {
|
||||
Architecture::Aarch64_Ilp32
|
||||
} else {
|
||||
Architecture::Aarch64
|
||||
}
|
||||
}
|
||||
"x86" => Architecture::I386,
|
||||
"s390x" => Architecture::S390x,
|
||||
"mips" => Architecture::Mips,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue