mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
Make getOther ELF only.
No other format has this field. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240774 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -45,6 +45,7 @@ protected:
|
||||
ELFObjectFileBase(unsigned int Type, MemoryBufferRef Source);
|
||||
|
||||
virtual uint64_t getSymbolSize(DataRefImpl Symb) const = 0;
|
||||
virtual uint8_t getSymbolOther(DataRefImpl Symb) const = 0;
|
||||
|
||||
public:
|
||||
virtual ErrorOr<int64_t> getRelocationAddend(DataRefImpl Rel) const = 0;
|
||||
@ -77,6 +78,10 @@ public:
|
||||
uint64_t getSize() const {
|
||||
return getObject()->getSymbolSize(getRawDataRefImpl());
|
||||
}
|
||||
|
||||
uint8_t getOther() const {
|
||||
return getObject()->getSymbolOther(getRawDataRefImpl());
|
||||
}
|
||||
};
|
||||
|
||||
class elf_symbol_iterator : public symbol_iterator {
|
||||
@ -130,7 +135,7 @@ protected:
|
||||
uint32_t getSymbolAlignment(DataRefImpl Symb) const override;
|
||||
uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const override;
|
||||
uint32_t getSymbolFlags(DataRefImpl Symb) const override;
|
||||
std::error_code getSymbolOther(DataRefImpl Symb, uint8_t &Res) const override;
|
||||
uint8_t getSymbolOther(DataRefImpl Symb) const override;
|
||||
std::error_code getSymbolType(DataRefImpl Symb,
|
||||
SymbolRef::Type &Res) const override;
|
||||
section_iterator getSymbolSection(const Elf_Sym *Symb) const;
|
||||
@ -380,10 +385,8 @@ uint64_t ELFObjectFile<ELFT>::getCommonSymbolSizeImpl(DataRefImpl Symb) const {
|
||||
}
|
||||
|
||||
template <class ELFT>
|
||||
std::error_code ELFObjectFile<ELFT>::getSymbolOther(DataRefImpl Symb,
|
||||
uint8_t &Result) const {
|
||||
Result = toELFSymIter(Symb)->st_other;
|
||||
return std::error_code();
|
||||
uint8_t ELFObjectFile<ELFT>::getSymbolOther(DataRefImpl Symb) const {
|
||||
return toELFSymIter(Symb)->st_other;
|
||||
}
|
||||
|
||||
template <class ELFT>
|
||||
|
Reference in New Issue
Block a user