31 const std::string &filename,
51 return std::move(dest);
61 const std::string &filename,
84 message.
error() <<
"Failed to read header from '" << filename <<
"'"
91 if(hdr[0]==0x7f && hdr[1]==
'G' && hdr[2]==
'B' && hdr[3]==
'F')
94 in, filename, symbol_table, goto_functions, message_handler);
96 else if(hdr[0]==0x7f && hdr[1]==
'E' && hdr[2]==
'L' && hdr[3]==
'F')
109 in, filename, symbol_table, goto_functions, message_handler);
114 "failed to find goto-cc section in ELF binary" <<
messaget::eom;
130 if(osx_fat_reader.
has_gb())
133 if(osx_fat_reader.
extract_gb(filename, tempname()))
144 temp_in, filename, symbol_table, goto_functions, message_handler);
151 message.
error() <<
"failed to find goto binary in Mach-O file"
163 osx_mach_o_readert::sectionst::const_iterator entry =
164 mach_o_reader.
sections.find(
"goto-cc");
165 if(entry != mach_o_reader.
sections.end())
167 in.seekg(entry->second.offset);
169 in, filename, symbol_table, goto_functions, message_handler);
174 <<
"failed to find goto-cc section in Mach-O binary" <<
messaget::eom;
192 const std::string &filename,
213 if(hdr[0]==0x7f && hdr[1]==
'G' && hdr[2]==
'B' && hdr[3]==
'F')
217 else if(hdr[0]==0x7f && hdr[1]==
'E' && hdr[2]==
'L' && hdr[3]==
'F')
240 if(osx_fat_reader.
has_gb())
275 const std::string &file_name,
284 if(!temp_model.has_value())
309 const std::string &file_name,