diff options
author | Chris Johns <chrisj@rtems.org> | 2020-05-05 11:31:04 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2020-05-05 11:31:04 +1000 |
commit | 6de89d9268f3019f2eb9cf7e1ad8102792d6a428 (patch) | |
tree | 296ec5266df8592e8d7e623497b3feaa0e37f089 | |
parent | Allow build with i686-w64-mingw32 (diff) | |
download | rtems-tools-6de89d9268f3019f2eb9cf7e1ad8102792d6a428.tar.bz2 |
linkers/ld: Output all reloc records to the RAP file
Updates #3969
-rw-r--r-- | rtemstoolkit/rld-rap.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/rtemstoolkit/rld-rap.cpp b/rtemstoolkit/rld-rap.cpp index 809b6d1..18bd763 100644 --- a/rtemstoolkit/rld-rap.cpp +++ b/rtemstoolkit/rld-rap.cpp @@ -924,7 +924,7 @@ namespace rld { uint32_t relocs = 0; for (int s = 0; s < rap_secs; ++s) - relocs += secs[s].relocs.size (); + relocs += get_relocations (s); return relocs; } @@ -1355,6 +1355,8 @@ namespace rld void image::write_relocations (compress::compressor& comp) { + uint32_t rr = 0; + for (int s = 0; s < rap_secs; ++s) { uint32_t count = get_relocations (s); @@ -1390,7 +1392,7 @@ namespace rld for (relocations::const_iterator ri = relocs.begin (); ri != relocs.end (); - ++ri, ++sr, ++rc) + ++ri) { const relocation& reloc = *ri; uint32_t info = GELF_R_TYPE (reloc.info); @@ -1399,12 +1401,6 @@ namespace rld bool write_addend = sec.rela; bool write_symname = false; - /* - * Ignore section index 0 - */ - if (reloc.symsect == 0) - continue; - offset = sec.offset + reloc.offset; if (rld::verbose () >= RLD_VERBOSE_TRACE) @@ -1504,6 +1500,10 @@ namespace rld if (write_symname) comp << reloc.symname; + + ++rc; + ++sr; + ++rr; } } } @@ -1723,7 +1723,8 @@ namespace rld compressor.transferred ()) % 10; std::cout << "rap: objects: " << app_objects.size () << ", size: " << compressor.compressed () - << ", compression: " << pcent << '.' << premand << '%' + << ", expanded: " << compressor.transferred () + << ", compressed: " << pcent << '.' << premand << '%' << std::endl; } } |