GP-5789: Handle case where module appears to have zero length.

This commit is contained in:
Dan 2025-07-23 17:33:48 +00:00
parent d11c1c6c17
commit 92708efe40

View file

@ -1280,7 +1280,10 @@ def put_modules(modules: Optional[Dict[str, util.Module]] = None,
base_base, base_addr = mapper.map(inf, m.base)
if base_base != base_addr.space:
trace.create_overlay_space(base_base, base_addr.space)
modobj.set_value('Range', base_addr.extend(m.max - m.base))
if m.max == m.base:
modobj.set_value('Base', m.base)
else:
modobj.set_value('Range', base_addr.extend(m.max - m.base))
if sections:
sec_keys = []
for sk, s in m.sections.items():