Fixes a few more memory access violations exposed by fuzzed binaries.

	PR binutils/17512
	* ecoff.c (_bfd_ecoff_slurp_symbol_table): Warn about and correct
	a discrepancy between the isymMax and ifdMax values in the
	symbolic header.
	* elf.c (_bfd_elf_print_private_bfd_data): Fix the range check
	scanning the external dynamic entries.
Fix test always passing in python/py-linetable.exp

The following test is found in python/py-linetable.exp:

gdb_test "python print sorted(fset)" \
    "\[20L, 21L, 22L, 24L, 25L, 28L, 29L, 30L, 32L, 33L, 37L, 39L, 40L, 42L, 44L, 45L, 46L\].*" \
    "Test frozen set contains line numbers"

I noticed that it passed when using Python 3, even though it should fail
because of the missing parentheses for the call print.

There needs to be more escaping of the square brackets. Currently, it is
interpreted as "any one character from this big list of characters,
followed by .*". When adding the required amount of backslashes, the
test starts failing as it should.

Moreover, both in Python 2.7 and Python 3.3 the numbers don't have the L
suffix, so now the test fails because of that. Anybody knows why they
were there in the first place? I just tested with Python 2.4 and there
are no Ls.

gdb/testsuite/ChangeLog:

	* gdb.python/py-linetable.exp: Escape properly sorted(fset)
	test expected output.  Add parentheses for the call to print.
	Remove L suffix from integers.

Signed-off-by: Simon Marchi <simon.marchi@ericsson.com>
Update mips tests with symbol version string

	* ld-mips-elf/got-vers-1.rd: Add symbol version string to
	versioned symbol names in dynamic relocation.
	* ld-mips-elf/reloc-estimate-1.d: Likewise.
	* ld-mips-elf/tlsdyn-o32-1.got: Likewise.
	* ld-mips-elf/tlsdyn-o32-2.got: Likewise.
	* ld-mips-elf/tlsdyn-o32-3.got: Likewise.
	* ld-mips-elf/tlslib-o32-ver.got: Likewise.
Fixes an infinite loop in readelf parsing a corrupt binary, and other minor corrections.

	PR binutils/17531
	* readelf.c (get_data): Move excessive length check to earlier on
	in the function and allow for wraparound in the arithmetic.
	(get_32bit_elf_symbols): Terminate early if the section size is
	zero.  Check for an invalid sh_entsize.  Check for an index
	section with an invalid size.
	(get_64bit_elf_symbols): Likewise.
	(process_section_groups): Check for an invalid sh_entsize.
Automatic date update in version.in