[Dwarf-Discuss] About DW_AT_external
Wed Jul 28 18:40:44 GMT 2010
P J P wrote:
> --- On Wed, 28/7/10, Michael Eager <eager at eagercon.com> wrote:
>> The DIE for "malloc" should have DW_AT_external where it is
>> defined, not in places the symbol is referenced.
>> DIEs for non-defining declarations should have the
>> DW_AT_declaration flag.
> Please see: http://www.fpaste.org/DvLd/
> It's a C++ program: greeting.cpp, with it's output and some dwarf information.
> Above output shows that, both the symbols, the ones defined in greeting.cpp and the ones coming from standard library by way of linking have - external & declaration - flags set.
> The static_function has - external & declaration - flags unset.
> The main function has - external set - & - declaration unset.
> That makes it a little confusing to know which functions are defined in the same compilation unit and which come from outside.
There's sometimes a difference between what a standard
says and what implementation actually do.
If you believe that you have found a bug in g++,
you should discuss this on gcc-help at gcc.gnu.org.
Michael Eager eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
More information about the Dwarf-discuss