bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/18836] ld handles .gnu.lto_ prefixed sections oddly, /DISCARD/ s


From: rguenth at gcc dot gnu.org
Subject: [Bug ld/18836] ld handles .gnu.lto_ prefixed sections oddly, /DISCARD/ semantics unclear
Date: Mon, 17 Aug 2015 13:09:18 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=18836

--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #7)
> (In reply to Richard Guenther from comment #4)
> > the extra sections contain "early" debug-info which gets refered to by
> > LTRANS unit .debug_info.  So it needs to be linked into the final
> > executable / shared object and there get its mangled section name
> > "unmangled".
> 
> I think they should have different section names. I assume that
> they can't be merged with normal .debug_xxx sections.

On the contrary - they should be merged with the normal .debug_xxx sections
emitted in the LTRANS assembly.  The early-debug part of an example looks
like

 <0><166>: Abbrev Number: 1 (DW_TAG_compile_unit)
    <167>   DW_AT_producer    : (indirect string, offset: 0x163): GNU C11 6.0.0 
20150813 (experimental) -mtune=generic -march=x86-64 -g -flto -ffat-lto-objects
    <16b>   DW_AT_language    : 12      (ANSI C99)
    <16c>   DW_AT_name        : t.c
    <170>   DW_AT_comp_dir    : (indirect string, offset: 0x1c1):
/abuild/rguenther/trunk-g/gcc
 <1><174>: Abbrev Number: 2 (DW_TAG_variable)
    <175>   DW_AT_name        : a
    <177>   DW_AT_decl_file   : 1
    <178>   DW_AT_decl_line   : 1
    <179>   DW_AT_type        : <0x17d>
    <17d>   DW_AT_external    : 1
 <1><17d>: Abbrev Number: 3 (DW_TAG_base_type)
    <17e>   DW_AT_byte_size   : 4
    <17f>   DW_AT_encoding    : 5       (signed)
    <180>   DW_AT_name        : int
 <1><184>: Abbrev Number: 4 (DW_TAG_subprogram)
    <185>   DW_AT_external    : 1
    <185>   DW_AT_name        : (indirect string, offset: 0x1df): main
    <189>   DW_AT_decl_file   : 1
    <18a>   DW_AT_decl_line   : 2
    <18b>   DW_AT_type        : <0x17d>

and the LTRANS unit .debug_info parts refer to it like

 <0><19b>: Abbrev Number: 1 (DW_TAG_compile_unit)
    <19c>   DW_AT_producer    : 
    <19d>   DW_AT_language    : 12      (ANSI C99)
    <19e>   DW_AT_low_pc      : 0x4004e6
    <1a6>   DW_AT_high_pc     : 0xc
    <1ae>   DW_AT_stmt_list   : 0xe8
 <1><1b2>: Abbrev Number: 2 (DW_TAG_imported_unit)
    <1b3>   DW_AT_import      : <0x166> [Abbrev Number: 1]
 <1><1b7>: Abbrev Number: 3 (DW_TAG_subprogram)
    <1b8>   DW_AT_abstract_origin: <0x184>
    <1bc>   DW_AT_low_pc      : 0x4004e6
    <1c4>   DW_AT_high_pc     : 0xc
    <1cc>   DW_AT_frame_base  : 1 byte block: 9c        (DW_OP_call_frame_cfa)
    <1ce>   DW_AT_GNU_all_call_sites: 1
 <1><1ce>: Abbrev Number: 4 (DW_TAG_variable)
    <1cf>   DW_AT_abstract_origin: <0x174>
    <1d3>   DW_AT_location    : 9 byte block: 3 3c 10 60 0 0 0 0 0     
(DW_OP_addr: 60103c)

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]