line611:
for ( Elf_Half i = 0; i < sym_no; ++i ) {
std::string name;
Elf64_Addr value = 0;
Elf_Xword size = 0;
unsigned char bind = 0;
unsigned char type = 0;
Elf_Half section = 0;
unsigned char other = 0;
symbols.get_symbol( i, name, value, size, bind, type, section, other );
symbol_table( out, i, name, value, size, bind, type, section, reader.get_class() );
}
line630:
static void
symbol_table( std::ostream& out,
Elf_Half no,
std::string& name,
Elf64_Addr value,
Elf_Xword size,
unsigned char bind,
unsigned char type,
Elf_Half section,
unsigned int elf_class )
If the sym count is over 65535(Elf_Half),it will never jump out from the loop, and the function "symbol_table" won't work expectly!
So we should change its type to Elf_Xword?
In elfio_dump.hpp,
line611: for ( Elf_Half i = 0; i < sym_no; ++i ) { std::string name; Elf64_Addr value = 0; Elf_Xword size = 0; unsigned char bind = 0; unsigned char type = 0; Elf_Half section = 0; unsigned char other = 0; symbols.get_symbol( i, name, value, size, bind, type, section, other ); symbol_table( out, i, name, value, size, bind, type, section, reader.get_class() ); } line630: static void symbol_table( std::ostream& out, Elf_Half no, std::string& name, Elf64_Addr value, Elf_Xword size, unsigned char bind, unsigned char type, Elf_Half section, unsigned int elf_class )
If the sym count is over 65535(Elf_Half),it will never jump out from the loop, and the function "symbol_table" won't work expectly! So we should change its type to Elf_Xword?