From: hjl@lucon.org (H.J. Lu)
To: slouken@devolution.com (Sam Lantinga)
Cc: egcs@egcs.cygnus.com
Subject: Re: Large code size?
Date: Wed, 24 Mar 1999 17:07:00 -0000 [thread overview]
Message-ID: <m10PycJ-000ErMC@ocean.lucon.org> (raw)
In-Reply-To: < E10PxHr-0001fO-00@roboto.devolution.com > from "Sam Lantinga" at Mar 24, 99 03:42:15 pm
>
> > > > > The egcs version (compiled with egcs 1.1.1, -O2 -funroll-loops):
> > > > > -rwxrwxr-x 1 hercules devel 1534443 Mar 25 1999 robotcom.so
> > > > >
> > > > > The VC++ version (compiled with VC++ 5.0, /G5 /Ox /Ot /Og /Oi /Op /Ob2)
> > > > > -r-xr-xr-x 1 hercules devel 654336 Mar 14 10:26 robotcom.dll
> > > > >
> > > > > Any ideas why this might be?
> > >
> > > > Did you try to apply 'strip.exe' to the resulting binary?
>
> > What does
>
> > # size robotcom.so
> > # file robotcom.so
>
> > say? BTW, how did you make robotcom.so?
>
>
> We built robotcom.so with the compiler flags:
> g++ -O2 -funroll-loops -fno-exceptions -DLINUX_BETA -D_REENTRANT
> and the linker flags:
> cc -shared -nostartfiles -s -o robotcom.so ...
>
If that is exactly what you use on Linux, they are wrong. You should
use
# g++ -O2 -fPIC -funroll-loops -fno-exceptions -DLINUX_BETA -D_REENTRANT
# g++ -shared -s -o robotcom.so ...
BTW, you should read
ftp://sunsite.unc.edu/pub/Linux/GCC/elf.ps.gz
if you want to program under Linux. It is kind of dated. But it is
still quite useful.
--
H.J. Lu (hjl@gnu.org)
WARNING: multiple messages have this Message-ID
From: hjl@lucon.org (H.J. Lu)
To: slouken@devolution.com (Sam Lantinga)
Cc: egcs@egcs.cygnus.com
Subject: Re: Large code size?
Date: Wed, 31 Mar 1999 23:46:00 -0000 [thread overview]
Message-ID: <m10PycJ-000ErMC@ocean.lucon.org> (raw)
Message-ID: <19990331234600.DQjGnABo2kYgAy8j64SV0PXxXghtIYITHM69yP1RWMk@z> (raw)
In-Reply-To: <E10PxHr-0001fO-00@roboto.devolution.com>
>
> > > > > The egcs version (compiled with egcs 1.1.1, -O2 -funroll-loops):
> > > > > -rwxrwxr-x 1 hercules devel 1534443 Mar 25 1999 robotcom.so
> > > > >
> > > > > The VC++ version (compiled with VC++ 5.0, /G5 /Ox /Ot /Og /Oi /Op /Ob2)
> > > > > -r-xr-xr-x 1 hercules devel 654336 Mar 14 10:26 robotcom.dll
> > > > >
> > > > > Any ideas why this might be?
> > >
> > > > Did you try to apply 'strip.exe' to the resulting binary?
>
> > What does
>
> > # size robotcom.so
> > # file robotcom.so
>
> > say? BTW, how did you make robotcom.so?
>
>
> We built robotcom.so with the compiler flags:
> g++ -O2 -funroll-loops -fno-exceptions -DLINUX_BETA -D_REENTRANT
> and the linker flags:
> cc -shared -nostartfiles -s -o robotcom.so ...
>
If that is exactly what you use on Linux, they are wrong. You should
use
# g++ -O2 -fPIC -funroll-loops -fno-exceptions -DLINUX_BETA -D_REENTRANT
# g++ -shared -s -o robotcom.so ...
BTW, you should read
ftp://sunsite.unc.edu/pub/Linux/GCC/elf.ps.gz
if you want to program under Linux. It is kind of dated. But it is
still quite useful.
--
H.J. Lu (hjl@gnu.org)
next prev parent reply other threads:[~1999-03-24 17:07 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-03-24 15:42 Sam Lantinga
[not found] ` < E10PxHr-0001fO-00@roboto.devolution.com >
1999-03-24 15:54 ` Joe Buck
[not found] ` < 199903242353.PAA02719@atrus.synopsys.com >
1999-03-24 23:22 ` Martin v. Loewis
1999-03-31 23:46 ` Martin v. Loewis
1999-03-31 23:46 ` Joe Buck
1999-03-24 17:07 ` H.J. Lu [this message]
[not found] ` < m10PycJ-000ErMC@ocean.lucon.org >
1999-03-25 5:04 ` Nick Ing-Simmons
1999-03-31 23:46 ` Nick Ing-Simmons
1999-03-31 23:46 ` H.J. Lu
[not found] ` <199903242353.PAA02719.cygnus.egcs@atrus.synopsys.com>
1999-03-25 1:08 ` Jason Merrill
1999-03-25 8:28 ` Andi Kleen
1999-03-31 23:46 ` Andi Kleen
[not found] ` < u9n212vswe.fsf@yorick.cygnus.com >
1999-03-25 14:35 ` Martin v. Loewis
1999-03-31 23:46 ` Martin v. Loewis
1999-03-31 23:46 ` Jason Merrill
1999-03-31 23:46 ` Sam Lantinga
-- strict thread matches above, loose matches on Subject: below --
1999-03-25 9:49 Sam Lantinga
[not found] ` < E10QEFo-0002NA-00@roboto.devolution.com >
1999-03-25 10:14 ` H.J. Lu
1999-03-31 23:46 ` H.J. Lu
1999-03-31 23:46 ` Sam Lantinga
1999-03-25 9:48 Sam Lantinga
1999-03-25 11:24 ` Jason Merrill
1999-03-31 23:46 ` Jason Merrill
1999-03-31 23:46 ` Sam Lantinga
1999-03-24 17:57 N8TM
1999-03-31 23:46 ` N8TM
1999-03-24 16:47 Sam Lantinga
1999-03-31 23:46 ` Sam Lantinga
1999-03-24 16:34 Mike Stump
1999-03-31 23:46 ` Mike Stump
1999-03-24 16:28 Sam Lantinga
[not found] ` < E10Py0p-0001gL-00@roboto.devolution.com >
1999-03-24 16:45 ` Joe Buck
1999-03-31 23:46 ` Joe Buck
1999-03-31 23:46 ` Sam Lantinga
1999-03-24 15:05 Sam Lantinga
[not found] ` < E10PwfK-0001bs-00@roboto.devolution.com >
1999-03-24 23:26 ` Martin v. Loewis
1999-03-31 23:46 ` Martin v. Loewis
1999-03-24 23:35 ` Martin v. Loewis
1999-03-31 23:46 ` Martin v. Loewis
1999-03-31 23:46 ` Sam Lantinga
[not found] <E10PwA2-0001UN-00@roboto.devolution.com>
1999-03-24 14:42 ` Martin von Loewis
1999-03-24 14:49 ` Dima Volodin
1999-03-31 23:46 ` Dima Volodin
1999-03-31 23:46 ` Martin von Loewis
1999-03-24 13:52 Sam Lantinga
[not found] ` < E10PvY5-0001NJ-00@roboto.devolution.com >
1999-03-24 14:10 ` Martin v. Loewis
1999-03-31 23:46 ` Martin v. Loewis
1999-03-24 15:18 ` H.J. Lu
1999-03-31 23:46 ` H.J. Lu
1999-03-31 23:46 ` Sam Lantinga
1999-03-24 9:38 Sam Lantinga
[not found] ` < E10PrbT-0003Og-00@roboto.devolution.com >
1999-03-24 13:29 ` David B. Rees
1999-03-31 23:46 ` David B. Rees
1999-03-24 13:38 ` Martin v. Loewis
1999-03-31 23:46 ` Martin v. Loewis
1999-03-31 23:46 ` Sam Lantinga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m10PycJ-000ErMC@ocean.lucon.org \
--to=hjl@lucon.org \
--cc=egcs@egcs.cygnus.com \
--cc=slouken@devolution.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).