34 for(std::size_t i=0; i<count; i++)
54 sym.
is_weak = (flags &(1 << 16))!=0;
55 sym.
is_type = (flags &(1 << 15))!=0;
57 sym.
is_macro = (flags &(1 << 13))!=0;
59 sym.
is_input = (flags &(1 << 11))!=0;
79 symbol_table.
add(sym);
84 for(std::size_t fct_index = 0; fct_index < count; ++fct_index)
89 typedef std::map<goto_programt::targett, std::list<unsigned> > target_mapt;
90 target_mapt target_map;
91 typedef std::map<unsigned, goto_programt::targett> rev_target_mapt;
92 rev_target_mapt rev_target_map;
97 for(std::size_t ins_index = 0; ins_index < ins_count; ++ins_index)
112 code, source_location, instruction_type, guard, {}};
114 instruction.target_number = irepconverter.
read_gb_word(in);
115 if(instruction.is_target() &&
116 rev_target_map.insert(
117 rev_target_map.end(),
118 std::make_pair(instruction.target_number, itarget))->second!=itarget)
122 for(std::size_t i=0; i<t_count; i++)
124 target_map[itarget].push_back(irepconverter.
read_gb_word(in));
128 for(std::size_t i=0; i<l_count; i++)
131 instruction.labels.push_back(label);
138 itarget->
swap(instruction);
142 for(target_mapt::iterator tit = target_map.begin();
143 tit!=target_map.end();
148 for(std::list<unsigned>::iterator nit = tit->second.begin();
149 nit!=tit->second.end();
153 rev_target_mapt::const_iterator entry=rev_target_map.find(n);
155 entry != rev_target_map.end(),
156 "something from the target map should also be in the reverse target "
158 ins->targets.push_back(entry->second);
178 const std::string &filename,
187 hdr[0]=
static_cast<char>(in.get());
188 hdr[1]=
static_cast<char>(in.get());
189 hdr[2]=
static_cast<char>(in.get());
191 if(hdr[0]==
'G' && hdr[1]==
'B' && hdr[2]==
'F')
197 hdr[3]=
static_cast<char>(in.get());
198 if(hdr[0]==0x7f && hdr[1]==
'G' && hdr[2]==
'B' && hdr[3]==
'F')
202 else if(hdr[0]==0x7f && hdr[1]==
'E' && hdr[2]==
'L' && hdr[3]==
'F')
204 if(!filename.empty())
205 message.
error() <<
"Sorry, but I can't read ELF binary '" << filename
208 message.
error() <<
"Sorry, but I can't read ELF binaries"
215 message.
error() <<
"'" << filename <<
"' is not a goto-binary"
232 "The input was compiled with an old version of "
243 "The input was compiled with an unsupported version of "