/openjdk7/hotspot/src/share/vm/utilities/ |
H A D | elfStringTable.cpp | 35 ElfStringTable::ElfStringTable(FILE* file, Elf_Shdr shdr, int index) { argument 45 m_table = (char*)os::malloc(sizeof(char) * shdr.sh_size, mtInternal); 48 if (fseek(file, shdr.sh_offset, SEEK_SET) || 49 fread((void*)m_table, shdr.sh_size, 1, file) != 1 || 56 memcpy(&m_shdr, &shdr, sizeof(Elf_Shdr));
|
H A D | elfSymbolTable.cpp | 32 ElfSymbolTable::ElfSymbolTable(FILE* file, Elf_Shdr shdr) { argument 43 m_symbols = (Elf_Sym*)os::malloc(shdr.sh_size, mtInternal); 45 if (fseek(file, shdr.sh_offset, SEEK_SET) || 46 fread((void*)m_symbols, shdr.sh_size, 1, file) != 1 || 54 memcpy(&m_shdr, &shdr, sizeof(Elf_Shdr));
|
H A D | elfFile.cpp | 113 Elf_Shdr shdr; local 118 if (fread((void*)&shdr, sizeof(Elf_Shdr), 1, m_file) != 1) { 123 if (shdr.sh_type == SHT_STRTAB) { 124 ElfStringTable* table = new (std::nothrow) ElfStringTable(m_file, shdr, index); 130 } else if (shdr.sh_type == SHT_SYMTAB || shdr.sh_type == SHT_DYNSYM) { 131 ElfSymbolTable* table = new (std::nothrow) ElfSymbolTable(m_file, shdr);
|
/openjdk7/hotspot/agent/src/os/bsd/ |
H A D | salibelf.c | 88 void* read_section_data(int fd, ELF_EHDR* ehdr, ELF_SHDR* shdr) { argument 90 if (shdr->sh_type == SHT_NOBITS || shdr->sh_size == 0) { 93 if ((buf = calloc(shdr->sh_size, 1)) == NULL) { 97 if (pread(fd, buf, shdr->sh_size, shdr->sh_offset) != shdr->sh_size) {
|
H A D | symtab.c | 115 ELF_SHDR *shdr = scn_cache[cnt].c_shdr; local 117 if (shdr->sh_type == symsection) { 135 n = shdr->sh_size / shdr->sh_entsize; 144 // shdr->sh_link points to the section that contains the actual strings 148 size = scn_cache[shdr->sh_link].c_shdr->sh_size; 152 memcpy(symtab->strs, scn_cache[shdr->sh_link].c_data, size);
|
/openjdk7/hotspot/agent/src/os/linux/ |
H A D | salibelf.c | 87 void* read_section_data(int fd, ELF_EHDR* ehdr, ELF_SHDR* shdr) { argument 89 if (shdr->sh_type == SHT_NOBITS || shdr->sh_size == 0) { 92 if ((buf = calloc(shdr->sh_size, 1)) == NULL) { 96 if (pread(fd, buf, shdr->sh_size, shdr->sh_offset) != shdr->sh_size) {
|
H A D | symtab.c | 374 ELF_SHDR *shdr = scn_cache[cnt].c_shdr; local 376 if (shdr->sh_type == sym_section) { 394 n = shdr->sh_size / shdr->sh_entsize; 402 // shdr->sh_link points to the section that contains the actual strings 406 size = scn_cache[shdr->sh_link].c_shdr->sh_size; 408 memcpy(symtab->strs, scn_cache[shdr->sh_link].c_data, size);
|
/openjdk7/hotspot/src/os/solaris/fix_empty_sec_hdr_flags/ |
H A D | fix_empty_sec_hdr_flags.c | 56 void * shdr; /* ELF section header */ local 120 shdr = elf64_getshdr(scn); 122 shdr = elf32_getshdr(scn); 124 if (shdr == NULL) { 129 name = (char *)shstrtab->d_buf + ((Elf64_Shdr *) shdr)->sh_name; 131 name = (char *)shstrtab->d_buf + ((Elf32_Shdr *) shdr)->sh_name; 135 has_flag_set = ((Elf64_Shdr *) shdr)->sh_flags & SHF_ALLOC; 136 is_empty = ((Elf64_Shdr *) shdr)->sh_addr == 0 && 137 ((Elf64_Shdr *) shdr)->sh_size == 0; 139 has_flag_set = ((Elf32_Shdr *) shdr) [all...] |
/openjdk7/jdk/make/tools/fix_empty_sec_hdr_flags/ |
H A D | fix_empty_sec_hdr_flags.c | 56 void * shdr; /* ELF section header */ local 120 shdr = elf64_getshdr(scn); 122 shdr = elf32_getshdr(scn); 124 if (shdr == NULL) { 129 name = (char *)shstrtab->d_buf + ((Elf64_Shdr *) shdr)->sh_name; 131 name = (char *)shstrtab->d_buf + ((Elf32_Shdr *) shdr)->sh_name; 135 has_flag_set = ((Elf64_Shdr *) shdr)->sh_flags & SHF_ALLOC; 136 is_empty = ((Elf64_Shdr *) shdr)->sh_addr == 0 && 137 ((Elf64_Shdr *) shdr)->sh_size == 0; 139 has_flag_set = ((Elf32_Shdr *) shdr) [all...] |
/openjdk7/hotspot/src/os/solaris/add_gnu_debuglink/ |
H A D | add_gnu_debuglink.c | 72 void * shdr; /* ELF section header */ local 139 shdr = elf64_getshdr(scn); 141 shdr = elf32_getshdr(scn); 143 if (shdr == NULL) { 152 name_dat->d_off = ((Elf64_Shdr *) shdr)->sh_size + 1; 154 name_dat->d_off = ((Elf32_Shdr *) shdr)->sh_size + 1; 165 ((Elf64_Shdr *) new_shdr)->sh_name = ((Elf64_Shdr *) shdr)->sh_size; 167 ((Elf64_Shdr *) shdr)->sh_size += (strlen(SEC_NAME) + 1); 172 ((Elf32_Shdr *) new_shdr)->sh_name = ((Elf32_Shdr *) shdr)->sh_size; 174 ((Elf32_Shdr *) shdr) [all...] |
/openjdk7/jdk/make/tools/add_gnu_debuglink/ |
H A D | add_gnu_debuglink.c | 72 void * shdr; /* ELF section header */ local 139 shdr = elf64_getshdr(scn); 141 shdr = elf32_getshdr(scn); 143 if (shdr == NULL) { 152 name_dat->d_off = ((Elf64_Shdr *) shdr)->sh_size + 1; 154 name_dat->d_off = ((Elf32_Shdr *) shdr)->sh_size + 1; 165 ((Elf64_Shdr *) new_shdr)->sh_name = ((Elf64_Shdr *) shdr)->sh_size; 167 ((Elf64_Shdr *) shdr)->sh_size += (strlen(SEC_NAME) + 1); 172 ((Elf32_Shdr *) new_shdr)->sh_name = ((Elf32_Shdr *) shdr)->sh_size; 174 ((Elf32_Shdr *) shdr) [all...] |