Created
November 27, 2019 18:33
-
-
Save mmarchini/b358667cd2365bfc8199cc27943c741b to your computer and use it in GitHub Desktop.
Building libc6 with frame pointers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uncomment deb-src lines on /etc/apt/sources.list | |
sudo apt-get update | |
# Or replace ~/glibc with preferred path to store libc source | |
mkdir -p ~/glibc | |
cd ~/glibc | |
sudo apt-get install -y dpkg-dev | |
sudo apt-get build-deps libc6 | |
apt-get source libc6 | |
cd glibc-* | |
mkdir build | |
cd build | |
CFLAGS="-O1 -fno-omit-frame-pointer" ../configure --prefix=/usr/local/libc-fp --disable-werror | |
make -j8 | |
# emits: libc.so, nptl/libpthread.so, rt/librt.so, math/libm.so, resolv/libresolv.so | |
make install | |
# Change 2.29 with your libc version | |
LD_PRELOAD="/usr/local/libc-fp/lib/libc-2.29.so /usr/local/libc-fp/lib/libpthread-2.29.so" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment