public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Executable size increase using egcs 1.0.1 on Solaris 2.6
@ 1998-03-10  2:14 Yusuf Goolamabbas
  1998-03-10 10:28 ` Jeffrey A Law
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Yusuf Goolamabbas @ 1998-03-10  2:14 UTC (permalink / raw)
  To: egcs

I wrote a simple hello.c

#include <stdio.h>

main()
{
    printf("Hello World!\n");
}

And compiled it with gcc-2.7.2 , egcs-1.0.1(haifa enabled) and
egcs-1.02-980309-prerelease(haifa disabled)

The following are the file sizes and the output of size -f

----------------------------------------------------------------------
gcc-2.7.2
Size:			5440 bytes
% size -f foo

17(.interp) + 300(.hash) + 672(.dynsym) + 188(.dynstr) +
32(.SUNW_version) + 12(.rela.bss) + 48(.rela.plt) + 352(.text) +
20(.init) + 20(.fini) + 22(.rodata) + 12(.got) + 152(.dynamic) +
100(.plt) + 0(.data) + 8(.ctors) + 8(.dtors) + 4(.bss) = 1967

----------------------------------------------------------------------
egcs-1.0.1
Size:			24952 bytes
% size -f foo


17(.interp) + 460(.hash) + 960(.dynsym) + 391(.dynstr) +
32(.SUNW_version) + 12(.rela.bss) + 144(.rela.plt) + 3344(.text) +
28(.init) + 20(.fini) + 35(.rodata) + 36(.got) + 152(.dynamic) +
196(.plt) + 8(.data) + 8(.ctors) + 8(.dtors) + 424(.eh_frame) +
32(.bss) = 6307

----------------------------------------------------------------------
egcs-1.0.2-980308-prerelease
Size:			25016 bytes
% size -f foo

17(.interp) + 460(.hash) + 960(.dynsym) + 391(.dynstr) +
32(.SUNW_version) + 12(.rela.bss) + 144(.rela.plt) + 3376(.text) +
28(.init) + 20(.fini) + 35(.rodata) + 36(.got) + 152(.dynamic) +
196(.plt) + 8(.data) + 8(.ctors) + 8(.dtors) + 424(.eh_frame) +
32(.bss) = 6339

Compile command was gcc -o foo foo.c

Is this expected behaviour. Why is there such an increase in
executable code size. I have not looked at other platforms yet

Cheers, Yusuf

-- 
Kent Ridge Digital Labs (Formerly Institute of Systems Science)
Heng Mui Keng Terrace, Singapore 119597, Republic of Singapore
Tel: +65 874-3116, Fax: +65 774-4990,  Email: yusufg@krdl.org.sg

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: Executable size increase using egcs 1.0.1 on Solaris 2.6
@ 1998-04-20 22:16 Yusuf Goolamabbas
  1998-04-21 17:06 ` Jim Wilson
  0 siblings, 1 reply; 15+ messages in thread
From: Yusuf Goolamabbas @ 1998-04-20 22:16 UTC (permalink / raw)
  To: egcs

In http://www.cygnus.com/ml/egcs/1998-Mar/0391.html , Jason Merril
<jason@cygnus.com> suggested using GNU ld. 

I compiled binutils-2.9 with a patch from Ian Taylor <ian@cygnus.com>
posted on gnu.utils.bug to prevent strip from dumping core and then
compiled egcs-1.0.2 with --with-gnu-as and --with-gnu-ld and
--enable-haifa. The results are around the same as using egcs-1.0.2
with the native assembler and linker. Compared to gcc-2.7.2.3, the
code size increase for Hello World is 4x.

gcc version egcs-2.90.27 980315 (egcs-1.0.2 release) on
sparc-sun-solaris2.6 

I haven't checked if this problem has been solved in the recent
snapshots. Can somebody who has the recent snapshots on
sparc-sun-solaris2.6 let us know ? 

Here's the test program

#include <stdio.h>

int main(int argc, char *argv[])
{
    printf("Hello World!\n");
         return 0;
}

Thanks, Yusuf

-- 
Kent Ridge Digital Labs (Formerly Institute of Systems Science)
Heng Mui Keng Terrace, Singapore 119597, Republic of Singapore
Tel: +65 874-3116, Fax: +65 774-4990,  Email: yusufg@krdl.org.sg

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: Executable size increase using egcs 1.0.1 on Solaris 2.6
@ 1998-03-10  0:35 Yusuf Goolamabbas
  1998-03-10  3:16 ` Gerald Pfeifer
  0 siblings, 1 reply; 15+ messages in thread
From: Yusuf Goolamabbas @ 1998-03-10  0:35 UTC (permalink / raw)
  To: egcs

Oops, forgot to mention that the platform is sparc-sun-solaris2.6,
specifically I am using an Ultrasparc-1

Cheers, Yusuf

-- 
Kent Ridge Digital Labs (Formerly Institute of Systems Science)
Heng Mui Keng Terrace, Singapore 119597, Republic of Singapore
Tel: +65 874-3116, Fax: +65 774-4990,  Email: yusufg@krdl.org.sg

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~1998-04-21 17:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-10  2:14 Executable size increase using egcs 1.0.1 on Solaris 2.6 Yusuf Goolamabbas
1998-03-10 10:28 ` Jeffrey A Law
1998-03-10 17:06 ` Jim Wilson
1998-03-10 18:13   ` Move register_frame_info [Was exec size inc egcs 1.0.1 sparc-sol 2.6] Yusuf Goolamabbas
1998-03-11 12:08     ` Jim Wilson
1998-03-11 16:23       ` Jeffrey A Law
1998-03-10 18:13 ` Executable size increase using egcs 1.0.1 on Solaris 2.6 Marat Boshernitsan
1998-03-10 22:15   ` Jeffrey A Law
     [not found] ` <tfviupmuk3l.fsf.cygnus.egcs@dogwood.CS.Berkeley.EDU>
1998-03-10 23:12   ` Jason Merrill
  -- strict thread matches above, loose matches on Subject: below --
1998-04-20 22:16 Yusuf Goolamabbas
1998-04-21 17:06 ` Jim Wilson
1998-03-10  0:35 Yusuf Goolamabbas
1998-03-10  3:16 ` Gerald Pfeifer
1998-03-10  4:26   ` Yusuf Goolamabbas
1998-03-10 10:13     ` Jeffrey A Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).