gdb.base/sym-file.exp: clean up test messages a bit.

Remove regex characters from test message, and don't refer to
breakpoint numbers in test messages (subsequent patches will add more
breakpoints, changing these numbers).  Result:

 -PASS: gdb.base/sym-file.exp: add-symbol-file .*sym-file-lib\.so addr
 +PASS: gdb.base/sym-file.exp: add-symbol-file sym-file-lib.so addr

 -PASS: gdb.base/sym-file.exp: check if Breakpoint 2 is pending.
 -PASS: gdb.base/sym-file.exp: check if Breakpoint 3 is pending.
 +PASS: gdb.base/sym-file.exp: breakpoint at foo is pending
 +PASS: gdb.base/sym-file.exp: breakpoint at bar is pending

gdb/testsuite/
2014-04-15  Pedro Alves <palves@redhat.com>

	* gdb.base/sym-file.exp: Remove regex characters from test
	message.  Don't refer to breakpoint numbers in test messages.
Make sym-file.exp work with remote targets and hosts.

The main issue here is that this test passes the host's absolute path
to the library to load to the "dlopen"-like routine, which doesn't
work when either the target or the host are remote, unless a shared
filesystem has been set up.

Tests that dynamically load a library solve this by dlopen'ing by
basename, and setting rpath to $ORIGIN.  See gdb_compile.

This test doesn't use dlopen, but instead uses its own simple elf
loader.  The fix is to pass this loader the library basename, and
teach it to look up the library by basename in the executable's
directory as well, i.e., assuming/emulating RPATH=$ORIGIN.

Tested on x86_64 Fedora 17, native and gdbserver.

I looked around in the web to figure out Linux's /proc/self/exe
equivalents in other ELF OSs.  I think I covered all relevant, but if
not, I think it'll be simple enough to add more.  (Note the test is
skipped on non-ELF targets.)

Tested on x86_64 Fedora 17, native and gdbserver.

gdb/testsuite/
2014-04-15  Pedro Alves  <palves@redhat.com>

	* gdb.base/sym-file-loader.c: Include <limits.h>.
	(SELF_LINK): New define.
	(get_origin): New function.
	(load_shlib): Use it.
	* gdb.base/sym-file.exp: Don't early return if the target is
	remote.  Use runto_main, and issue fail is that fails.  Use
	gdb_load_shlibs.
	(shlib_name): Delete.
	(lib_so, lib_syms, lib_dlopen): New globals.  Use them throughout.
gdb.base/sym-file-loader.c: Fix typo.

SELF_LINK, not SELK_LINK...

gdb/testsuite/
2014-04-15  Pedro Alves  <palves@redhat.com>

	* gdb.base/sym-file-loader.c: Fix typo.  SELF_LINK, not SELK_LINK.
gdb.base/sym-file.exp, hide guts of the custom loader.

This test uses a simple custom elf loader, implemented in
gdb.base/sym-file-loader.h|c.  This loader doesn't have a dlclose-like
function today, but I'll need one.  But, I found that the guts of the
loader are exposed too much to the client, making the interface more
complicated than necessary.  It's simpler if the loader just exports a
few dlopen/dlsym -style functions.  That's what this patch does.

Tested on x86_86 Fedora 17, native and gdbserver.

gdb/testsuite/
2014-04-15  Pedro Alves  <palves@redhat.com>

	* gdb.base/sym-file-loader.h: Move inclusion of <inttypes.h>,
	<ansidecl.h>, <elf/common.h> and <elf/external.h> to
	sym-file-loader.c.
	(Elf_External_Phdr, Elf_External_Ehdr, Elf_External_Shdr)
	(Elf_External_Sym, Elf_Addr, GET, GETADDR, struct segment): Move
	to sym-file-loader.c.
	(struct library): Forward declare.
	(load_shlib, lookup_function): Change prototypes.
	(find_shstrtab, find_strtab, find_shdr, find_symtab)
	(translate_offset): Remove declarations.
	(get_text_addr): New declaration.
	* gdb.base/sym-file-loader.c: Move inclusion of <inttypes.h>,
	<ansidecl.h>, <elf/common.h> and <elf/external.h> here from
	sym-file-loader.h.
	(Elf_External_Phdr, Elf_External_Ehdr, Elf_External_Shdr)
	(Elf_External_Sym, Elf_Addr, GET, GETADDR, struct segment): Move
	here from sym-file-loader.h.
	(struct library): New structure.
	(load_shlib, lookup_function): Change prototypes and adjust to
	work with a struct library.
	(find_shstrtab, find_strtab, find_shdr, find_symtab)
	(translate_offset): Make static.
	(get_text_addr): New function.
	* gdb.base/sym-file-main.c (main): Adjust to new loader interface.
