*BSD News Article 38004


Return to BSD News archive

Xref: sserve comp.os.386bsd.questions:14520 comp.os.linux.misc:29941
Newsgroups: comp.os.386bsd.questions,comp.os.linux.misc
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!uwm.edu!spool.mu.edu!bloom-beacon.mit.edu!news.kei.com!eff!wariat.org!kf8nh!bsa
From: bsa@kf8nh.wariat.org (Brandon S. Allbery)
Subject: Re: ELF and dynamic loading (Re: 386BSD vs Linux)
Message-ID: <1994Nov18.021141.29144@kf8nh.wariat.org>
Organization: Brandon's Linux box and AmPR node, Mentor, OH
Date: Fri, 18 Nov 1994 02:11:41 GMT
References: <39tu2u$o8r@styx.uwa.edu.au> <MICHAELV.94Nov11124334@MindBender.HeadCandy.com> <3a4a2o$d7m@j51.com> <3ag7cn$lba@pdq.coe.montana.edu>
Lines: 27

Also sprach nate@bsd.coe.montana.edu (Nate Williams) (<3ag7cn$lba@pdq.coe.montana.edu>):
+---------------
| >ELF is better than a.out. That is the point.
| What basis do you use for this statement?
+------------->8

Global constructors and destructors will do for a first point.  The absolute
ridiculousness of g++ 1.x on System V insisting on encapsulating a.out
binaries inside COFF and thus being forced to use the collect2 hack to
implement global constructors and destructors, instead of using COFF directly
and stuffing the constructors into the .init segment and the destructors into
.dnit (as g++ 2.x does) during the compile (assembler directives, stash a
pointer) and letting the linker do the hard work for you.

COFF and ELF are extensible (ELF more so, which is why it has replaced COFF);
a.out needs hacks for almost everything beyond the scope of the PDP-11
binaries it was designed for.  Which is not to say that ELF is perfect (the
debugging format has holes in it; okay, so stuff stabs into a new segment like
Solaris.  End of problem :-)

++Brandon
(of course, the mention of every rabid BSDer's favorite Ultimate Evil will
probably cause a flamewar...)
-- 
Brandon S. Allbery KF8NH	 [44.70.4.88]		bsa@kf8nh.wariat.org
Linux development:  iBCS2, JNOS, MH					 ~\U
Controlling application developers is like herding cats. --Oracle DBA Manual