From 9835e2ae736235810b4ea1c162ca5e65c547e770 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 04:49:50 +0200 Subject: Merging upstream version 1.71.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/object/src/read/elf/file.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'vendor/object/src/read/elf/file.rs') diff --git a/vendor/object/src/read/elf/file.rs b/vendor/object/src/read/elf/file.rs index 259da7906..aac66e7cc 100644 --- a/vendor/object/src/read/elf/file.rs +++ b/vendor/object/src/read/elf/file.rs @@ -456,6 +456,15 @@ pub trait FileHeader: Debug + Pod { /// This is a property of the type, not a value in the header data. fn is_type_64(&self) -> bool; + /// Return true if this type is a 64-bit header. + /// + /// This is a property of the type, not a value in the header data. + /// + /// This is the same as `is_type_64`, but is non-dispatchable. + fn is_type_64_sized() -> bool + where + Self: Sized; + fn e_ident(&self) -> &elf::Ident; fn e_type(&self, endian: Self::Endian) -> u16; fn e_machine(&self, endian: Self::Endian) -> u16; @@ -724,6 +733,14 @@ impl FileHeader for elf::FileHeader32 { false } + #[inline] + fn is_type_64_sized() -> bool + where + Self: Sized, + { + false + } + #[inline] fn e_ident(&self) -> &elf::Ident { &self.e_ident @@ -813,6 +830,14 @@ impl FileHeader for elf::FileHeader64 { true } + #[inline] + fn is_type_64_sized() -> bool + where + Self: Sized, + { + true + } + #[inline] fn e_ident(&self) -> &elf::Ident { &self.e_ident -- cgit v1.2.3