Only write out a map event label if there are actually events to write for its section. Otherwise, you end up writing invalid labels to file, such as '0x0'.
Since map constants can be inferred from map names, but not the other
way around, create a mapping between map constants and map names and use
that to find the connected map.