glibc指定libc编译

 

gcc test.c -m64 -z execstack -fno-stack-protector -no-pie -o test -Wl,--rpath=/path/to/glibc-build/ -Wl,--dynamic-linker=/path/to/glibc-build/elf/ld-linux-x86-64.so.2
$ ldd test                                                             
	linux-vdso.so.1 (0x00007ffedcdbd000)
	libc.so.6 => /home/roar/projects/ctf_download/pwn/build/glibc-build/libc.so.6 (0x00007fb5a3505000)
	/home/roar/projects/ctf_download/pwn/build/glibc-build/elf/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fb5a36ab000)

 

你可能感兴趣的:(glibc指定libc编译)