2796N/A * or visit www.oracle.com if you need additional information or have any
2796N/A#include "libproc_impl.h"
2796N/A#include "salibelf.h"
2796N/A// Refer to filemap.hpp.
2796N/A// Refer to CompactingPermGenGen::n_regions in compactingPermGenGen.hpp
2796N/A// Refer to FileMapInfo::_current_version in filemap.hpp
2796N/A // 4991491 NOTICE These are C++ bool's in filemap.hpp and must match up with
2796N/A if (useSharedSpacesAddr == 0) {
2796N/A if ((int)useSharedSpaces == 0) {
2796N/A if (sharedArchivePathAddrAddr == 0) {
2796N/A != sizeof(struct FileMapHeader)) {
2796N/A for (m = 0; m < NUM_SHARED_MAPS; m++) {
2796N/Astatic bool core_read_data(struct ps_prochandle* ph, uintptr_t addr, char *buf, size_t size) {
2796N/A * "thread". Please refer to Linux kernel src file 'fs/binfmt_elf.c', in particular
2796N/Astatic bool read_lib_segments(struct ps_prochandle* ph, int lib_fd, ELF_EHDR* lib_ehdr, uintptr_t lib_base) {
2796N/A if ((lib_php->p_type == PT_LOAD) && !(lib_php->p_flags & PF_W) && (lib_php->p_filesz != 0)) {
2796N/A if (add_map_info(ph, lib_fd, lib_php->p_offset, lib_php->p_vaddr + lib_base, lib_php->p_filesz) == NULL)
2796N/A if (read_lib_segments(ph, ph->core->interp_fd, &interp_ehdr, ph->core->ld_base_addr) != true) {
2796N/A if (add_map_info(ph, ph->core->exec_fd, exec_php->p_offset, exec_php->p_vaddr, exec_php->p_filesz) == NULL) goto err;
2796N/A pread(ph->core->exec_fd, interp_name, MIN(exec_php->p_filesz, BUF_SIZE), exec_php->p_offset);
2796N/A case PT_DYNAMIC: {
2796N/A while (link_map_addr != 0) {
2796N/A if (read_elf_header(ph->core->core_fd, &core_ehdr) != true || core_ehdr.e_type != ET_CORE) {