std::error_code getAlignment(uint32_t &Result) const;
std::error_code getSize(uint64_t &Result) const;
std::error_code getType(SymbolRef::Type &Result) const;
+ std::error_code getOther(uint8_t &Result) const;
/// @brief Get section this symbol is defined in reference to. Result is
/// end_sections() if it is undefined or is an absolute symbol.
SymbolRef::Type &Res) const = 0;
virtual std::error_code getSymbolSection(DataRefImpl Symb,
section_iterator &Res) const = 0;
+ virtual std::error_code getSymbolOther(DataRefImpl Symb,
+ uint8_t &Res) const {
+ return object_error::invalid_file_type;
+ }
// Same as above for SectionRef.
friend class SectionRef;
/// LC_ID_DYLIB (install name) on MachO.
virtual StringRef getLoadName() const = 0;
+ /// Returns platform-specific object flags, if any.
+ virtual std::error_code getPlatformFlags(unsigned &Result) const {
+ Result = 0;
+ return object_error::invalid_file_type;
+ }
+
/// @returns Pointer to ObjectFile subclass to handle this type of object.
/// @param ObjectPath The path to the object file. ObjectPath.isObject must
/// return true.
return getObject()->getSymbolType(getRawDataRefImpl(), Result);
}
+inline std::error_code SymbolRef::getOther(uint8_t &Result) const {
+ return getObject()->getSymbolOther(getRawDataRefImpl(), Result);
+}
+
inline const ObjectFile *SymbolRef::getObject() const {
const SymbolicFile *O = BasicSymbolRef::getObject();
return cast<ObjectFile>(O);