Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Stripping symbols from binaries... but why?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
cerri
Bodhisattva
Bodhisattva


Joined: 05 Mar 2003
Posts: 2957
Location: # init S

PostPosted: Mon Jul 07, 2003 11:00 pm    Post subject: Stripping symbols from binaries... but why? Reply with quote

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? :roll:
_________________
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
View user's profile Send private message
pygoscelis
Guru
Guru


Joined: 07 Jun 2003
Posts: 402

PostPosted: Mon Jul 07, 2003 11:11 pm    Post subject: Re: Stripping symbols from binaries... but why? Reply with quote

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? :roll:

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
View user's profile Send private message
cerri
Bodhisattva
Bodhisattva


Joined: 05 Mar 2003
Posts: 2957
Location: # init S

PostPosted: Mon Jul 07, 2003 11:26 pm    Post subject: Reply with quote

Cool, so NOT using "-g" isn't the same as stripping it.
Understood, thanx :D

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum