summaryrefslogtreecommitdiff
path: root/linkers
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-03-01 15:42:08 +1100
committerChris Johns <chrisj@rtems.org>2013-03-01 15:42:08 +1100
commit26b46b1d36770b49316da13adf3ee897a630a3e0 (patch)
treef9483d3598d7f6ba8db54baac1f35258fa76ae3f /linkers
parent69a123b71891df04747276387339f14e0535e4e6 (diff)
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.
Diffstat (limited to 'linkers')
-rw-r--r--linkers/rld-rap.cpp28
-rw-r--r--linkers/rtems-rapper.cpp5
2 files changed, 7 insertions, 26 deletions
diff --git a/linkers/rld-rap.cpp b/linkers/rld-rap.cpp
index b198017..8b3bbcb 100644
--- a/linkers/rld-rap.cpp
+++ b/linkers/rld-rap.cpp
@@ -365,14 +365,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.
*/
uint32_t section_size (sections sec) const;
@@ -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
{
diff --git a/linkers/rtems-rapper.cpp b/linkers/rtems-rapper.cpp
index 6c8315b..af7ba81 100644
--- a/linkers/rtems-rapper.cpp
+++ b/linkers/rtems-rapper.cpp
@@ -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];