This is the mail archive of the
egcs@egcs.cygnus.com
mailing list for the EGCS project. See the EGCS
home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]
Re: Shared library compilation
- To: doug@seaspace.com
- Subject: Re: Shared library compilation
- From: "Martin v. Loewis" <martin@mira.isdn.cs.tu-berlin.de>
- Date: Fri, 26 Feb 1999 18:25:17 +0100
- CC: egcs@egcs.cygnus.com
- Delivered-To: listarch-egcs@egcs.cygnus.com
- Delivered-To: mailing list egcs@egcs.cygnus.com
- In-reply-to: <00d101be61a2$d4278ab0$237196c0@seaspace.com> (doug@seaspace.com)
- Mailing-List: contact egcs-help@egcs.cygnus.com; run by ezmlm
- References: <00d101be61a2$d4278ab0$237196c0@seaspace.com>
- Sender: owner-egcs@egcs.cygnus.com
- User-Agent: SEMI/1.8.6 (Fukuoka) FLIM/1.9.2 (Shin-Tanabe) Emacs/20.3 (with unibyte mode)
> Is there a particular reason why gcc -shared calls ld with all the
> crt*.o files? What happens is that when I build a shared library this
> way, even on a 900 byte .o file, the shared library is 32 K.
> If I build the shared library with ld -shared (gnu linker, btw), it doesn't
> bring in these files.
On ELF, this is needed so that the .ctors and .dtors sections get
combined and referenced from a suitable .init section. Pretty much the
same holds for the exception handling support code.
Regards,
Martin