NixOS / patchelf

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

Implementing --clean-strtab #461

Open brenoguim opened 1 year ago

brenoguim commented 1 year ago

Hi,

I started to implement a simple version of --clean-strtab as suggested in https://github.com/NixOS/patchelf/issues/449.

Some attention points:

Maybe we should have a set of switches documented as beta due to their complexity? The name renaming and this one could be marked as experimental because it's hard to know I got all fields right. Then after a couple of releases they could be moved to stable.

rohoog commented 1 year ago

I see that this pull request also does what I've done in #472. However, I don't introduce new symbols due to the symbol sharing, I just leave the sharing as-is.

brenoguim commented 1 year ago

I was planning to enhance it to do the sharing eventually, so it would be next to perfect. I didn't check the size of the file in my test, only the presence of a given string. I'll take a look at your PR @rohoog , maybe the approach of not undoing the sharing is the best.