Subject: Re: a patch for dynamic a.out support in binutils
To: Matthew Fredette <fredette@MIT.EDU>
From: Krister Walfridsson <cato@df.lth.se>
List: tech-toolchain
Date: 08/03/2000 21:44:48
On Thu, 3 Aug 2000, Matthew Fredette wrote:

> > - inderect/warning symbols didn't really work (but that may have been a
> >   bug in my code) This gave me big trouble with libc.
> 
> Big trouble when linking libc itself or linking executables against it?
> 
> I'll check tonight, but right now I don't remember putting in anything
> specific to handle indirect or warning symbols.

Both. But I was using binutils 2.8.1 and I think some of the problem
lay deeper in libbfd.


> > - I had problems supporing -x and -X with shared libs.
> 
> I was unfamiliar with these options until just now.  Does the symbol
> discarding happen when reading input files (i.e., they are completely
> hidden from the linker) or when writing the output?  Shouldn't be too
> hard to get either behavior.

This is basically "first link and then strip." Remember that there may
be unresolved symbols that must not be stripped.


> > - I had problems supporting -Bsymbolic flags to ld (i.e. problems with
> >   ld.so.)
> 
> This is one option I was aware of, but I explicitly avoided thinking
> about it :).  Searching through the old ld sources, though, doesn't
> turn up too many references to the SYMBOLIC bit in link_mode, so
> this might not be too hard, either.
> 
> > Generally, libc, libbfd and libstdc++ gave me _lots_ of problems even
> > though I though my ld was "bug free". Have you tested some of that above?
> 
> Nope.  My main motivation in all of this is cross-compiling random
> software packages, so I haven't tried doing "system"-y stuff like
> trying to link a libc or an ld.so.  But if someone can tell me what is
> needed to get that to work, I can look into adding it.

Well, I'm only interested in "system"-y stuff. There is not any really
special things needed for that, but I have found out the hard way that
building NetBSD seems to exercise really big parts of binutils, and
trigger bugs that I don't see when I build "normal stuff".

Btw. I have only done i386, sparc and arm for now, so our work
seems to complement each other nicely. I'll try to merge our efforts
during the weekend, and I'll drop you a mail then, so that we may
determine how to proceed.

   /Krister