From 1fced0ef4e16c6c207df9b9eae99cdfb109f73bc Mon Sep 17 00:00:00 2001 From: Esme Yi Date: Wed, 8 Feb 2023 16:02:47 +0800 Subject: [PATCH] Modify SymbolFlags::Xcoff. --- src/common.rs | 5 ++++- src/read/xcoff/symbol.rs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common.rs b/src/common.rs index c3f432f8..faf12875 100644 --- a/src/common.rs +++ b/src/common.rs @@ -468,5 +468,8 @@ pub enum SymbolFlags
{ associative_section: Option
, }, /// XCOFF symbol flags. - Xcoff { c_info: u8 }, + Xcoff { + /// `n_sclass` field in the XCOFF symbol. + n_sclass: u8, + }, } diff --git a/src/read/xcoff/symbol.rs b/src/read/xcoff/symbol.rs index d68c13af..0b853c18 100644 --- a/src/read/xcoff/symbol.rs +++ b/src/read/xcoff/symbol.rs @@ -412,7 +412,7 @@ impl<'data, 'file, Xcoff: FileHeader, R: ReadRef<'data>> ObjectSymbol<'data> #[inline] fn flags(&self) -> SymbolFlags { - SymbolFlags::None + SymbolFlags::Xcoff { self.symbol.n_sclass() } } }