-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Right now, we wrap symbols like dlopen via the preprocessor. We also do this to namespace symbols that would otherwise conflict.
This works, but if possible, it'd be nicer to do this with a linker arg like --wrap, or via a linker script, since this is a bit more direct (no chance of renaming anything unintended) and would likely allow us to avoid exposing implementation details like glibc's open_2.
I've opted not to do this for now since I don't want to introduce a dependency on a specific linker. Building with Zig's non-llvm x64 backend in debug mode is super useful, it's not worth breaking that workflow over this. IIRC there are plans for Zig to get its own linker script setup that would allow setting up linker scripts in a cross-linker way, once that happens this should be revisited.
(h/t deivid)