public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
* A change to ld in the binutils 2.4 breaks Linux
@ 1994-09-19 20:16 H.J. Lu
  1994-09-20  8:38 ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 1994-09-19 20:16 UTC (permalink / raw)
  To: gas2; +Cc: Eric Youngdale

With ld from binutils 1.9, under linux

gcc foo.c bar.c

won't link. This feature is used by the Linux shared library to make
sure all the necessary libraries are linked in. But with the new
binutils, under Linux

gcc foo.c bar.c

links ok. That breaks the Linux shared library. Eric, we have to either
change our tools or modify the binutils.


-- 
H.J. Lu
NYNEX Science and Technology, Inc.			hjl@nynexst.com
-----foo.c----
main ()
{
  extern int x;
  return x;
}
----bar.c----
int x = 0;

asm (".stabs \"_need_this_one\",0,0,0,0");


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: A change to ld in the binutils 2.4 breaks Linux
  1994-09-19 20:16 A change to ld in the binutils 2.4 breaks Linux H.J. Lu
@ 1994-09-20  8:38 ` Ian Lance Taylor
  1994-09-20 20:38   ` H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 1994-09-20  8:38 UTC (permalink / raw)
  To: hjl; +Cc: gas2, ericy

   From: hjl@nynexst.com (H.J. Lu)
   Date: Mon, 19 Sep 94 23:15:47 EDT

   But with the new
   binutils, under Linux

   gcc foo.c bar.c

   links ok. That breaks the Linux shared library. Eric, we have to either
   change our tools or modify the binutils.

   -----foo.c----
   main ()
   {
     extern int x;
     return x;
   }
   ----bar.c----
   int x = 0;

   asm (".stabs \"_need_this_one\",0,0,0,0");



The new linker does not complain about undefined symbols unless they
are needed in relocs.  This is consistent with the SunOS linker, at
least, and, I suspect, other linkers as well.

I'm not entirely sure what the objective is here, but if what you want
to do is simply determine whether a particular symbol is defined, you
could just use the autoconf approach.

Ian


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: A change to ld in the binutils 2.4 breaks Linux
  1994-09-20  8:38 ` Ian Lance Taylor
@ 1994-09-20 20:38   ` H.J. Lu
  0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 1994-09-20 20:38 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gas2, Eric Youngdale

> The new linker does not complain about undefined symbols unless they
> are needed in relocs.  This is consistent with the SunOS linker, at
> least, and, I suspect, other linkers as well.
> 
> I'm not entirely sure what the objective is here, but if what you want
> to do is simply determine whether a particular symbol is defined, you
> could just use the autoconf approach.
> 
> Ian
> 

Never mind. I have got ELF/PIC working on my machine. But I cannot use
the latest snapshot. I had to back out to gas-940912 and then apply
the PIC patches for Eric. It works like a charm. Thanks a lot guys.

I have built a set of ELF/PIC binaries of gcc, binutils and the Linux
C library. Eric, I think we are on the right track.


-- 
H.J. Lu
NYNEX Science and Technology, Inc.			hjl@nynexst.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1994-09-20 20:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-09-19 20:16 A change to ld in the binutils 2.4 breaks Linux H.J. Lu
1994-09-20  8:38 ` Ian Lance Taylor
1994-09-20 20:38   ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).