This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Re: ld internal error


On Wed, Mar 19, 2003 at 06:53:28PM +0200, Bernd Jendrissek wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Tue, Mar 18, 2003 at 06:12:55PM -0800, H. J. Lu wrote:
> > On Thu, Mar 13, 2003 at 03:39:34PM +0200, Bernd Jendrissek wrote:
> > > [Here a deal: I'd be happy to provide more details, as long as I stay Cc'ed.]
> > > 
> > > I have linux binutils 2.13.90.0.18 (built from source) and it crashes.
> > > 
> > > Trying to build glibc-2.3.2, I found it had failed thus:
> > > 
> > > 
> > > >From the message I conclude it's a bug in bfd regardless of the
> > > circumstances.  I have no reason to suspect a hardware bug; the machine
> > > has 103 days uptime and setiathome all day.
> > > 
> > > Unfortunately I when I run that failing command by hand, it works.
> > > 
> > 
> > You may have a stack problem. When you use "make", it may have a
> > different stack limit..
> 
> Nope, not the stack.  You might say "objdump: LART: file not found", but
> not *really*.  It turns out that rpm's find-requires script runs
> objdump (with -p) on all files that 'file' names as "executable".  Not
> sure if that's supposed to apply to glibc's locale-archive, but that's
> what causes this bomb.
> 
> $ file INST/glibc-2.3.2-i686-pc-linux-gnu/usr/lib/locale/locale-archive 
> INST/glibc-2.3.2-i686-pc-linux-gnu/usr/lib/locale/locale-archive: PDP-11 separate I&D executable not stripped
> 
> Aha, and that's why pdp11.c gets involved.  (I have binutils ./configure'd
> with --enable-targets=all BTW.)
> 
> So I guess it's up to you: should binutils fail gracefully on bogus(?)
> input or is it okay to crash?  I'd prefer it not to crash...
> 

Here is a patch.


H.J.
--
2003-03-19  H.J. Lu <hjl at gnu dot org>

	* pdp11.c (NAME(aout,some_aout_object_p)): Return NULL instead
	of abort.

--- bfd/pdp11.c.pdp11	2002-12-04 09:03:07.000000000 -0800
+++ bfd/pdp11.c	2003-03-19 16:54:37.000000000 -0800
@@ -713,11 +713,7 @@ NAME(aout,some_aout_object_p) (abfd, exe
 	   || N_MAGIC (*execp) == BMAGIC)
     adata (abfd).magic = o_magic;
   else
-    {
-      /* Should have been checked with N_BADMAG before this routine
-	 was called.  */
-      abort ();
-    }
+    return NULL;
 
   bfd_get_start_address (abfd) = execp->a_entry;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]