fix merge conflict
This commit is contained in:
@ -27,7 +27,7 @@ LIBDIR = $(BUILDDIR)
|
||||
endif
|
||||
|
||||
CFLAGS += -Wall -I$(INCDIR)
|
||||
LDFLAGS += -L$(LIBDIR) -l$(LIBNAME)
|
||||
LDFLAGS += -lpthread -L$(LIBDIR) -l$(LIBNAME)
|
||||
LDFLAGS_STATIC += $(UNICORN_DEP_LIBS_STATIC)
|
||||
|
||||
ifeq ($(CROSS),)
|
||||
|
@ -142,13 +142,13 @@ static void do_nx_demo(bool cause_fault)
|
||||
|
||||
/*
|
||||
bits 32
|
||||
page0:
|
||||
page0: @0
|
||||
times 4091 inc eax
|
||||
jmp page2
|
||||
page1:
|
||||
times 4095 inc eax
|
||||
page1: @1000
|
||||
times 4095 inc eax (or INC ECX)
|
||||
hlt
|
||||
page2:
|
||||
page2: @2000
|
||||
jmp page1
|
||||
*/
|
||||
memset(code_buf, 0x40, sizeof(code_buf)); // fill with inc eax
|
||||
@ -170,7 +170,7 @@ static void do_nx_demo(bool cause_fault)
|
||||
// intercept code and invalid memory events
|
||||
if (uc_hook_add(uc, &trace2, UC_HOOK_CODE, hook_code, NULL, (uint64_t)1, (uint64_t)0) != UC_ERR_OK ||
|
||||
uc_hook_add(uc, &trace1, UC_HOOK_MEM_INVALID,
|
||||
hook_mem_invalid, NULL) != UC_ERR_OK) {
|
||||
hook_mem_invalid, NULL, (uint64_t)1, (uint64_t)0) != UC_ERR_OK) {
|
||||
printf("not ok - Failed to install hooks\n");
|
||||
return;
|
||||
}
|
||||
@ -251,7 +251,7 @@ static void do_perms_demo(bool change_perms)
|
||||
if (uc_hook_add(uc, &trace2, UC_HOOK_CODE, hook_code, NULL, (uint64_t)1, (uint64_t)0) != UC_ERR_OK ||
|
||||
uc_hook_add(uc, &trace1,
|
||||
UC_HOOK_MEM_INVALID,
|
||||
hook_mem_invalid, NULL) != UC_ERR_OK) {
|
||||
hook_mem_invalid, NULL, (uint64_t)1, (uint64_t)0) != UC_ERR_OK) {
|
||||
printf("not ok - Failed to install hooks\n");
|
||||
return;
|
||||
}
|
||||
@ -329,7 +329,7 @@ static void do_unmap_demo(bool do_unmap)
|
||||
if (uc_hook_add(uc, &trace2, UC_HOOK_CODE, hook_code, NULL, (uint64_t)1, (uint64_t)0) != UC_ERR_OK ||
|
||||
uc_hook_add(uc, &trace1,
|
||||
UC_HOOK_MEM_INVALID,
|
||||
hook_mem_invalid, NULL) != UC_ERR_OK) {
|
||||
hook_mem_invalid, NULL, (uint64_t)1, (uint64_t)0) != UC_ERR_OK) {
|
||||
printf("not ok - Failed to install hooks\n");
|
||||
return;
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ static void test_mips_el(void)
|
||||
printf("Emulate MIPS code (little-endian)\n");
|
||||
|
||||
// Initialize emulator in MIPS mode
|
||||
err = uc_open(UC_ARCH_MIPS, UC_MODE_MIPS32, &uc);
|
||||
err = uc_open(UC_ARCH_MIPS, UC_MODE_MIPS32 + UC_MODE_LITTLE_ENDIAN, &uc);
|
||||
if (err) {
|
||||
printf("Failed on uc_open() with error returned: %u (%s)\n",
|
||||
err, uc_strerror(err));
|
||||
|
@ -57,7 +57,7 @@ static void test_sparc(void)
|
||||
printf("Emulate SPARC code\n");
|
||||
|
||||
// Initialize emulator in Sparc mode
|
||||
err = uc_open(UC_ARCH_SPARC, UC_MODE_32, &uc);
|
||||
err = uc_open(UC_ARCH_SPARC, UC_MODE_SPARC32|UC_MODE_BIG_ENDIAN, &uc);
|
||||
if (err) {
|
||||
printf("Failed on uc_open() with error returned: %u (%s)\n",
|
||||
err, uc_strerror(err));
|
||||
|
Reference in New Issue
Block a user