src/share/vm/utilities/elfSymbolTable.cpp

changeset 3901
24b9c7f4cae6
parent 3900
d2a62e0f25eb
child 4153
b9a9ed0f8eeb
equal deleted inserted replaced
3898:bcffa4c5eef6 3901:24b9c7f4cae6
38 38
39 // try to load the string table 39 // try to load the string table
40 long cur_offset = ftell(file); 40 long cur_offset = ftell(file);
41 if (cur_offset != -1) { 41 if (cur_offset != -1) {
42 // call malloc so we can back up if memory allocation fails. 42 // call malloc so we can back up if memory allocation fails.
43 m_symbols = (Elf_Sym*)os::malloc(shdr.sh_size); 43 m_symbols = (Elf_Sym*)os::malloc(shdr.sh_size, mtInternal);
44 if (m_symbols) { 44 if (m_symbols) {
45 if (fseek(file, shdr.sh_offset, SEEK_SET) || 45 if (fseek(file, shdr.sh_offset, SEEK_SET) ||
46 fread((void*)m_symbols, shdr.sh_size, 1, file) != 1 || 46 fread((void*)m_symbols, shdr.sh_size, 1, file) != 1 ||
47 fseek(file, cur_offset, SEEK_SET)) { 47 fseek(file, cur_offset, SEEK_SET)) {
48 m_status = NullDecoder::file_invalid; 48 m_status = NullDecoder::file_invalid;

mercurial