Skip tests on completion and readline when readline lib isn't used

The completion feature and other features on readline depend on the
readline library.  However, readline library is not always used, for
example, running testsuite like

  make check RUNTESTFLAGS="--host_board=local-remote-host"

the input stream is not a tty, and GDB doesn't use readline library
as a result.

This patch is to skip tests on completion and readline if
'show editing' is off, which means readline isn't used.  Note that
some tests in gdb.base/completion.exp test command complete, which
isn't related to readline, so these tests aren't affected by readline
library.  This patch also moves these tests up, run them
unconditionally, and run the rest if readline library is used.

gdb/testsuite:

2014-03-26  Yao Qi  <yao@codesourcery.com>

	* lib/gdb.exp (readline_is_used): New proc.
	* gdb.base/completion.exp: Move tests on command complete up.
	Skip the rest of tests if readline is not used.
	* gdb.ada/complete.exp: Skp the test if readline is not
	used.
	* gdb.base/filesym.exp: Likewise.
	* gdb.base/macscp.exp: Likewise.
	* gdb.base/readline-ask.exp: Likewise.
	* gdb.base/readline.exp: Likewise.
	* gdb.python/py-cmd.exp: Likewise.
	* gdb.trace/tfile.exp: Likewise.
Referencing a function's address on PowerPC64 ELFv2

ELFv2 needs to create plt entries in a non-PIC executable for an
address reference to a function defined in a shared object.  It's
possible that an object file has no features that distinguish it as
ELFv1 or ELFv2, eg. an object only containing data.  Such files need
to be handled like those that are known to be ELFv2.
However, this unnecessarily creates plt entries for the analogous
ELFv1 case, so arrange to set output abi version earlier, and use the
output abi version to further distinguish ambiguous input files.

bfd/
	* elf64-ppc.c (ppc64_elf_check_relocs): Account for possibly
	needed plt entries when taking the address of functions for
	abiversion == 0 (ie. unknown) as well as abiversion == 2.
	Move opd setup and abiversion checks to..
	(ppc64_elf_before_check_relocs): ..here.  Renamed from
	ppc64_elf_process_dot_syms.  Set output abiversion from input and
	input abiversion from output, if either is not set.
	(ppc64_elf_merge_private_bfd_data): Don't merge flags here.
	(elf_backend_check_directives): Update.
ld/testsuite/
	* ld-powerpc/startv1.s, * ld-powerpc/startv2.s, * ld-powerpc/funref.s,
	* ld-powerpc/funv1.s, * ld-powerpc/funv2.s,
	* ld-powerpc/ambiguousv1.d, * ld-powerpc/ambiguousv2.d: New test files.
	* ld-powerpc/powerpc.exp: Run new tests.
Mach-O: Add BFD_MACH_O_CPU_TYPE_ARM64.

include/mach-o/
        * loader.h (bfd_mach_o_cpu_type): Add BFD_MACH_O_CPU_TYPE_ARM64.

bfd/
        * mach-o.c (bfd_mach_o_convert_architecture): Add
        BFD_MACH_O_CPU_TYPE_ARM64.

binutils/
        * od-macho.c (bfd_mach_o_cpu_name): Add BFD_MACH_O_CPU_TYPE_ARM64.
Remove VAR_DOMAIN/STRUCT_DOMAIN ambiguity from ada-tasks.c.

2014-03-26  Keith Seitz  <keiths@redhat.com>

	* ada-tasks.c (get_tcb_types_info): Search STRUCT_DOMAIN for
	types, not VAR_DOMAIN.