Pre-link static binaries/remove

Thomas Richter thomas.richter@iis.fraunhofer.de
Tue Nov 11 10:58:09 GMT 2025


Hi folks,

is there a possibility to remove from a static library (not from a .so) 
all symbols marked as "visibility ("hidden")"? The idea would be some 
sort of "pre-linking" step that would resolve all symbols cross-wise 
that are defined within the static library, and only retain those that 
are explicitly marked with "visibility ("default")".

This does work for dynamic link libraries, but I wonder whether there is 
a way to do so for static libraries as well.

Thanks,
	Thomas



More information about the Binutils mailing list