Re: Adventures with gcc: code vs object-code size

2004-03-21 Thread Clifton Royston
On Sun, Mar 21, 2004 at 05:39:58PM -0500, Garance A Drosihn wrote: > At 10:22 AM -1000 3/21/04, Clifton Royston wrote: > > > Date: Sat, 20 Mar 2004 From: Garance A Drosihn > > > > > > So, by adding one call to strcmp() to check for a ":" string, I > > > end up with /bin/ps (the stripped-object-fi

RE: Adventures with gcc: code vs object-code size

2004-03-21 Thread Don Bowman
From: Garance A Drosihn [mailto:[EMAIL PROTECTED] > At 7:35 PM -0500 3/21/04, Don Bowman wrote: > >From: Garance A Drosihn [mailto:[EMAIL PROTECTED] > > > > >> So maybe this has something to do with how linking is done > >> for ELF modules. Unfortunately, I need to be concentrating > >> on som

RE: Adventures with gcc: code vs object-code size

2004-03-21 Thread Garance A Drosihn
At 7:35 PM -0500 3/21/04, Don Bowman wrote: From: Garance A Drosihn [mailto:[EMAIL PROTECTED] > So maybe this has something to do with how linking is done for ELF modules. Unfortunately, I need to be concentrating on something else right now... It's not just bumping you up another module 4K pa

RE: Adventures with gcc: code vs object-code size

2004-03-21 Thread Don Bowman
From: Garance A Drosihn [mailto:[EMAIL PROTECTED] > At 2:52 PM -0800 3/21/04, Kip Macy wrote: > >The heuristics vary from platform to platform - what does > >"objdump -d" show? > > Based on what I see from that, the 'ps.o' which has the extra > strcmp is about 40 bytes larger than the one without

Re: Adventures with gcc: code vs object-code size

2004-03-21 Thread Garance A Drosihn
At 2:52 PM -0800 3/21/04, Kip Macy wrote: The heuristics vary from platform to platform - what does "objdump -d" show? Based on what I see from that, the 'ps.o' which has the extra strcmp is about 40 bytes larger than the one without it. And now that you mention it, doing a plain 'ls -l' of ps.o s

Re: Adventures with gcc: code vs object-code size

2004-03-21 Thread Kip Macy
The heuristics vary from platform to platform - what does "objdump -d" show? -Kip > > Well, I was hoping someone would have already seen this before, > but I guess I will need to do some more checking if I'm going > to get a better idea of what is going on. I'll put it on my >

Re: Adventures with gcc: code vs object-code size

2004-03-21 Thread Garance A Drosihn
At 10:22 AM -1000 3/21/04, Clifton Royston wrote: > Date: Sat, 20 Mar 2004 From: Garance A Drosihn > > So, by adding one call to strcmp() to check for a ":" string, I > end up with /bin/ps (the stripped-object-file) which has grown > by 12.6% !! This is for a program which is almost 2500 l

Re: Adventures with gcc: code vs object-code size

2004-03-21 Thread Clifton Royston
> Date: Sat, 20 Mar 2004 17:45:04 -0500 From: Garance A Drosihn > <[EMAIL PROTECTED]> Subject: Adventures with gcc: code vs object-code > size To: [EMAIL PROTECTED] Message-ID: > <[EMAIL PROTECTED]> Content-Type: text/plain; > charset="us-ascii" ; format="flowed" > > I have written a fairly major

Re: Adventures with gcc: code vs object-code size

2004-03-21 Thread Marc Olzheim
On Sun, Mar 21, 2004 at 07:45:43PM +1100, Peter Jeremy wrote: > But (IMHO) this is a lot less clear than the former code (thought I admit > I'm guilty of doing this quite a lot in my code). Note that a modern C > compiler is free to convert > strcpy(elemcopy, ":") == 0 > into > elemcopy[0] ==

Re: Adventures with gcc: code vs object-code size

2004-03-21 Thread Andrew MacIntyre
On Sat, 20 Mar 2004, Garance A Drosihn wrote: > I am not a compilier guru, so I suspect it would take me hours to > pin this down. I don't want to do that, so I'm wondering if anyone > understands how such a minor code-change can POSSIBLY cause such a > huge change in resulting object file... I

Re: Adventures with gcc: code vs object-code size

2004-03-21 Thread Peter Jeremy
On Sun, Mar 21, 2004 at 02:20:13AM -0500, Matt Emmerton wrote: > >- Original Message - >From: "Garance A Drosihn" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Saturday, March 20, 2004 5:45 PM >Subject: Adventures with gcc: code vs object-code size >> if (strcmp(elemcopy, ":") == 0)

Re: Adventures with gcc: code vs object-code size

2004-03-20 Thread Matt Emmerton
- Original Message - From: "Garance A Drosihn" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, March 20, 2004 5:45 PM Subject: Adventures with gcc: code vs object-code size > I have written a fairly major set of changes to the `ps' command, > which is available as: > http://