Plugin interfaces to do Pettis Hansen style code layout in the gold linker.
Ian Lance Taylor
iant@google.com
Thu Jul 14 02:18:00 GMT 2011
More information about the Binutils mailing list
Thu Jul 14 02:18:00 GMT 2011
- Previous message (by thread): Plugin interfaces to do Pettis Hansen style code layout in the gold linker.
- Next message (by thread): Plugin interfaces to do Pettis Hansen style code layout in the gold linker.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Sriraman Tallam <tmsriram@google.com> writes: > Made the changes and attached the new patch. Please also see function > get_view in plugin.cc. I made the following change to correct the > detection of whether get_view if called from the claim_file_hook. > > - if (this->objects_.size() == handle) > + if (this->in_claim_file_handler_) > { > // We are being called from the claim_file hook. > + const std::string section_name = obj->section_name(section.shndx); > + const char* section_name_c_ptr = section_name.c_str(); > + *section_name_ptr > + = static_cast<char*>(malloc(strlen(section_name_c_ptr) + 1)); > + strcpy(*section_name_ptr, section_name_c_ptr); > + return LDPS_OK; Change to something like const std::string section_name = obj->section_name(section.shndx); *section_name_ptr = static_cast<char*>(malloc(section_name.length() + 1)); memcpy(*section_name_ptr, section_name.c_str(), section_name.length() + 1); return LDPS_OK; This is OK with that change. Thanks, and thanks for your patience with this. Ian
- Previous message (by thread): Plugin interfaces to do Pettis Hansen style code layout in the gold linker.
- Next message (by thread): Plugin interfaces to do Pettis Hansen style code layout in the gold linker.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list