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: Stab type information in string field


Ludovic Courtès <ludovic dot courtes at laas dot fr> writes:

> I have some more questions regarding the so-called "N_BINCL
> optimization".  From my understanding, "N_EXCL foo.h" means:
> all the types that were defined the *last time* foo.h was included are
> available again now (with the same type number).

Not quite.  N_EXCL comes with a number, in the symbol value field,
which is a hash of the contents of the header file.  You have to find
the N_BINCL with the same header file name and the same number.

> Also, if an "N_BINCL foo.h" occurs after another "N_BINCL foo.h", then I
> distinguish two cases:
>   - either the first inclusion occured in the same source file in which
>     case types that were defined there should still be available (new
>     type definitions just get added to the current list);
>   - or the first inclusion occured in another source file in which case
>     types that were defined there become unavailable.

You will see two N_BINCL foo.h entries if foo.h generated different
stabs entries the second time it was included.  There are quite a few
ways that could happen.

Ian


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