View previous topic :: View next topic |
Author |
Message |
cerri Bodhisattva
Joined: 05 Mar 2003 Posts: 2957 Location: # init S
|
Posted: Mon Jul 07, 2003 11:00 pm Post subject: Stripping symbols from binaries... but why? |
|
|
Why Gentoo strips symbols from binaries?
Isn't sufficient to not give "-g" to gcc flags?
I mean: I'm not having symbols because I'm not using -g as a CFLAG, why even stripping them? _________________ Enjoy your freedom.
Sex is like hacking. You get in, you get out, and you hope you didnt leave something behind that can be traced back to you.
<----------------------->
Andrea Cerrito |
|
Back to top |
|
|
pygoscelis Guru
Joined: 07 Jun 2003 Posts: 402
|
Posted: Mon Jul 07, 2003 11:11 pm Post subject: Re: Stripping symbols from binaries... but why? |
|
|
cerri wrote: | Why Gentoo strips symbols from binaries?
Isn't sufficient to not give "-g" to gcc flags?
I mean: I'm not having symbols because I'm not using -g as a CFLAG, why even stripping them? |
Code: |
$ cat >foo.c
int main () {}
^D
$ gcc -O2 -o foo foo.c
$ ls -l foo
-rwxr-xr-x 1 me users 4918 Jul 8 02:08 foo*
$ strip foo
$ ls -l foo
-rwxr-xr-x 1 me users 2428 Jul 8 02:08 foo*
$
|
|
|
Back to top |
|
|
cerri Bodhisattva
Joined: 05 Mar 2003 Posts: 2957 Location: # init S
|
Posted: Mon Jul 07, 2003 11:26 pm Post subject: |
|
|
Cool, so NOT using "-g" isn't the same as stripping it.
Understood, thanx
Code: | cerri@cerrito cerri $ cat >foo.c
int main () {}
cerri@cerrito cerri $ gcc -o2 -o foo foo.c
cerri@cerrito cerri $ gcc -o2 -g -o foo2 foo.c
cerri@cerrito cerri $ ls -la foo*
-rwxr-xr-x 1 cerri users 8222 2003-07-08 01:25 foo
-rwxr-xr-x 1 cerri users 8514 2003-07-08 01:26 foo2
-rw-r--r-- 1 cerri users 15 2003-07-08 01:25 foo.c
cerri@cerrito cerri $ strip foo
cerri@cerrito cerri $ strip foo2
cerri@cerrito cerri $ ls -la foo*
-rwxr-xr-x 1 cerri users 2904 2003-07-08 01:26 foo
-rwxr-xr-x 1 cerri users 2904 2003-07-08 01:26 foo2
-rw-r--r-- 1 cerri users 15 2003-07-08 01:25 foo.c
cerri@cerrito cerri $ |
_________________ Enjoy your freedom.
Sex is like hacking. You get in, you get out, and you hope you didnt leave something behind that can be traced back to you.
<----------------------->
Andrea Cerrito |
|
Back to top |
|
|
|