Fix a couple of warnings and a typo
parent
d0bf833942
commit
ae37f74864
|
@ -37,12 +37,12 @@ int main(int argc, char **argv)
|
||||||
// mapping = mmap(0x90040000, statbuf.st_size, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
|
// mapping = mmap(0x90040000, statbuf.st_size, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
|
||||||
mapping = mmap((void*)0x20040000, statbuf.st_size, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_FIXED|MAP_PRIVATE, fd, 0);
|
mapping = mmap((void*)0x20040000, statbuf.st_size, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_FIXED|MAP_PRIVATE, fd, 0);
|
||||||
if(mapping == MAP_FAILED || mapping != (void*)0x20040000) {
|
if(mapping == MAP_FAILED || mapping != (void*)0x20040000) {
|
||||||
printf("Failed to mmap(): %s (%08x) \n", strerror(errno), mapping);
|
printf("Failed to mmap(): %s (%p) \n", strerror(errno), mapping);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
fp = (unsigned int)EP;
|
fp = (unsigned int)EP;
|
||||||
printf("entry point ahoy @ %08x!\n", fp); fflush(stdout);
|
printf("entry point ahoy @ %p!\n", fp); fflush(stdout);
|
||||||
fp(5, options);
|
fp(5, options);
|
||||||
printf("entry point retured\n");
|
printf("entry point returned\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue