This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Stab type information in string field
- From: Ian Lance Taylor <ian at airs dot com>
- To: Ludovic Courtès <ludovic dot courtes at laas dot fr>
- Cc: binutils at sources dot redhat dot com
- Date: 31 Mar 2003 17:36:50 -0800
- Subject: Re: Stab type information in string field
- References: <20030321130910.GA9952@laas.fr> <m3wuis8gqh.fsf@gossamer.airs.com><20030331155419.GK342@laas.fr>
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