Changeset 212 for soft


Ignore:
Timestamp:
Aug 24, 2012, 1:28:35 PM (12 years ago)
Author:
karaoui
Message:

add the support for replication of code to MeMo?

Location:
soft/giet_vm/memo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/memo/include/memo.h

    r210 r212  
    6969   
    7070    bool m_ginit;
    71     elfpp::object* m_generator;//TODO:delete
     71    elfpp::object* m_generator;
    7272
    7373    size_t load_bin(std::string filename, void* buffer);   
     
    7575
    7676    elfpp::section* get_sect_by_addr(elfpp::object *loader, unsigned int addr);
    77     elfpp::section* get_sect_by_name(elfpp::object *loader, std::string name);
    7877
    7978public:
  • soft/giet_vm/memo/src/memo.cpp

    r211 r212  
    441441            elfpp::object* loader = m_loaders[filePath];//TODO:free!?
    442442
    443             sect =  get_sect_by_addr(loader, cur_vaddr);
    444             assert(sect and "No section found");
     443            sect =  new elfpp::section(*get_sect_by_addr(loader, cur_vaddr));//copy: for the case we replicate the code
     444            if (!sect)
     445            {
     446                std::cerr << "No section found for " << cur_vobj->name << " at "<< cur_vaddr << std::endl;
     447                exit(-1);
     448            }
    445449
    446450            sect->set_name(std::string(cur_vobj->name));
     
    524528
    525529    sect->set_vaddr((*vSO).lma());
    526     m_generator->add_section(*(new elfpp::section(*sect)));
     530    m_generator->add_section(*sect);
    527531
    528532} // end vseg_map()
Note: See TracChangeset for help on using the changeset viewer.