Fix build/17104

This patch is to fix the build error when GDB is configured as:

  CFLAGS=-Wall ./configure --with-babeltrace; make

This patch adds one line of code in configure test to use local
variable 'pos'.

Note that we append -Werror to CFLAGS to catch the warning related to
assignment to scope.  See more in this thread
https://sourceware.org/ml/gdb-patches/2014-08/msg00045.html

2014-08-13  Yao Qi  <yao@codesourcery.com>

	PR build/17104
	* configure.ac: Use local variable 'pos'.
	* configure: Regenerated.
This is necessary for adding __cxa_atexit support for Cygwin in GCC without
exporting __dso_handle from every DLL.

	* pe-dll.c (autofilter_entry_type autofilter_symbollist_i386): Add
	__dso_handle.
opcodes: blackfin: handle memory read errors

The current code ignores memory read errors which isn't a great idea.
So add a helper function which takes care of error checking and update
the code to use that.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
opcodes: blackfin: do not force align the PC

If the user gives us an unaligned PC, then dump an error as such.
Otherwise if you try to disassemble at an odd address, the output
will look weird (it'll read one byte earlier).

This can be seen in one of the gas tests where data is in the middle
of .text, so move the data to .data like it should be in the first place.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
opcodes: blackfin: push down global state

The variables used to track insn state should be pushed down into the
private_data structure to avoid pollution across calls.

This also happens to fix the output when hitting comments/invalid insns
which needs to tweak a gas test.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
bfd: or1k: avoid emitting R_OR1K_INSN_REL_26 in shared libs

This fixes a bug where R_OR1K_INSN_REL_26 relocations would be emitted
into shared libraries even when the referenced symbol was hidden
or the symbol was contained in the same .so which had been
linked with -Bsymbolic.

bfd/
	* elf32-or1k.c (or1k_elf_relocate_section, or1k_elf_check_relocs,
	allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL
	and SYMBOLIC_BIND.
daily update
Add option -no-pie.
Simplify is_ir_dummy_bfd test

is_ir_dummy_bfd started life before BFD_PLUGIN was invented.

	* plugin.c (is_ir_dummy_bfd): Test BFD_PLUGIN flag rather than
	flags.claimed.
configury changes to make ld plugin support controlled by --enable-plugins

This also makes --enable-plugins default to on for hosts that can
support plugins, so we have consistent lto toolchain support.  The
ACX_LARGEFILE moves aren't strictly necessary, but are harmless and
will be necessary if plugin support is extended to more hosts via
libtool's dlopen support.  I started down that path then decided it
was more work than I was interested in doing.  (ACX_LARGEFILE invokes
AC_PLUGINS.)

config/
	* plugins.m4: Test for dlfcn.h or windows.h here to set default
	for --enable-plugins.  Report error if someone tries to enable
	plugins on a host we don't support.
bfd/
	* configure.ac: Delete redundant plugin related checks.
	* configure: Regenerate.
binutils/
	* configure.ac: Move ACX_LARGEFILE after LT_INIT.
	* config.in: Regenerate.
	* configure: Regenerate.
gas/
	* configure.ac: Move ACX_LARGEFILE after LT_INIT.
	* config.in: Regenerate.
	* configure: Regenerate.
gprof/
	* configure.ac: Move ACX_LARGEFILE after LT_INIT.
	* configure: Regenerate.
	* gconfig.in: Regenerate.
ld/
	* configure.ac: Move AC_PROG_CC and other macros earlier.  Delete
	plugin checks now done in config/plugins.m4.
	* config.in: Regenerate.
	* configure: Regenerate.
Linker part of PR16563 fix

Presents .eh_frame input sections to the optimisation machinery in
elf-eh-frame.c in the order they are given by the linker script.

	PR 16563
bfd/
	* elflink.c (bfd_elf_discard_info): Process .eh_frame and .stab
	in the order they are mapped to output sections.
ld/
	* ldlang.c (map_head_is_link_order): Rename from
	stripped_excluded_sections.
	(lang_clear_os_map): New function, extracted from..
	(strip_excluded_output_sections): ..here.
	* ldlang.h (lang_clear_os_map): Declare.
	* ldwrite.c (ldwrite): Call lang_clear_os_map.
	* emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_after_allocation):
	Likewise.