The embedded compressed table and the file's .symtab describe the same
local functions, the latter being a superset, so decompressing it when the
file is readable is pure loss, which is the common case.
Only decompress it when the file gave us nothing, i.e. once stripped or
unreachable. This is what the table is for and saves inflating about 1.5 MB
per object at every start.
b->debugdata_size = end - (unsigned long)b->debugdata;
}
- if (b->debugdata && b->debugdata_size)
+ /* the file's symbol table, when we could read it, is a superset of the
+ * embedded one, so only pay for the decompression when we have nothing.
+ */
+ if (b->debugdata && b->debugdata_size && ret <= 0)
collect_debugdata(b, obj, b->debugdata, b->debugdata_size);
if (is_exe)