Merge pull request #1 from T-J-Teru/aburgess-arc-2.23-tls

Proposed fix for R_ARC_GOTPC32 issue.
Handle R_ARC_TLD_DTPOFF(_S9)? when there's no tls sections.

DON'T UPSTREAM THIS COMMIT.

This patch adds a check for the case where a relocation of type
R_ARC_TLD_DTPOFF or R_ARC_TLD_DTPOFF_S9 is found and there is no tls
section in the file being linked.

I don't think this patch is actually required, and is only being pushed
for testing purposes.

bfd/ChangeLog:

	* elf32-arc.c (elf_arc_relocate_section): Possible fix for
	R_ARC_TLS_DTPOFF and R_ARC_TLS_DTPOFF_S9 relocations, if there are
	no TLS sections in the linked object.  I am not sure this fix is
	correct.  I don't think it's wrong, just that it is masking
	possible real errors.
Add setting and checking of non_got_ref flag.

Make use of the non_got_ref as other targets do.

bfd/ChangeLog:

	* elf32-arc.c (elf_arc_check_relocs): Set non_got_ref when
	appropriate.
	(elf_arc_adjust_dynamic_symbol): Check non_got_ref when
	appropriate.