32 const std::string &filename,
52 return std::move(dest);
62 const std::string &filename,
85 message.
error() <<
"Failed to read header from '" << filename <<
"'"
92 if(hdr[0]==0x7f && hdr[1]==
'G' && hdr[2]==
'B' && hdr[3]==
'F')
95 in, filename, symbol_table, goto_functions, message_handler);
97 else if(hdr[0]==0x7f && hdr[1]==
'E' && hdr[2]==
'L' && hdr[3]==
'F')
110 in, filename, symbol_table, goto_functions, message_handler);
115 "failed to find goto-cc section in ELF binary" <<
messaget::eom;
131 if(osx_fat_reader.
has_gb())
134 if(osx_fat_reader.
extract_gb(filename, tempname()))
145 temp_in, filename, symbol_table, goto_functions, message_handler);
152 message.
error() <<
"failed to find goto binary in Mach-O file"
164 osx_mach_o_readert::sectionst::const_iterator entry =
165 mach_o_reader.
sections.find(
"goto-cc");
166 if(entry != mach_o_reader.
sections.end())
168 in.seekg(entry->second.offset);
170 in, filename, symbol_table, goto_functions, message_handler);
175 <<
"failed to find goto-cc section in Mach-O binary" <<
messaget::eom;
193 const std::string &filename,
214 if(hdr[0]==0x7f && hdr[1]==
'G' && hdr[2]==
'B' && hdr[3]==
'F')
218 else if(hdr[0]==0x7f && hdr[1]==
'E' && hdr[2]==
'L' && hdr[3]==
'F')
241 if(osx_fat_reader.
has_gb())
276 const std::string &file_name,
281 <<
"Reading GOTO program from file " << file_name <<
messaget::eom;
285 if(!temp_model.has_value())
292 const std::list<std::string> &file_names,
296 if(file_names.empty())
301 for(
const auto &file_name : file_names)
304 if(!updates_opt.has_value())
307 object_type_updates.insert(updates_opt->begin(), updates_opt->end());