-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Describe the bug
I tried to run a dynamically linked binary compiled against musl, but zelos cannot load the program correctly
To Reproduce
Steps to reproduce the behavior:
- Download the following musl binary
unamewith ld-musl-x86_64.so.1 (You can also obtain from Alpine Linux distribution)
musl_binary.zip - Put ld-musl-x86_64.so.1 in /lib folder
unameshould be able to run correctly when directly called in terminalunamecannot be run when callingzelos uname
Expected behavior
The interpreter should be found and loaded, and all symbols should be resolved.
Screenshots
zelos uname --mount=x86,/lib/ld-musl-x86_64.so.1,/lib/ld-musl-x86_64.so.1
16:28:00:parse_____:NOTICE:No default interpreter for this arch
Traceback (most recent call last):
File "/home/shaoyu/.local/bin/zelos", line 8, in
sys.exit(main())
File "/home/shaoyu/.local/lib/python3.8/site-packages/zelos/main.py", line 23, in main
z = ZelosCmdline(sys.argv[1:])
File "/home/shaoyu/.local/lib/python3.8/site-packages/zelos/api/zelos_api.py", line 721, in init
self._setup(config)
File "/home/shaoyu/.local/lib/python3.8/site-packages/zelos/api/zelos_api.py", line 78, in _setup
e = Engine(config=config, api=self)
File "/home/shaoyu/.local/lib/python3.8/site-packages/zelos/engine.py", line 123, in init
self.load_executable(binary, entrypoint_override=config.startat)
File "/home/shaoyu/.local/lib/python3.8/site-packages/zelos/engine.py", line 315, in load_executable
file = self._first_parse(module_path)
File "/home/shaoyu/.local/lib/python3.8/site-packages/zelos/engine.py", line 289, in _first_parse
return self._parse_file_data(module_path, file_data)
File "/home/shaoyu/.local/lib/python3.8/site-packages/zelos/engine.py", line 297, in _parse_file_data
parsed_file = self.os_plugins.parse(filename, filedata)
File "/home/shaoyu/.local/lib/python3.8/site-packages/zelos/plugin/plugin.py", line 168, in parse
parsed_file = os_plugin.parse(path, binary)
File "/home/shaoyu/.local/lib/python3.8/site-packages/zelos/ext/platforms/linux/linux.py", line 80, in parse
parsed_file = LiefELF(self.z.files, path, binary)
File "/home/shaoyu/.local/lib/python3.8/site-packages/zelos/ext/platforms/linux/parse.py", line 33, in init
self.parse(path, binary)
File "/home/shaoyu/.local/lib/python3.8/site-packages/zelos/ext/platforms/linux/parse.py", line 106, in parse
for symbol in binary.static_symbols:
AttributeError: 'NoneType' object has no attribute 'static_symbols'
Additional context
Add any other context about the problem here.