PATCH: PR ld/13962: Misleading error message when linking a library with an empty library
Wed May 16 21:34:00 GMT 2012
> FWIW, gold accepts the DSO without dynamic symbols. ld and
> gold should be consistent. Ian, Cary, what do you think?
As far as I can tell, gold doesn't ever look at the sh_info field of
the .dynsym section for a DSO -- it just processes all the symbols,
and an empty symbol table section shouldn't cause any problems,
regardless of the value in sh_info.
For relocatable objects, it looks like gold might indeed have a
problem if it ever sees an empty .symtab section with sh_info == 1. If
we don't need the local symbols, we'll end up with a negative count of
symbols to read, but if we do need local symbols (e.g., if there's an
.eh_frame section), it looks like it'll just read all the symbols and
it'll be OK. I'd guess we've never seen such a file, though.
More information about the Binutils