Fix problem where TLS common symbols are not allocated properly during LTO.

The plugin API doesn't provide a way for the claimed file handler to
identify a TLS symbol, so when adding a common TLS symbol, gold
mistakenly places the symbol in the non-TLS commons list, and does
not override it when we see the replacement symbol that is marked
as TLS. Consequently, we allocate the TLS common symbol as a regular
common, and, if it's the only TLS in the program, we'll give an
internal error because we haven't allocated a TLS segment.

This patch fixes the problem by removing an exclusion where common
symbols would not override the placeholder symbols, but checking to
see if the size needs adjusting (the original reason for the exclusion).
Furthermore, we need to avoid putting placeholder symbols in the common
list, and wait until we see a real common symbol with a type we can
trust.

gold/
	PR gold/17432
	* resolve.cc (Symbol_table::resolve): Override common placeholder
	symbols, but adjust sizes.
	* symtab.cc (Symbol_table::add_from_object): Don't add placeholder
	symbols to common lists.
Don't prune program spaces when doing "maintenance info program-spaces"

Remove the pruning of program spaces in print_program_space to remove
unwanted side-effects. "info" commands and print routines should
generally not change the state of the debugger.

gdb/Changelog:

	* progspace.c (print_program_space): Don't prune program spaces
	before printing them.
Fix handling of relocations against TLS section symbols.

Gold doesn't handle relocations against the section symbol for a TLS
section correctly. Instead of using the offset of the section relative
to the TLS segment, it uses the address of the actual section.  This
patch checks for section symbols for TLS sections, and treats them
the same as TLS symbols.

gold/
	PR gold/16773
	* object.cc (Sized_relobj_file): Compute value of section symbols
	for TLS sections the same as TLS symbols.
daily update