This patch adds two hashmaps to avoid the N^2 complexity of scanning lists to find object. In obj-elf.c, group names are mapped to indexes into an array, and in dwarf2dbg.c segment names are mapped to segments. For inputs with ~40k sections, this patch reduces the assembly time from 3min to 15s on builds with debug information. It does this at the expense of increase memory usage. In my example, it increased from 405MB to 640MB. Tested with x86_64-linux arm-eabi with no regressions seen on check, check-gas. Thanks, Martin