[Patch debug] Do not emit debug sections until they are required.
IainS
developer@sandoe-acoustics.co.uk
Tue Nov 2 12:25:00 GMT 2010
This is part 2 of a campaign to get rid of differences in section
ordering between debug & non-debug cases.
This moves the three remaining switch_to_section() from
dwarf2out_init () and places them directly before the code that emits
the respective sections.
In order to do this, macinfo data are saved in a vec, and emitted from
dwarf2out_finish () rather than 'on the fly'.
Whilst the benefit is mainly for targets that emit sections in the
order they are encountered...
... I also expect it is of help to anyone who has occasion to compare
debug/non-debug asm files.
bootstrapped on i686-darwin{8,9,10} and x86_64-unk-linux.
OK for trunk?
Iain
gcc:
* dwarf2out.c (macinfo_entry): New struct.
(output_comp_unit): Note that we will emit an info section.
(output_pubnames): Only try to refer to the info section if it is
emitted.
(dwarf2out_start_source_file): Save data in a macinfo entry rather than
emitting directly.
(dwarf2out_end_source_file): Likewise.
(dwarf2out_define): Likewise.
(dwarf2out_undef): Likewise.
(output_macinfo): New.
(dwarf2out_init): Do not emit debug section switches here.
(output_indirect_string): If any strings are emitted, then emit the
section
switch first, and once only.
(dwarf2out_finish): First switch to debug_abbrev_section here.
debug_line_section, debug_macinfo_section, Likewise.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 166173-dwarf-to-end-pt2.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20101102/1b5f6dd8/attachment.txt>
-------------- next part --------------
===
After this, there are tthree remaining issues (AFAICT);
1. frame_debug emitted before eh_frames (from toplev.c rather than
dwarf2out - is there some special reason for this?)
2. darwin's indirection stubs are emitted from end_file () and they
really need to be between the _eh frames and the debug.
3. the lto marker is emitted after everything else.
I had patches for these .. but they've got some bit-rot ..
.. this is not a mega-high-priority - but it would be good to shake
down some of the darwin debug hassles for 4.6.
More information about the Gcc-patches
mailing list