RFC: Generating per-function DWARF line number sections

Cary Coutant ccoutant@google.com
Wed May 1 19:43:00 GMT 2013


> Under normal circumstances the fix proposed above will still work because
> gas will create a debug line fragment section called .debug_line.text.dwo.
> (Assuming that dwo() was compiled with function sectioning enabled).
>
> To really muck things up the programmer would have to provide a section
> attribute to the dwo() function as well.  Ie:
>
> void dwo (void) __attribute__((section("dwo"));
> void dwo (void) { ; }
>
> And then compile it without function sectioning enabled but with
> --gdwarf-sections enabled.  Which seems pretty unlikely to me.

Agreed. Thanks!

-cary



More information about the Binutils mailing list