[AArch64] Fix off by one error in instruction relaxation mask.

The AArch64 TLSDESC to IE relaxation code uses a bit mask intended to
ensure that destination register in a relaxed ldr instruction is
always X0.  The mask has an off by one error resulting in the most
significant bit of the destination register being retained in the
relaxed instruction.  The issue generally appears when the compiler
emits TLS accesses code under high register pressure resulting in a
broken code sequence.
Test suite cleanup.

2014-04-15  Keith Seitz  <keiths@redhat.com>

	* gdb.mi/mi-break.exp (test_tbreak_creation_and_listing): Remove
	unused globals.
	(test_rbreak_creation_and_listing): Likewise.
	(test_ignore_count): Likewise.
	(test_error): Likewise.
Allow target to derive from Copy_relocs class.

2014-04-15  Sasa Stankovic  <Sasa.Stankovic@imgtec.com>

gold/
	* copy-relocs.cc (Copy_relocs::Copy_reloc_entry::emit): Remove and
	inline into ...
	(Copy_relocs::emit): ... here.
	* copy-relocs.h (Copy_reloc_entry): Change from class to struct.
	(Copy_reloc_entry::make_copy_reloc): Change from private to protected.
	(Copy_reloc_entry::entries_): Change from private to protected.
Allow target to decide whether to include a section.

2014-04-15  Sasa Stankovic  <Sasa.Stankovic@imgtec.com>

gold/
	* layout.cc (Layout::include_section): Allow a target to decide
	whether to include a section.
	* target.h (Target::should_include_section): New function.
	(Target::do_should_include_section): New function.
Remove unused globals in mi-simplerun.exp.

2014-04-15  Keith Seitz  <keiths@redhat.com>

	* gdb.mi/mi-simplerun.exp (test_breakpoints_creation_and_listing):
	Remove unused globals.
	(test_running_the_program): Likewise.
	(test_controlled_execution): Likewise.
	(test_controlling_breakpoints): Likewise.
	(test_program_termination): Likewise.
2014-04-15  Sasa Stankovic  <Sasa.Stankovic@imgtec.com>

elfcpp/
	* mips.h (R _MIPS16_TLS_GD, R_MIPS16_TLS_LDM, R_MIPS16_TLS_DTPREL_HI16,
	R_MIPS16_TLS_DTPREL_LO16, R_MIPS16_TLS_GOTTPREL,
	R_MIPS16_TLS_TPREL_HI16, R_MIPS16_TLS_TPREL_LO16, R_MICROMIPS_26_S1,
	R_MICROMIPS_HI16, R_MICROMIPS_LO16, R_MICROMIPS_GPREL16,
	R_MICROMIPS_LITERAL, R_MICROMIPS_GOT16, R_MICROMIPS_PC7_S1,
	R_MICROMIPS_PC10_S1, R_MICROMIPS_PC16_S1, R_MICROMIPS_CALL16,
	R_MICROMIPS_GOT_DISP, R_MICROMIPS_GOT_PAGE, R_MICROMIPS_GOT_OFST,
	R_MICROMIPS_GOT_HI16, R_MICROMIPS_GOT_LO16, R_MICROMIPS_SUB,
	R_MICROMIPS_HIGHER, R_MICROMIPS_HIGHEST, R_MICROMIPS_CALL_HI16,
	R_MICROMIPS_CALL_LO16, R_MICROMIPS_SCN_DISP, R_MICROMIPS_JALR,
	R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
	R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
	R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
	R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2,
	R_MICROMIPS_PC23_S20, R_MIPS_EH): New enums for relocations (mips16 and
	micromips).
	(STO_MIPS_FLAGS): New enum constant.
	(elf_st_is_mips16): New function.
	(elf_st_is_micromips): New function.
	(is_micromips): New function.
	(abi_n32): New function.
	(abi_n64): New function.
	(ODK_NULL, ODK_REGINFO, ODK_EXCEPTIONS, ODK_PAD, ODK_HWPATCH, ODK_FILL,
	ODK_TAGS, ODK_HWAND, ODK_HWOR, ODK_GP_GROUP, ODK_IDENT): New enum
	constants.
	* elfcpp.h (SHT_MIPS_OPTIONS): New enum constant.
	* gdb.gdb/selftest.exp (do_steps_and_nexts): Don't reference
	uninitialized value of "description".
daily update