mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-25 15:19:14 +00:00
Remove Elf_Rela_Iter and Elf_Rel_Iter.
Use just the pointers and check for invalid relocation sections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242700 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -310,8 +310,7 @@ class PrinterContext {
|
||||
|
||||
typedef typename object::ELFFile<ET>::Elf_Sym Elf_Sym;
|
||||
typedef typename object::ELFFile<ET>::Elf_Shdr Elf_Shdr;
|
||||
|
||||
typedef typename object::ELFFile<ET>::Elf_Rel_Iter Elf_Rel_iterator;
|
||||
typedef typename object::ELFFile<ET>::Elf_Rel Elf_Rel;
|
||||
|
||||
static const size_t IndexTableEntrySize;
|
||||
|
||||
@@ -366,12 +365,11 @@ PrinterContext<ET>::FindExceptionTable(unsigned IndexSectionIndex,
|
||||
|
||||
for (const Elf_Shdr &Sec : ELF->sections()) {
|
||||
if (Sec.sh_type == ELF::SHT_REL && Sec.sh_info == IndexSectionIndex) {
|
||||
for (Elf_Rel_iterator RI = ELF->rel_begin(&Sec), RE = ELF->rel_end(&Sec);
|
||||
RI != RE; ++RI) {
|
||||
if (RI->r_offset == static_cast<unsigned>(IndexTableOffset)) {
|
||||
for (const Elf_Rel &R : ELF->rels(&Sec)) {
|
||||
if (R.r_offset == static_cast<unsigned>(IndexTableOffset)) {
|
||||
typename object::ELFFile<ET>::Elf_Rela RelA;
|
||||
RelA.r_offset = RI->r_offset;
|
||||
RelA.r_info = RI->r_info;
|
||||
RelA.r_offset = R.r_offset;
|
||||
RelA.r_info = R.r_info;
|
||||
RelA.r_addend = 0;
|
||||
|
||||
std::pair<const Elf_Shdr *, const Elf_Sym *> Symbol =
|
||||
|
||||
Reference in New Issue
Block a user