This patch tries to reduce the size of the debug_loclist section by replacing the DW_LLE_start_length opcodes currently emitted by dsymutil in favor of using DW_LLE_base_address + DW_LLE_offset_pair instead.
The DW_LLE_start_length is one AddressSize followed by a ULEB per entry, whereas, the DW_LLE_base_address + DW_LLE_offset_pair will use one AddressSize for the base address, and then the DW_LLE_offset_pair is a pair of ULEBs. This will be more efficient where a loclist fragment has many entries.
I tried to see the size of the clang.dSYM and it went from 12.23 MB to 10.46 MB in size.
not necessary to do that way, but if you found this useful: It might be a bit simpler if BaseAddress would be std::optional<uint64_t>. Then we do not need BaseAddressEmitted flag. A bit shorter and no connected variables.