about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-12 06:03:53 +0000
committerbors <bors@rust-lang.org>2023-07-12 06:03:53 +0000
commit6732922ea6d0fcfd4f1ad60d3f8d2fb554753aae (patch)
tree4153c19c9e3fd101c31c145968c4f305a358c7af /compiler/rustc_codegen_ssa/src
parent993deaa0bf8bab9dd3eadfd1fbeb093328e95afe (diff)
parentf05e6e633172d634cc66933454b4e0743013fe1c (diff)
downloadrust-6732922ea6d0fcfd4f1ad60d3f8d2fb554753aae.tar.gz
rust-6732922ea6d0fcfd4f1ad60d3f8d2fb554753aae.zip
Auto merge of #113608 - workingjubilee:rollup-8763ius, r=workingjubilee
Rollup of 5 pull requests

Successful merges:

 - #113373 (various download-rustc fixes)
 - #113385 (style-guide: Fix chain example to match rustfmt behavior)
 - #113567 (While let suggestion will work for closure body)
 - #113579 (Revert "fix: :bug: etc/bash_complettion -> src/etc/... to avoid copy …)
 - #113595 (Use constants from object crate)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/metadata.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/metadata.rs b/compiler/rustc_codegen_ssa/src/back/metadata.rs
index a463dff852d..1f827a2375d 100644
--- a/compiler/rustc_codegen_ssa/src/back/metadata.rs
+++ b/compiler/rustc_codegen_ssa/src/back/metadata.rs
@@ -12,7 +12,6 @@ use object::{
 
 use snap::write::FrameEncoder;
 
-use object::elf::NT_GNU_PROPERTY_TYPE_0;
 use rustc_data_structures::memmap::Mmap;
 use rustc_data_structures::owned_slice::{try_slice_owned, OwnedSlice};
 use rustc_metadata::fs::METADATA_FILENAME;
@@ -124,7 +123,7 @@ fn add_gnu_property_note(
     let mut data: Vec<u8> = Vec::new();
     let n_namsz: u32 = 4; // Size of the n_name field
     let n_descsz: u32 = 16; // Size of the n_desc field
-    let n_type: u32 = NT_GNU_PROPERTY_TYPE_0; // Type of note descriptor
+    let n_type: u32 = object::elf::NT_GNU_PROPERTY_TYPE_0; // Type of note descriptor
     let header_values = [n_namsz, n_descsz, n_type];
     header_values.iter().for_each(|v| {
         data.extend_from_slice(&match endianness {
@@ -134,8 +133,8 @@ fn add_gnu_property_note(
     });
     data.extend_from_slice(b"GNU\0"); // Owner of the program property note
     let pr_type: u32 = match architecture {
-        Architecture::X86_64 => 0xc0000002,
-        Architecture::Aarch64 => 0xc0000000,
+        Architecture::X86_64 => object::elf::GNU_PROPERTY_X86_FEATURE_1_AND,
+        Architecture::Aarch64 => object::elf::GNU_PROPERTY_AARCH64_FEATURE_1_AND,
         _ => unreachable!(),
     };
     let pr_datasz: u32 = 4; //size of the pr_data field