mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Implement containsSymbol with other lower level methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241112 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -222,7 +222,6 @@ protected:
|
||||
bool isSectionData(DataRefImpl Sec) const override;
|
||||
bool isSectionBSS(DataRefImpl Sec) const override;
|
||||
bool isSectionVirtual(DataRefImpl Sec) const override;
|
||||
bool sectionContainsSymbol(DataRefImpl Sec, DataRefImpl Symb) const override;
|
||||
relocation_iterator section_rel_begin(DataRefImpl Sec) const override;
|
||||
relocation_iterator section_rel_end(DataRefImpl Sec) const override;
|
||||
section_iterator getRelocatedSection(DataRefImpl Sec) const override;
|
||||
@ -595,17 +594,6 @@ bool ELFObjectFile<ELFT>::isSectionVirtual(DataRefImpl Sec) const {
|
||||
return toELFShdrIter(Sec)->sh_type == ELF::SHT_NOBITS;
|
||||
}
|
||||
|
||||
template <class ELFT>
|
||||
bool ELFObjectFile<ELFT>::sectionContainsSymbol(DataRefImpl Sec,
|
||||
DataRefImpl Symb) const {
|
||||
const Elf_Sym *ESym = toELFSymIter(Symb);
|
||||
|
||||
uintX_t Index = ESym->st_shndx;
|
||||
bool Reserved = Index >= ELF::SHN_LORESERVE && Index <= ELF::SHN_HIRESERVE;
|
||||
|
||||
return !Reserved && (&*toELFShdrIter(Sec) == EF.getSection(ESym->st_shndx));
|
||||
}
|
||||
|
||||
template <class ELFT>
|
||||
relocation_iterator
|
||||
ELFObjectFile<ELFT>::section_rel_begin(DataRefImpl Sec) const {
|
||||
|
Reference in New Issue
Block a user