Tom de Vries found a failure that we tracked down to a latent bug in
read_addrmap_from_aranges (previously create_addrmap_from_aranges).
The bug is that this code can erroneously reject .debug_aranges when
dwz is in use, due to CUs at duplicate offsets. Because aranges can't
refer to a CU coming from the dwz file, the fix is to simply skip such
CUs in the loop.
{
/* A TU will not need aranges, and skipping them here is an easy
way of ignoring .debug_types -- and possibly seeing a
- duplicate section offset -- entirely. */
- if (per_cu->is_debug_types)
+ duplicate section offset -- entirely. The same applies to
+ units coming from a dwz file. */
+ if (per_cu->is_debug_types || per_cu->is_dwz)
continue;
const auto insertpair