Changeset 06a2cf6 in rtems-tools


Ignore:
Timestamp:
Dec 31, 2012, 7:11:47 AM (7 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, master
Children:
4e7ec70
Parents:
544de91
Message:

Sort the relocations by offset to make the overlay work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • linkers/rtems-rapper.cpp

    r544de91 r06a2cf6  
    7575
    7676  /**
     77   * Relocation offset sorter for the relocations container.
     78   */
     79  class reloc_offset_compare
     80  {
     81  public:
     82    bool operator () (const relocation& lhs,
     83                      const relocation& rhs) const {
     84      return lhs.offset < rhs.offset;
     85    }
     86  };
     87
     88  /**
    7789   * A RAP section.
    7890   */
     
    286298        relocs.push_back (reloc);
    287299      }
     300
     301      std::stable_sort (relocs.begin (), relocs.end (), reloc_offset_compare ());
    288302    }
    289303  }
     
    648662        while (offset < r.strtab_size)
    649663        {
    650           std::cout << std::setw (16) << count++ << ": "
     664          std::cout << std::setw (16) << count++
     665                    << std::hex << std::setfill ('0')
     666                    << " (0x" << std::setw (6) << offset << "): "
     667                    << std::dec << std::setfill (' ')
    651668                    << (char*) &r.strtab[offset] << std::endl;
    652669          offset += ::strlen ((char*) &r.strtab[offset]) + 1;
     
    725742                << "No relocation table found." << std::endl;
    726743    }
    727 
    728744  }
    729745
Note: See TracChangeset for help on using the changeset viewer.