Adventures with gcc: code vs object-code size
    Don Bowman 
    don at sandvine.com
       
    Sun Mar 21 16:35:50 PST 2004
    
    
  
From: Garance A Drosihn [mailto:drosih at rpi.edu]
> 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 shows
> that it is only 40 bytes larger.  It's when you combine that
> file with the other *.o files, and strip it, that the final
> result ends up 3940 bytes larger.
> 
> 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...
Its not just bumping you up another module 4K pages? The 
linker aligns text, data, bss, rodata, etc.
    
    
More information about the freebsd-hackers
mailing list