Module::AddFunction assumes that any time we add a function, it is
preferable to use that instead of the corresponding external
symbol (which could be anything). The former show up in Breakpad symbol
files as FUNC lines, and the latter as PUBLIC lines.
For Module::AddFunction to be effective, we have to parse all the
external symbols for a module first, and then discover all the actual
functions. But the Linux symbol dumping code does the reverse: it first
parses all the DWARF information (including .debug_info, which adds any
relevant functions) and then parses the ELF symbol table. This ordering
means that we wind up emitting PUBLIC lines for which corresponding FUNC
lines already exist. These duplicate PUBLIC lines take up roughly 10%
of the size of a libxul symbol file (~30MB), and are completely unnecessary.
The fix is simple: we should reverse the order in which we parse ELF
symbols and DWARF debug information.