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]

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


>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)
                break;
+             else if (incl_type == (int) N_EXCL)
+                continue;
              else if (incl_type == (int) N_EINCL)
                {
                  if (nest == 0)


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