From c6a768c12ce7e83631d08f53937a075c4f76e2d5 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 12 Aug 2019 11:10:15 +0200 Subject: use LD_LIBRARY_PATH for glibc instead of calling its loader Calling the loader fails on non ELF executables. Exec, formerly run_cmd, now takes two options: -l LD_LIBRARY_PATH, -p LD_PRELOAD. -p sets LD_PRELOAD and -l LD_LIBRARY_PATH before executing the rest of argv. glibc no longer uses cmd_prefix in favor of LD_LIBRARY_PATH. --- src/allocators/glibc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/allocators/glibc.py') diff --git a/src/allocators/glibc.py b/src/allocators/glibc.py index 8ccd8a0..4f596ae 100644 --- a/src/allocators/glibc.py +++ b/src/allocators/glibc.py @@ -25,8 +25,10 @@ class Glibc (Allocator): "cd glibc-build; make", "cd glibc-build; make install"] - kwargs["cmd_prefix"] = ("{dir}/lib/ld-linux-x86-64.so.2 --library-path {dir}/lib:" - + library_path) + # kwargs["cmd_prefix"] = ("{dir}/lib/ld-linux-x86-64.so.2 --library-path {dir}/lib:" + # + library_path) + + kwargs["LD_LIBRARY_PATH"] = "{dir}/lib:" + library_path super().__init__(name, **kwargs) -- cgit v1.2.3