revert handling relocations

Merged from old split binutils repository commit
5d1419d9f53a7ce2a825a0a30ac79d584b3c3b75.
Change handling of TLS_LE_S9, TLS_LE_32 relocations.

Commit d743e6ef7aeb99ccf75c9b533b2c401f20e4fc2c from the old split
binutils repository moved into the new repository.

bfd/ChangeLog:
            * elf32-arc.c (arc_plugin_one_reloc) <R_ARC_TLS_LE_32>: Use value of
            insn.

gas/ChangeLog:
            * config/tc-arc.c (md_apply_fix) <BFD_RELOC_ARC_TLS_LE_32>:
            Handle like BFD_RELOC_ARC_TLS_DTPOFF.
            <BFD_RELOC_ARC_TLS_LE_S9>: Handle like BFD_RELOC_ARC_TLS_DTPOFF_S9.
Fix locally resolved R_ARC_GOTPC32.

Cherry pick 25bcc6b6fd9997567b9458915a036f723b825e0e from branch
joern-arc2.23-tls.

bfd/Changelog.ARC:

        * elf32-arc.c (elf_arc_relocate_section): Calculate relocation for
	locally resolved R_ARC_GOTPC32.
Verify that we are changing a load.

Cherry pick commit 23351d963cd2494469950baa5fcf36f35c582ab2 from branch
joern-arc2.23-tls.

bfd/ChangeLog.ARC:

	* elf32-arc.c (arc_tls_transition) <R_ARC_TLS_IE_GOT -> GOT_TLS_LE>:
	Verify that we are changing a load.
Add test for R_ARC_GOTPC32 relocation.

Test the ability to resolve R_ARC_GOTPC32 relocations when we are also
linking in a shared library.  Added two tests, but they deliberately
share a single source file, the linker script places the output sections
in a different order.

ChangeLog:

	* ld/testsuite/ld-arc/arc.exp: New file.
	* ld/testsuite/ld-arc/dummy-lib.s: New file.
	* ld/testsuite/ld-arc/gotpc1.d: New file.
	* ld/testsuite/ld-arc/gotpc1.ld: New file.
	* ld/testsuite/ld-arc/gotpc1.s: New file.
	* ld/testsuite/ld-arc/gotpc2.d: New file.
	* ld/testsuite/ld-arc/gotpc2.ld: New file.
Merge pull request #1 from T-J-Teru/aburgess-arc-2.23-tls

Proposed fix for R_ARC_GOTPC32 issue.