Comment # 10 on bug 1000513 from
(In reply to Jiri Slaby from comment #9)
> OTOH, gcc-6 on 42.2 does not put getenv into dw.

Wrong: gcc-6 on 42.2 DOES put getenv into dw, but without prototype:
$ gcc-6 dw.c -o dw.o -g -c -O2 && readelf -wi dw.o|grep -C 5 getenv
    <359>   DW_AT_abstract_origin: <0x36a>
 <2><35d>: Abbrev Number: 0
 <1><35e>: Abbrev Number: 22 (DW_TAG_subprogram)
    <35f>   DW_AT_external    : 1
    <35f>   DW_AT_declaration : 1
    <35f>   DW_AT_linkage_name: (indirect string, offset: 0x186): getenv
    <363>   DW_AT_name        : (indirect string, offset: 0x186): getenv
    <367>   DW_AT_decl_file   : 7
    <368>   DW_AT_decl_line   : 564
 <1><36a>: Abbrev Number: 23 (DW_TAG_subprogram)
    <36b>   DW_AT_external    : 1
    <36b>   DW_AT_declaration : 1

gcc 4.8 puts in the prototype:
gcc-4.8 dw.c -o dw.o -g -c -O2 && readelf -wi dw.o|grep -C 5 getenv
    <2fb>   DW_AT_type        : <0x264>
    <2ff>   DW_AT_external    : 1
    <2ff>   DW_AT_declaration : 1
 <1><2ff>: Abbrev Number: 19 (DW_TAG_subprogram)
    <300>   DW_AT_external    : 1
    <300>   DW_AT_name        : (indirect string, offset: 0x268): getenv
    <304>   DW_AT_decl_file   : 6
    <305>   DW_AT_decl_line   : 564
    <307>   DW_AT_prototyped  : 1
    <307>   DW_AT_type        : <0x8b>
    <30b>   DW_AT_declaration : 1


You are receiving this mail because: