Skip to content

Instantly share code, notes, and snippets.

View sreehax's full-sized avatar
👾

Sreehari Sreedev sreehax

👾
View GitHub Profile
@sreehax
sreehax / glibc.c
Created January 5, 2020 05:49
This program allows you to run any glibc executable on a non-glibc system (such as musl) assuming you have a glibc root at /glibc with the necessary libraries.
#define _GNU_SOURCE
#include<stdio.h>
#include<sched.h>
#include<sys/mount.h>
#include<unistd.h>
#include<stdlib.h>
int main(int argc, char *argv[]) {
setenv("LC_ALL", "C", 0);
#include<unistd.h>
#include<sys/types.h>
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
//Written by sreehari. Please do not rob my code!
/*
Copyright 2017 Sreehari
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: