NixOS / patchelf

A small utility to modify the dynamic linker and RPATH of ELF executables
GNU General Public License v3.0
3.48k stars 483 forks source link

Add a way to change visibility of symbols #556

Open ensc opened 3 months ago

ensc commented 3 months ago

Is your feature request related to a problem? Please describe.

It would be nice when visibility of symbols can be changed. This allows to fix e.g. libraries which export every symbol publicly (hello rust/cargo...).

Describe the solution you'd like

E.g. when

$ nm -D libbar.so
0000000000011920 T bar_func
00000000000119b0 T foo_func

A patchelf --hide-symbol foo_func libbar.so would change that to

$ nm -D libbar.so
0000000000011920 T bar_func
00000000000119b0 t foo_func