This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [hjl@lucon.org: Re: PATCH: Output dwarf debug info only when needed]
Hi Daniel,
> Oops, that's right. How about:
> /* We don't need to do anything unless:
> - Some debug information was recorded via .file/.loc
> - or, we are generating DWARF2 information ourself (--gdwarf2)
> - or, there is a user-provided .debug_info section which could
> reference the file table in the .debug_line section we generate
> below. */
> if (all_segs == NULL
> && debug_type != DEBUG_DWARF2
> && )
>
> Where the bit after the last && is "there is no user .debug_info"
> section (which I can't figure out how to say in gas).
How about:
bfd_get_section_by_name (stdoutput, ".debug_info") == NULL
Cheers
Nick