Lines Matching +full:0 +full:x94000000

37 #define R_AARCH64_NONE		0
74 file_append_size = 0; in file_append_cleanup()
75 file_updated = 0; in file_append_cleanup()
112 off_t idx = 0; in uwrite()
136 cnt = 0; in uwrite()
154 if (addr == 0) { in umalloc()
183 file_updated = 0; in mmap_file()
184 sb.st_size = 0; in mmap_file()
187 if (fd_map < 0) { in mmap_file()
191 if (fstat(fd_map, &sb) < 0) { in mmap_file()
199 file_map = mmap(0, sb.st_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, in mmap_file()
200 fd_map, 0); in mmap_file()
215 mmap_failed = 0; in mmap_file()
226 static unsigned char ideal_nop5_x86_64[5] = { 0x0f, 0x1f, 0x44, 0x00, 0x00 };
227 static unsigned char ideal_nop5_x86_32[5] = { 0x3e, 0x8d, 0x74, 0x26, 0x00 };
239 /* Confirm we have 0xe8 0x0 0x0 0x0 0x0 */ in make_nop_x86()
241 if (*ptr != 0) in make_nop_x86()
245 if (*op != 0xe8) in make_nop_x86()
249 if (ulseek(offset - 1, SEEK_SET) < 0) in make_nop_x86()
251 if (uwrite(ideal_nop, 5) < 0) in make_nop_x86()
253 return 0; in make_nop_x86()
256 static unsigned char ideal_nop4_arm_le[4] = { 0x00, 0x00, 0xa0, 0xe1 }; /* mov r0, r0 */
257 static unsigned char ideal_nop4_arm_be[4] = { 0xe1, 0xa0, 0x00, 0x00 }; /* mov r0, r0 */
260 static unsigned char bl_mcount_arm_le[4] = { 0xfe, 0xff, 0xff, 0xeb }; /* bl */
261 static unsigned char bl_mcount_arm_be[4] = { 0xeb, 0xff, 0xff, 0xfe }; /* bl */
264 static unsigned char push_arm_le[4] = { 0x04, 0xe0, 0x2d, 0xe5 }; /* push {lr} */
265 static unsigned char push_arm_be[4] = { 0xe5, 0x2d, 0xe0, 0x04 }; /* push {lr} */
268 static unsigned char ideal_nop2_thumb_le[2] = { 0x00, 0xbf }; /* nop */
269 static unsigned char ideal_nop2_thumb_be[2] = { 0xbf, 0x00 }; /* nop */
272 static unsigned char push_bl_mcount_thumb_le[6] = { 0x00, 0xb5, 0xff, 0xf7, 0xfe, 0xff }; /* push {…
273 static unsigned char push_bl_mcount_thumb_be[6] = { 0xb5, 0x00, 0xf7, 0xff, 0xff, 0xfe }; /* push {…
284 if (memcmp(ptr, bl_mcount_arm, 4) == 0) { in make_nop_arm()
285 if (memcmp(ptr - 4, push_arm, 4) == 0) { in make_nop_arm()
291 } else if (memcmp(ptr - 2, push_bl_mcount_thumb, 6) == 0) { in make_nop_arm()
300 if (ulseek(off, SEEK_SET) < 0) in make_nop_arm()
304 if (uwrite(ideal_nop, nop_size) < 0) in make_nop_arm()
306 } while (--cnt > 0); in make_nop_arm()
308 return 0; in make_nop_arm()
311 static unsigned char ideal_nop4_arm64[4] = {0x1f, 0x20, 0x03, 0xd5};
317 /* bl <_mcount> is 0x94000000 before relocation */ in make_nop_arm64()
318 if (*ptr != 0x94000000) in make_nop_arm64()
322 if (ulseek(offset, SEEK_SET) < 0) in make_nop_arm64()
324 if (uwrite(ideal_nop, 4) < 0) in make_nop_arm64()
326 return 0; in make_nop_arm64()
335 return 0; in write_file()
345 if (fd_map < 0) { in write_file()
364 if (rename(tmp_file, fname) < 0) { in write_file()
368 return 0; in write_file()
375 return ((0xff & (x >> (0 * 8))) << (7 * 8)) in w8rev()
376 | ((0xff & (x >> (1 * 8))) << (6 * 8)) in w8rev()
377 | ((0xff & (x >> (2 * 8))) << (5 * 8)) in w8rev()
378 | ((0xff & (x >> (3 * 8))) << (4 * 8)) in w8rev()
379 | ((0xff & (x >> (4 * 8))) << (3 * 8)) in w8rev()
380 | ((0xff & (x >> (5 * 8))) << (2 * 8)) in w8rev()
381 | ((0xff & (x >> (6 * 8))) << (1 * 8)) in w8rev()
382 | ((0xff & (x >> (7 * 8))) << (0 * 8)); in w8rev()
387 return ((0xff & (x >> (0 * 8))) << (3 * 8)) in w4rev()
388 | ((0xff & (x >> (1 * 8))) << (2 * 8)) in w4rev()
389 | ((0xff & (x >> (2 * 8))) << (1 * 8)) in w4rev()
390 | ((0xff & (x >> (3 * 8))) << (0 * 8)); in w4rev()
395 return ((0xff & (x >> (0 * 8))) << (1 * 8)) in w2rev()
396 | ((0xff & (x >> (1 * 8))) << (0 * 8)); in w2rev()
421 return strncmp(".text", txtname, 5) == 0 || in is_mcounted_section_name()
422 strcmp(".init.text", txtname) == 0 || in is_mcounted_section_name()
423 strcmp(".ref.text", txtname) == 0 || in is_mcounted_section_name()
424 strcmp(".sched.text", txtname) == 0 || in is_mcounted_section_name()
425 strcmp(".spinlock.text", txtname) == 0 || in is_mcounted_section_name()
426 strcmp(".irqentry.text", txtname) == 0 || in is_mcounted_section_name()
427 strcmp(".softirqentry.text", txtname) == 0 || in is_mcounted_section_name()
428 strcmp(".kprobes.text", txtname) == 0 || in is_mcounted_section_name()
429 strcmp(".cpuidle.text", txtname) == 0; in is_mcounted_section_name()
445 return 0; in arm_is_fake_mcount()
461 return 0; in LARCH32_is_fake_mcount()
472 return 0; in LARCH64_is_fake_mcount()
513 unsigned int reltype = 0; in do_file()
544 if (*(unsigned char const *)&endian != 0) { in do_file()
557 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 || in do_file()
576 gpfx = 0; in do_file()
584 gpfx = 0; in do_file()
598 case EM_SH: reltype = R_SH_DIR32; gpfx = 0; break; in do_file()
606 gpfx = 0; in do_file()
630 if (do32(ehdr, fname, reltype) < 0) in do_file()
655 if (do64(ghdr, fname, reltype) < 0) in do_file()
672 int n_error = 0; /* gcc-4.3.0 false positive complaint */ in main()
676 while ((c = getopt(argc, argv, "w")) >= 0) { in main()
683 return 0; in main()
689 return 0; in main()
704 strcmp(file + (len - ftrace_size), ftrace) == 0) in main()