gdb: Do not add empty sections to the section map
From: Ulrich Weigand <ulrich.weigand@de.ibm.com>
build_objfile_section_table () creates four synthetic sections per
objfile, which are collected by update_section_map () and passed to
std::sort (). When there are a lot of objfiles, for example, when
debugging JITs, the presence of these sections slows down the sorting
significantly.
The output of update_section_map () is used by find_pc_section (),
which can never return any of these sections: their size is 0, so they
cannot be accepted by bsearch_cmp ().
Filter them (and all the other empty sections) out in
insert_section_p (), which is used only by update_section_map ().