Changeset 26b46b1 in rtems-tools for linkers


Ignore:
Timestamp:
Mar 1, 2013, 4:42:08 AM (7 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, master
Children:
f4cf8f4
Parents:
69a123b
Message:

Fix RELA in RAP formats.

Fixed the RELA handling in the merging of the object sections into the
RAP sections. A method in the rap::image class was not being used any
more and that code transferred the RELA setting from the object sections
to the image section. This change adds also transfers the rela field.

Location:
linkers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • linkers/rld-rap.cpp

    r69a123b r26b46b1  
    366366
    367367      /**
    368        * Update the section values.
    369        *
    370        * @param index The RAP section index to update.
    371        * @param sec The object's RAP section.
    372        */
    373       void update_section (int index, section& sec);
    374 
    375       /**
    376368       * Report the RAP section's size.
    377369       */
     
    551543                  << ": size: " << size (offset)
    552544                  << " offset: " << offset
     545                  << " rela: " << (rela ? "yes" : "no")
    553546                  << std::endl;
    554547
     
    649642                  << " fsec.size=" << fsec.size
    650643                  << " fsec.alignment=" << fsec.alignment
     644                  << " fsec.rela=" << fsec.rela
    651645                  << " " << obj.obj.name ().full ()  << std::endl;
    652646
     
    889883            sec_size[s] = obj.secs[s].offset + obj.secs[s].size ();
    890884            sec_align[s] = obj.secs[s].alignment ();
     885            sec_rela[s] = obj.secs[s].rela;
    891886          }
    892887          ++poi;
     
    13891384    }
    13901385
    1391     void
    1392     image::update_section (int index, section& sec)
    1393     {
    1394       uint32_t in = sec_size[index];
    1395       sec_size[index] = align_offset (sec_size[index], sec.size (), sec.alignment ());
    1396       sec_align[index] = sec.alignment ();
    1397       sec_rela[index] = sec.rela;
    1398 
    1399       if (rld::verbose () >= RLD_VERBOSE_FULL_DEBUG)
    1400         std::cout << "rap:image::update-section: " << section_names[index]
    1401                   << " offset=" << in
    1402                   << " sec_size=" << sec_size[index]
    1403                   << " sec_align=" << sec_align[index]
    1404                   << " sec.size=" << sec.size ()
    1405                   << std::endl;
    1406     }
    1407 
    14081386    uint32_t
    14091387    image::section_size (sections sec) const
  • linkers/rtems-rapper.cpp

    r69a123b r26b46b1  
    751751        if (r.secs[s].relocs.size ())
    752752        {
     753          const char* rela = r.secs[s].rela ? "(A)" : "   ";
    753754          std::cout << std::setw (16) << r.secs[s].name
    754                     << ": info       offset     addend     symbol name" << std::endl;
     755                    << ": info       offset     addend "
     756                    << rela
     757                    << " symbol name" << std::endl;
    755758          for (size_t f = 0; f < r.secs[s].relocs.size (); ++f)
    756759          {
Note: See TracChangeset for help on using the changeset viewer.