diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-08-12 11:10:15 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-08-12 11:10:15 +0200 |
| commit | c6a768c12ce7e83631d08f53937a075c4f76e2d5 (patch) | |
| tree | afb1b8b66d78aba2cab650c897cd3e69b5287ddc /src/allocator.py | |
| parent | 4fd995ea5a2f9fada2e298bb1b828e510eb2ad29 (diff) | |
| download | allocbench-c6a768c12ce7e83631d08f53937a075c4f76e2d5.tar.gz allocbench-c6a768c12ce7e83631d08f53937a075c4f76e2d5.zip | |
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.
Diffstat (limited to 'src/allocator.py')
| -rw-r--r-- | src/allocator.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/allocator.py b/src/allocator.py index 73f2777..ae22620 100644 --- a/src/allocator.py +++ b/src/allocator.py @@ -89,7 +89,8 @@ class Allocator_Sources (object): class Allocator (object): allowed_attributes = ["binary_suffix", "version", "sources", "build_cmds", - "LD_PRELOAD", "cmd_prefix", "color", "patches"] + "LD_PRELOAD", "cmd_prefix", "color", "patches", + "LD_LIBRARY_PATH"] def __init__(self, name, **kwargs): self.name = name @@ -151,7 +152,7 @@ class Allocator (object): f.write(str(datetime.now().timestamp())) print_info2("Create allocator dictionary") - for attr in ["LD_PRELOAD", "cmd_prefix"]: + for attr in ["LD_PRELOAD", "LD_LIBRARY_PATH", "cmd_prefix"]: value = getattr(self, attr, "") or "" paths = {"dir": self.dir} paths["srcdir"] = self.sources.dir if self.sources is not None else "" @@ -162,6 +163,7 @@ class Allocator (object): res_dict = {"cmd_prefix": self.cmd_prefix, "binary_suffix": self.binary_suffix or "", "LD_PRELOAD": self.LD_PRELOAD, + "LD_LIBRARY_PATH": self.LD_LIBRARY_PATH, "color": self.color} print_debug("Resulting dictionary:", res_dict) return res_dict |
