Runtime size Optimization
Hi,
I am interested in reducing the size of my LFS build and have been reading up on possible options and hints. In most articles they recommend UPX! So i thought i to try it as well. However I have a small issue on which version to download. My machine type is i686-32 bit and I would like to know which of the options available should I go ahead with. Thanks in advance! |
Quoting this article,
Quote:
Can someone please tell me how I can strip these binaries/libraries. When I run the command suggested as above I get a long list with majority ending in Quote:
|
|
there is a command, named strip to do that.
|
So is it ok to use the commands as given in LFS even after completing BLFS?
Also do you guys know about UPX? |
you can use strip any time, it will not affect the running system (you may have problems during troubleshooting).
you will need i386 version of upx. |
Thank You pan64 :)
|
Hi again,
I used Quote:
Can I use Quote:
|
no, that won't work at all.
the command find / -exec file {} \; will print out all the files together with their types you have and grep will filter the result (will select only the lines containing "not stripped"). the command find has this special syntax (where you can specify what are you looking for), but you cannot use the same syntax with strip. Instead, you need to combine the two commands to achieve what you need. that will look like: Code:
# this will be a small shell script, named strip.sh |
Thank You for the explanation but I have a few doubts though....
Quote:
should the find command be within the strip.sh file or is that just the command to run in the terminal. Because when I run it from the terminal i get the error: Quote:
|
you may need to write ./strip.sh or <full path to>/strip.sh
} is a mistake, just a copy&paste error or something like that, please ignore that. |
I replaced the find command with
Quote:
Quote:
|
I do not know what have you actually done, how your strip.sh script looks like, therefore hard to say anything.
|
It is pretty much the same as what you suggested only corrected the mistakes of } and the path to strip.sh
Quote:
---------- Post added 10-29-13 at 04:59 AM ---------- It is pretty much the same as what you suggested only corrected the mistakes of } and the path to strip.sh Quote:
|
you should not include the find (in the script), that should be executed in a shell - see there is an end of script line!
|
All times are GMT -5. The time now is 05:29 AM. |