RFC: Generating per-function DWARF line number sections
nick clifton
nickc@redhat.com
Fri Apr 26 08:04:00 GMT 2013
Hi Alan,
> Is it worth supporting the old style of grouping by name?
Umm, I am not quite sure what you mean here. Can you provide an example ?
> Why not just support ELF section groups?
This is the long term solution. It is a more invasive change however -
requiring the cooperation of gcc as well as gas and ld. But, free time
willing, this is the way that I intend to go.
> Using names leads to eg. your
> _bfd_elf_gc_mark_extra_sections change which is quadratic in number of
> sections..
Right - the current patch is not ideal, and I did consider constructing
lists instead of the quadratic scan. But that is more complex, and I
wanted to keep things simple for this first iteration of the patch, If
it turns out that this scan is significant slow down for the linker then
I can always come back and recode the loop later.
> Also, why do this in gas? It seems to me that this sort of change
> belongs in gcc.
Because the .debug_line section for most ELF-based targets is now
constructed by gas not gcc. Gcc emits .loc directives and gas converts
them into .debug_line entries.
Cheers
Nick
More information about the Binutils
mailing list