#Can I manually rename/mangle symbols in the build script, or do I need a linker script for that?
1 messages · Page 1 of 1 (latest)
Probably would be more reliable with linker script. With build.zig the effort would be too high, would have to parse the zig modules and rename without messing up which symbol is which. Though perhaps build.zig can specify custom linker script for specific compilation units? Don't know, never tried anything like that
Depending on what exactly you want to do, you can also try to write some comptime zig, which uses @extern and @export instead of using the extern and export keywords.
well I do have an idea for how to keep track of what symbol has what mangled name
but if I need to do parsing that's gonna be a non-starter
@extern and @export might be a good idea. The main reason I ask is because I still need dynamic linking to work
so while I can easily just strip the binary, I will need some symbols exposed so that I can find things in the shared libs