Skip to content
Snippets Groups Projects
Commit 00517142 authored by Kai Bleeke's avatar Kai Bleeke
Browse files

extremely cursed data sharing with memfd and mmap

parent 2fc7dcd9
No related branches found
No related tags found
No related merge requests found
File added
#include <stdio.h>
#include <stdlib.h>
#define import(name) __attribute__((import_name(name)))
#define export(name) __attribute__((export_name(name))) __attribute__((visibility("default")))
import("native_map_shared")
extern void *native_map_shared();
export("main")
int main(){
void *ptr = native_map_shared();
printf("pointer %p\n", ptr);
printf("value: %s\n", (char *) ptr);
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment