🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50617

crtbegin.o, crtend.o, libgcc.a

#50617
From: Martin Schweikert
Date: Wed, 08 Sep 1993 15:08
38 lines
1992 bytes
Hi!

The gcc manual in ch. 16: "Target Description Macros" says:

    "When arbitrary sections are available, there are two variants,
    depending upon how the code in `crtstuff.c' is called.  On systems that
    support an "init" section which is executed at program startup, parts
    of `crtstuff.c' are compiled into that section.  The program is linked
    by the `gcc' driver like this:

         ld -o OUTPUT_FILE crtbegin.o ... crtend.o -lgcc"

Is this sequence of objects absolutely necessary?

Sometimes I have to use a special linker provided by the Unify DBMS,
'uld'. 'uld' in turn starts the system linker, passing all arguments
that were given to 'uld' to 'ld' after some own arguments. That means:
I have no chance to provide 'ld' with the arguments in the above given
sequence. All I can do is to pass the 'uld' program the arguments

    crtbegin.o <my.own.objects> crtend.o libgcc.a

'uld' then will call 'ld' with some arguments it produces itself, my
arguments following.

A first test with a medium sized program was even successfull with the
arguments 

    <all.the.other.objects> libgcc.a crtbegin.o crtend.o

So there is hope I am not lost with my infamous 'uld', I think?

Martin

-- 
M. Schweikert-Oberhausen/Germany-schweik@cpp.ob.open.de / My life is based on
  <>< LifeNet: martin_schweikert@credo.zer (Joh3:16)  / two things: Belief in
   Fax: +49 208 85 97 108, Phone: +49 208 85 97 143 / Christ and Murphy's Law
Technical Details
Message-ID: <1993Sep8.150805.26221@cpp.ob.open.de>
Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!ruhr.de!reswi!cpp.do.open.de!cppob!schweik

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,a4a53f65ca57fbfb,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-09-08 16:21:46 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!ruhr.de!reswi!cpp.do.open.de!cppob!schweik
From: schweik@cpp.ob.open.de (Martin Schweikert)
Subject: crtbegin.o, crtend.o, libgcc.a
Message-ID: <1993Sep8.150805.26221@cpp.ob.open.de>
Organization: Private/FRG
Distribution: gnu
Date: Wed, 8 Sep 93 15:08:05 GMT
Lines: 38