mirror of
https://git.rtems.org/rtems-tools/
synced 2025-06-05 22:20:22 +08:00
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.
This commit is contained in:
parent
69a123b718
commit
26b46b1d36
@ -364,14 +364,6 @@ namespace rld
|
||||
*/
|
||||
void clear ();
|
||||
|
||||
/**
|
||||
* Update the section values.
|
||||
*
|
||||
* @param index The RAP section index to update.
|
||||
* @param sec The object's RAP section.
|
||||
*/
|
||||
void update_section (int index, section& sec);
|
||||
|
||||
/**
|
||||
* Report the RAP section's size.
|
||||
*/
|
||||
@ -550,6 +542,7 @@ namespace rld
|
||||
std::cout << ' ' << name
|
||||
<< ": size: " << size (offset)
|
||||
<< " offset: " << offset
|
||||
<< " rela: " << (rela ? "yes" : "no")
|
||||
<< std::endl;
|
||||
|
||||
for (osecindexes::const_iterator osi = osindexes.begin ();
|
||||
@ -648,6 +641,7 @@ namespace rld
|
||||
<< " offset=" << offset
|
||||
<< " fsec.size=" << fsec.size
|
||||
<< " fsec.alignment=" << fsec.alignment
|
||||
<< " fsec.rela=" << fsec.rela
|
||||
<< " " << obj.obj.name ().full () << std::endl;
|
||||
|
||||
/*
|
||||
@ -888,6 +882,7 @@ namespace rld
|
||||
obj.secs[s].set_offset (pobj.secs[s]);
|
||||
sec_size[s] = obj.secs[s].offset + obj.secs[s].size ();
|
||||
sec_align[s] = obj.secs[s].alignment ();
|
||||
sec_rela[s] = obj.secs[s].rela;
|
||||
}
|
||||
++poi;
|
||||
}
|
||||
@ -1388,23 +1383,6 @@ namespace rld
|
||||
fini_off = 0;
|
||||
}
|
||||
|
||||
void
|
||||
image::update_section (int index, section& sec)
|
||||
{
|
||||
uint32_t in = sec_size[index];
|
||||
sec_size[index] = align_offset (sec_size[index], sec.size (), sec.alignment ());
|
||||
sec_align[index] = sec.alignment ();
|
||||
sec_rela[index] = sec.rela;
|
||||
|
||||
if (rld::verbose () >= RLD_VERBOSE_FULL_DEBUG)
|
||||
std::cout << "rap:image::update-section: " << section_names[index]
|
||||
<< " offset=" << in
|
||||
<< " sec_size=" << sec_size[index]
|
||||
<< " sec_align=" << sec_align[index]
|
||||
<< " sec.size=" << sec.size ()
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
image::section_size (sections sec) const
|
||||
{
|
||||
|
@ -750,8 +750,11 @@ rap_show (rld::files::paths& raps,
|
||||
{
|
||||
if (r.secs[s].relocs.size ())
|
||||
{
|
||||
const char* rela = r.secs[s].rela ? "(A)" : " ";
|
||||
std::cout << std::setw (16) << r.secs[s].name
|
||||
<< ": info offset addend symbol name" << std::endl;
|
||||
<< ": info offset addend "
|
||||
<< rela
|
||||
<< " symbol name" << std::endl;
|
||||
for (size_t f = 0; f < r.secs[s].relocs.size (); ++f)
|
||||
{
|
||||
rap::relocation& reloc = r.secs[s].relocs[f];
|
||||
|
Loading…
x
Reference in New Issue
Block a user