Why strip executables




















Maybe it has info that could help! Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. How to strip executables thoroughly Ask Question. Asked 11 years ago. Active 7 years, 5 months ago. Viewed 43k times. I tried using strip : strip --strip-all elf But it doesn't seem to do a good job: nm still displays lots of stuff, and the binary is still big. What should I do? Improve this question.

How did you build it to begin with? I realise that this question was asked a long time back. I'm assuming that you've built it to be a dynamically linked binary. You may get more satisfactory results if you create a statically linked ELF file and then strip it. Here's a shell script named stripper that finds all the unstripped executable files in your bin directory Section 7.

It's a quick way to save space on your account. The same script, searching the whole filesystem, will save even more space for system administrators -- but watch out for unusual filenames :. The find Section 9. The sed command skips shell scripts and other files that can't be stripped.

The final xargs command uses the options -r to not run strip if sed outputs no names to strip , -p to be interactive, asking before each strip , and -l to process one filename at a time. None of those options are required; if you don't want them, you might at least use -t so the script will list the files it's stripping. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features.

Registration is quick, simple and absolutely free. Join our community today! Note that registered members see fewer ads, and ContentLink is completely disabled once you log in. Are you new to LinuxQuestions. If you need to reset your password, click here. Having a problem logging in? Please visit this page to clear all LQ-related cookies. Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells!

With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use. Click here for more info. Hello: Please pardon me for my ignorance. What is the meaing of stripping of ELF binaries. While creating a Slackware package, why should this be done? Can any body direct me to the correct information? Thanks for your help.

Find More Posts by rsamurti. Stripping removes debugging symbols and such junk. It makes them smaller, faster, and require less memory.



0コメント

  • 1000 / 1000