delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/20/14:31:58

From: Thomas Demmer <demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: RHIDE Question.
Date: Fri, 17 Oct 1997 08:16:32 +0200
Organization: Lehrstuhl fuer Stroemungsmechanik
Lines: 51
Message-ID: <344702C0.D7105588@LSTM.Ruhr-UNI-Bochum.De>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 971015131304 DOT 17868J-100000 AT is>
NNTP-Posting-Host: c64.lstm.ruhr-uni-bochum.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Eli Zaretskii wrote:
> 
> On Tue, 14 Oct 1997, Peter Palotas wrote:
[...]
>>
>> Well, I think I can give an example. I want to compile a file which outputs
>> a headerfile (.h). And this file is included in some of the .C* files that
>> I compile. (Compile might be the wrong work, but anyway... I use some AWK
>> scripts/programs and CPP to generate a headerfile from several others
>> anyway, and this has to be created *before* any of the other files are
>> compiled).
> 
> This should be done by Make.  Make will ensure that any target
> required to produce another target is made first.
...with the slight problem that RHIDE doesn't uses make internally,
AFAIK.
RHIDE doesn't know about intermediate files, I try to teach a little
bison
and flex to it, but it even the Makefile (from Project/Write Makefile) 
has preoblems sometimes.


> 
> However, I think I have a case where the link order really is
> important.  This is when one or more of the modules being linked use
> functions with `__attribute__((constructor))' or ((destructor)).
> 
> For example, imagine that a program uses Filesystem Extensions to
> install handlers for some special files, and uses the constructor
> attribute to make the installation happen before `main' gets called.
> 
> These functions will be invoked by the startup/exit code in the order
> they are seen by the linker.  And that order might be important,
> e.g. when one function needs to install itself ahead of others, so it
> sees the calls first.

Hmm, tricky.
-- 
Ciao
Tom

*************************************************************
* Thomas Demmer                                             *
* Lehrstuhl fuer Stroemungsmechanik                         *
* Ruhr-Uni-Bochum                                           *
* Universitaetsstr. 150                                     *
* D-44780  Bochum                                           *
* Tel: +49 234 700 6434                                     *
* Fax: +49 234 709 4162                                     *
* http://www.lstm.ruhr-uni-bochum.de/~demmer                *
*************************************************************

- Raw text -


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