delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/03/18/09:19:24

Date: Wed, 18 Mar 1998 16:07:04 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Robert Hoehne <robert DOT hoehne AT gmx DOT net>
cc: DJ Delorie <dj AT delorie DOT com>, djgpp-workers AT delorie DOT com
Subject: Re: Bugs in 2.8.0?
In-Reply-To: <350EF478.C51FE3CB@gmx.net>
Message-ID: <Pine.SUN.3.91.980318160638.21675F-100000@is>
MIME-Version: 1.0

On Tue, 17 Mar 1998, Robert Hoehne wrote:

> ! %{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crtf.o%s crt0.o%s}}

Why do we need to always link in crtf.o?  Isn't it *only* for C++
programs?  (Can we know, on the lib/specs level, that this is a C++
program?)  

Also, don't we need crt0.o to be the first one of the two?

> And finally we need also to modify the DJGPP linker script.

This means that, in general, the G++ distribution would need to come
with a replacement for the linker script, at least until DJGPP 2.02 is
out.  I don't like that: people might modify their script (I think
RSXNT does that already) and we shouldn't break their setups unless we
absolutely have to.  Since DJGPP is no longer released together with
GCC and Binutils, the list of possible incompatibilities will quickly
overwhelm us with subtle bugs and HELP!!! messages.

I would suggest that we find a way to make `ld' process more than a
single script.  Then we could only *add* the second one to the G++
distribution and have it seamlessly integrated into whatever a
particular user setup already does.

One possible way to achieve this would be to change lib/specs so that
it invokes two -T options, the second one with the additional script
that describes the new sections, and only if it's a C++ program (if
that can be known at that point).

An even better way would be to do the same trick with lib/specs, so
that the original lib/specs stays intact.  Is there any environment
variable that can do this for us?

Btw, what's the order in which gcc 2.8. looks for the linker scripts
and specs files?  Does it use the first one found or all of them?  If
the former, we might have another alternative: to put the new linker
script and specs file under lib/gcc-lib/djgpp/2.80/ so that it would
be found first (assuming that GCC looks there before lib/ itself).

> and I don't know exactly if we need to deregister the exception
> tables (which is normally done with a crtend.o file)

So why not add crtend.o right now?  What prevents us from doing a
complete job?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019