[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ld (bfd?) bug: unmatched excluded include in stabs

From: Mattias Engdegård
Subject: Re: ld (bfd?) bug: unmatched excluded include in stabs
Date: Tue, 18 Nov 2003 16:26:34 +0100

>Not being an expert on STABS, I am not sure if the following question
>makes any sense, but I will ask it anyway:  Is this the correct
>behaviour for the linker, or should it be ignoring the EXCL gamma.h
>when computing the checksum for the BINCL of alfa.h ?

I think ignoring EXCLs when computing checksums makes sense, since
that would give the same behaviour as if the EXCL were replaced by the
equivalent BINCL ... EINCL sequence.

The correct behaviour is largely defined by Sun's linker, but it does
not elide duplicated includes when doing partial links anyway.

>Yes - please send the testcase to the list.  (I assume that it is a
>*small* testcase ? :-)

It's small. ftp://ptah.lnf.kth.se/pub/misc/bug.tar.gz

Here is the proposed patch, which seems to cure it:

--- binutils-031118/bfd/stabs.c~        Tue Nov  4 12:30:54 2003
+++ binutils-031118/bfd/stabs.c Tue Nov 18 16:24:01 2003
@@ -358,6 +358,8 @@
              incl_type = incl_sym[TYPEOFF];
              if (incl_type == 0)
+             else if (incl_type == (int) N_EXCL)
+                continue;
              else if (incl_type == (int) N_EINCL)
                  if (nest == 0)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]