Lines Matching defs:vmlinux
60 fprintf(f, "Usage: loongson3-llsc-check /path/to/vmlinux\n");
241 void *vmlinux;
253 perror("Unable to open vmlinux");
259 perror("Unable to stat vmlinux");
263 vmlinux = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, vmlinux_fd, 0);
264 if (vmlinux == MAP_FAILED) {
265 perror("Unable to mmap vmlinux");
269 eh = vmlinux;
271 fprintf(stderr, "vmlinux is not an ELF?\n");
276 fprintf(stderr, "vmlinux is not 64b?\n");
281 fprintf(stderr, "vmlinux is not little endian?\n");
286 sh = vmlinux + le64toh(eh->e_shoff) + (i * le16toh(eh->e_shentsize));
294 vmlinux + le64toh(sh->sh_offset),
302 munmap(vmlinux, st.st_size);