> Make a file that just has "int x;" in it, then compile with -g. > GCC won't emit a .debug_aranges.
This was exactly the test I used (I even called it 'x' instead of 'foo' for some reason!). It emits low_pc..high_pc that is an empty range in .text (but a relocated one, so after link it will wind up some specific 0x123,0x123 pair rather than zeros). It didn't occur to me last week to look for the .debug_aranges section. But I concur that it should be consistent: .debug_aranges should be exactly the set of ranges (whatever that is) emitted for any compile_unit DIE. That should likewise resolve to whatever specific empty range it is, not absolute zeros. (I say so not because the relocated empty range seems especially useful--it tells you nothing except what the link order of the .o files happened to be--but just to stick to the aforementioned consistency in a thorough way.) > I think it ought to emit an empty one, see > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42288 > for the rationale. I guess I concur with the rationale that each and every CU appearing in some rhs in the .debug_aranges section helps identify the section as complete. Before considering that issue, I would have said that it was questionable for a compile_unit to have the PC attributes at all when it does not actually cover any PCs. I'm still not 100% convinced. Thanks, Roland _______________________________________________ elfutils-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/elfutils-devel
