From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Klein To: law@cygnus.com Cc: gcc@gcc.gnu.org Subject: Re: MPE Port Date: Sun, 31 Oct 1999 23:35:00 -0000 Message-ID: <4.2.0.58.19991009200725.00c5a100@garfield.dis.com> References: <4.1.19990908195434.00b01950@garfield.dis.com> <2662.937215511@upchuck.cygnus.com> X-SW-Source: 1999-10n/msg00178.html Message-ID: <19991031233500.4ntNJqI76eObAa5Dgdz4KgaSmJo6p9ril5rz18cP16s@z> At 03:38 AM 9/13/99 -0600, Jeffrey A Law wrote: > In message <4.1.19990908195434.00b01950@garfield.dis.com>you write: > > I still run into the same issue (which is substantially the same as > > what faces the __gcc_plt_call) ... if it isn't referenced from the > > program, it won't get bound in for collect to find it. >You have to add it (either the .o or .a containing your constructor) to the >program's link line. > >collect is supposed to look at all the files on the link line for constructors >and add them to th ctor/dtor list. This appears to work if I specify the .o containing it separately, but if I include the global constructor in libgcc.a, it isn't resolved unless I make explicit reference to it a la __gcc_plt_call. Is collect treating libgcc.a specially? MPE doesn't use a crt.o or anything like that where I could "hide" this, so I'm faced with explicitly using a separate .o file for this purpose. Seems to me it was easier to use the same technique as the reference to __gcc_plt_call in the DO_GLOBAL_DTORS_BODY macro than trying to jump through all these hoops to make this a global constructor. Regards, M. -- Mark Klein DIS International, Ltd. http://www.dis.com 415-892-8400 PGP Public Key Available