Skip to content

Instantly share code, notes, and snippets.

@4ch12dy
4ch12dy / calling_printf_osx.c
Created April 20, 2018 16:13 — forked from P1kachu/calling_printf_osx.c
Calling printf in OSX - The overkill way
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <mach-o/dyld.h>
#include <mach-o/nlist.h>
#include <mach-o/dyld_images.h>
#include <mach/mach_vm.h>
/* Dyld is the OSX Dynamic Linker
* /usr/include//mach-o/loader.h