Skip to content

Instantly share code, notes, and snippets.

@atejeda
atejeda / compile-emacs.sh
Created June 28, 2020 16:35 — forked from strobe/compile-emacs.sh
Compile emacs 25.2 on CentOS 7.x
yum install gcc make ncurses-devel giflib-devel libjpeg-devel libtiff-devel
wget wget http://ftp.gnu.org/gnu/emacs/emacs-25.2.tar.xz
tar xJf emacs-25.2.tar.xz
cd emacs-25.2
./configure --without-x --without-selinux
make && sudo make install
@atejeda
atejeda / mkexeloadable.c
Created June 10, 2020 22:22 — forked from x-projs/mkexeloadable.c
Make the executable file can be loaded by dlopen() after glibc>=2.30.
/*
There is a behavior change in glibc>=2.30. dlopen() will fail if the file is
position independent executable. This code will clean up the PIE flag in the
file to bypass the dlopen() check.
MIT License (c) 2020 Yubo Xie, xyb@xyb.name
*/
#include <stdio.h>
#include <string.h>