This isn't quite finished, but a prototype that reduces the number of
debug_addr relocs in a large internal optimized binary by 40% substantially
reducing total object file size, which would be nice.
- Needs testing (updating existing test cases, maybe adding more - could check
about the number of relocations, etc)
- Needs work either way once determined if a debug location address range
could start at the very beginning of a function (then a range might be shorter
using startx_length than base_address+offset_pair)
- Maybe it's simpler to have two separate implementations rather than
generalizing the debug_ranges handling (especially if there's currently no
debug_loc generated for global variables (or no other way a variable could have
live ranges in more than one section))
- Comments
- Should DwarfDebug use MCStreamer directly for the ULEB label difference
(that's what it's doing in this version) or should it use an
AsmPrinter/MCStreamer API to match the non-ULEB label difference (I've
prototyped the MCStreamer/AsmPrinter APIs in this change - though they're not
wired up to DwarfDebug - just to show the rough scale of the code, mostly it's
just copy/pasted from the non-ULEB label difference codepath)
Oh, and Paul: This'll probably come in handy/can be reused for the rnglist
support (& generalized further for all the DWARF5 forms for use in loclist -
though I imagine we'll still only need to generate a subset of the forms -
maybe still only these 2 or 3 depending on what's being proritized (object
size, executable size, number of relocations)