[Dwarf-Discuss] About DW_AT_external

P J P pj.pandit at yahoo.co.in
Wed Jul 28 11:21:21 PDT 2010


--- 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. 

Thank you.
---
Regards
    -Prasad
PS: Please don't send me html/attachment/Fwd mails






More information about the Dwarf-Discuss mailing list