Changeset c2657cd in rtems-tools


Ignore:
Timestamp:
Nov 21, 2012, 6:40:44 AM (7 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, master
Children:
3f37835
Parents:
7b2762f
Message:

Clean archive names for every output format other than scripts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • linkers/rld-outputter.cpp

    r7b2762f rc2657cd  
    4444    script_text (const std::string&        entry,
    4545                 const files::object_list& dependents,
    46                  const files::cache&       cache)
     46                 const files::cache&       cache,
     47                 bool                      not_in_archive)
    4748    {
    4849      std::ostringstream out;
     
    6465      {
    6566        files::object& obj = *(*oi);
     67        std::string    name = obj.name ().basename ();
     68
     69        if (not_in_archive)
     70        {
     71          size_t pos = name.find (':');
     72          if (pos != std::string::npos)
     73            name[pos] = '_';
     74          pos = name.find ('@');
     75          if (pos != std::string::npos)
     76            name = name.substr (0, pos);
     77        }
    6678
    6779        if (rld::verbose () >= RLD_VERBOSE_INFO)
    68           std::cout << " o: " << obj.name ().full () << std::endl;
    69 
    70         out << "o:" << obj.name ().basename () << std::endl;
     80          std::cout << " o: " << name << std::endl;
     81
     82        out << "o:" << name << std::endl;
    7183
    7284        symbols::table& unresolved = obj.unresolved_symbols ();
     
    100112        std::cout << "metadata: " << metadata.name ().full () << std::endl;
    101113
    102       const std::string script = script_text (entry, dependents, cache);
     114      const std::string script = script_text (entry, dependents, cache, true);
    103115
    104116      metadata.open (true);
     
    183195      try
    184196      {
    185         out << script_text (entry, dependents, cache);
     197        out << script_text (entry, dependents, cache, false);
    186198      }
    187199      catch (...)
     
    266278      header += '\0';
    267279
    268       script = script_text (entry, dependents, cache);
     280      script = script_text (entry, dependents, cache, true);
    269281
    270282      cache.get_objects (objects);
Note: See TracChangeset for help on using the changeset viewer.