Subject: Re: When is ELF coming?
To: John Birrell <jb@cimlogic.com.au>
From: Chris G Demetriou <Chris_G_Demetriou@ux2.sp.cs.cmu.edu>
List: port-alpha
Date: 11/18/1996 00:08:00
> I'm looking for versions of gcc/ld that let me check out a design of
> libc/libpthread that uses lots and lots of weak symbols (like every
> syscall, any stdio function that needs locking, ...). My need for more
> GOTs can wait.

Yah, i understand.


> Is it possible to run a hybrid system, using ELF selectively, or is
> it "all or nothing"?

Well, to run a hybrid system (and be able to compile programs), you
need to have at least libraries building...  And i've noted a few
problems with those.


If the libraries built fine, i'd really have no great objection to
getting an ELF user-land, etc., out there.  but the problem is that
they _don't_ without severe hacking to work around bugs in the
toolchain.


> > > And it has weak symbols?
> 
> I meant compiler support for weak symbols (instead of the sig 11
> I get using V2.7-95q4).

Ahh, i didn't realize that was what you meant.  8-)

I'd not even tried them with the current toolchain.  now, i guess, i'm
glad!


> > Well, i've been waiting for weak symbols in libc for a long, long
> > time, and J.T. hasn't gotten around to doing it yet, even though he
> > apparently has code which implements it and works.  I even have a
> > bunch of code to do it, which i didn't check in, to keep out of his
> > way.
> 
> Is there anything anyone else can do about this?

well, my tack has been to keep pestering him occasionally...


> What do you need weak symbols in libc for?
> I'll show you mine if you show me yours... 8-)

Shared libraries.

ELF shared libraries look like one big .o, in terms of the linking
model...  I can't define it precisely (since i'm no an ELF guru), but
it's more or less seomthing like:

If you've got 'real' (non-weak) symbols in your libraries that the
user program also wants to define, lossage ensues.

One example of this is /usr/bin/pr: it defines a global FILE * named
'err'.  That gets confused with the libc (function) definition of
'err'.  SEGV.



chris