Default powerpc64 to --plt-thread-safe for Go

Go is multi-threaded, so use thread-safe plt stubs.  __go_go doesn't
actually start threads, but is a convenient libgo function with a
reasonably unique name that is called by all Go executables.  (Threads
are started by a static function of libgo, runtime_newosproc, called
by a whole lot of global functions, including runtime_starttheworld
and runtime_main.)

bfd/
	* elf64-ppc.c (ppc64_elf_size_stubs): Add __go_go to thread_starters.
gold/
	* powerpc.cc (Target_powerpc::do_relax): Add __go_go to thread_starters.
Automatic date update in version.in
Enable to link ARM object file that hasn't attribute section.

bfd/ChangeLog

2014-11-20  Terry Guo  <terry.guo@arm.com>

	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Skip if input bfd
	hasn't attribute section.

ld/testsuite/ChangeLog:

2014-11-20  Terry Guo  <terry.guo@arm.com>

	* ld-arm/attr-merge-nosection-1.d: New file.
	* ld-arm/attr-merge-nosection-1a.s: Likewise.
	* ld-arm/attr-merge-nosection-1b.s: Likewise.
	* ld-arm/arm-elf.exp: Include the new test.
[Ada] XA type is not redundant if the ranges' subtypes do not match

Jan noticed that gdb.ada/arrayidx.exp regressed after I applied
the following patch:

    commit 8908fca5772fcff9f7766158ba2aa59f5a2b1f68
    Author: Joel Brobecker <brobecker@adacore.com>
    Date:   Sat Sep 27 09:09:34 2014 -0700
    Subject: [Ada] Ignore __XA types when redundant.

What happens is that we're trying to print the value of
r_two_three, which is defined as follow:

   type Index is (One, Two, Three);
   type RTable is array (Index range Two .. Three) of Integer;
   R_Two_Three : RTable := (2, 3);

The expected output is:

    (gdb) p r_two_three
    $1 = (two => 2, 3)

But after the patch above was applied, with the program program
compiled using gcc-gnat-4.9.2-1.fc21.x86_64 (x86_64-linux),
the output becomes:

    (gdb) p r_two_three
    $1 = (2, 3)

(the name of the first bound is missing). The problem comes from
the fact that the compiler described the array's index type as
a plain base type, instead of as a subrange of the enumerated type.
More particularly, this is what gcc-gnat-4.9.2-1.fc21.x86_64
generated:

 <3><7ce>: Abbrev Number: 9 (DW_TAG_array_type)
    <7cf>   DW_AT_name        : (indirect string, offset: 0xc13): p__rtable
    [...]
    <7d7>   DW_AT_GNAT_descriptive_type: <0x98a>
    [...]
 <4><7df>: Abbrev Number: 8 (DW_TAG_subrange_type)
    <7e0>   DW_AT_type        : <0xa79>

where DIE 0xa79 is:

 <1><a79>: Abbrev Number: 2 (DW_TAG_base_type)
    <a7a>   DW_AT_byte_size   : 8
    <a7b>   DW_AT_encoding    : 7       (unsigned)
    <a7c>   DW_AT_name        : (indirect string, offset: 0xfc): sizetype

The actual array subrange type can be found in the array's
parallel XA type (the DW_AT_GNAT_descriptive_type).

The recent commit correctly found that that bounds taken from
the descriptive type are the same as bounds of our array's index
type. But it failed to notice that ignoring this descriptive
type would make us lose the actual array index type, making us
think that we're printing an array indexed by integers.

I hadn't seen that problem, because the compiler I used produced
debugging info where the array's index type is correctly described:

 <3><79f>: Abbrev Number: 10 (DW_TAG_array_type)
    <7a0>   DW_AT_name        : (indirect string, offset: 0xb3d): p__rtable
    [...]
 <4><7b0>: Abbrev Number: 8 (DW_TAG_subrange_type)
    <7b1>   DW_AT_type        : <0x9b2>
    <7b5>   DW_AT_upper_bound : 2

... where DIE 0x9b2 leads us to ...

 <3><9b2>: Abbrev Number: 9 (DW_TAG_subrange_type)
    [...]
    <9b8>   DW_AT_type        : <0x962>

 <2><962>: Abbrev Number: 22 (DW_TAG_enumeration_type)
    <963>   DW_AT_name        : (indirect string, offset: 0xb34): p__index
    [...]

This patch fixes the issue by also making sure that the subtype
of the original range type does match the subtype found in the
descriptive type.

gdb/ChangeLog:

        * ada-lang.c (ada_is_redundant_range_encoding): Return 0
        if the TYPE_CODE of range_type's base type does not match
        the TYPE_CODE of encoding_type's base type.
ppc476 workaround sizing

	* elf32-ppc.c (ppc_elf_relax_section): Correct ppc476 workaround
	alignment calculation.
PPC gold doesn't check for overflow properly

Corrects overflow test for rel14, addr14, rel24, addr24 branch relocs,
and prints an information message to give a hint as to how a branch
that can't reach a stub might be cured.

bfd/
	* elf64-ppc.c (group_sections): Init stub14_group_size from
	--stub-group-size parameter divided by 1024.
gold/
	* powerpc.cc (Stub_control::Stub_control): Init stub14_group_size_
	from --stub-group-size parameter divided by 1024.
	(Powerpc_relocate_functions::rela, rela_ua): Add fieldsize
	template parameter.  Update all uses.
	(Target_powerpc::Relocate::relocate): Rename has_plt_value to
	has_stub_value.  Set for long branches.  Don't report overflow for
	branch to undefined weak symbols.  Print info message on
	overflowing branch to stub.
[AArch64] Fix mis-detection of unpredictable load/store operations with FP regs.

	* config/tc-aarch64.c (warn_unpredictable_ldst): Check that transfer
	registers are in the GP register set.  Adjust warnings.  Use correct
	field member for address register.
	* testsuite/gas/aarch64/diagnostic.l: Update.
Split struct symtab into two: struct symtab and compunit_symtab.

Currently "symtabs" in gdb are stored as a single linked list of
struct symtab that contains both symbol symtabs (the blockvectors)
and file symtabs (the linetables).

This has led to confusion, bugs, and performance issues.

This patch is conceptually very simple: split struct symtab into
two pieces: one part containing things common across the entire
compilation unit, and one part containing things specific to each
source file.

Example.
For the case of a program built out of these files:

foo.c
  foo1.h
  foo2.h
bar.c
  foo1.h
  bar.h

Today we have a single list of struct symtabs:

objfile -> foo.c -> foo1.h -> foo2.h -> bar.c -> foo1.h -> bar.h -> NULL

where "->" means the "next" pointer in struct symtab.

With this patch, that turns into:

objfile -> foo.c(cu) -> bar.c(cu) -> NULL
            |            |
            v            v
           foo.c        bar.c
            |            |
            v            v
           foo1.h       foo1.h
            |            |
            v            v
           foo2.h       bar.h
            |            |
            v            v
           NULL         NULL

where "foo.c(cu)" and "bar.c(cu)" are struct compunit_symtab objects,
and the files foo.c, etc. are struct symtab objects.

So now, for example, when we want to iterate over all blockvectors
we can now just iterate over the compunit_symtab list.

Plus a lot of the data that was either unused or replicated for each
symtab in a compilation unit now lives in struct compunit_symtab.
E.g., the objfile pointer, the producer string, etc.
I thought of moving "language" out of struct symtab but there is
logic to try to compute the language based on previously seen files,
and I think that's best left as is for now.
With my standard monster benchmark with -readnow (which I can't actually
do, but based on my calculations), whereas today the list requires
77MB to store all the struct symtabs, it now only requires 37MB.
A modest space savings given the gigabytes needed for all the debug info,
etc.  Still, it's nice.  Plus, whereas today we create a copy of dirname
for each source file symtab in a compilation unit, we now only create one
for the compunit.

So this patch is basically just a data structure reorg,
I don't expect significant performance improvements from it.

Notes:

1) A followup patch can do a similar split for struct partial_symtab.
I have left that until after I get the changes I want in to
better utilize .gdb_index (it may affect how we do partial syms).

2) Another followup patch *could* rename struct symtab.
The term "symtab" is ambiguous and has been a source of confusion.
In this patch I'm leaving it alone, calling it the "historical" name
of "filetabs", which is what they are now: just the file-name + line-table.

gdb/ChangeLog:

	Split struct symtab into two: struct symtab and compunit_symtab.
	* amd64-tdep.c (amd64_skip_xmm_prologue): Fetch producer from compunit.
	* block.c (blockvector_for_pc_sect): Change "struct symtab *" argument
	to "struct compunit_symtab *".  All callers updated.
	(set_block_compunit_symtab): Renamed from set_block_symtab.  Change
	"struct symtab *" argument to "struct compunit_symtab *".
	All callers updated.
	(get_block_compunit_symtab): Renamed from get_block_symtab.  Change
	result to "struct compunit_symtab *".  All callers updated.
	(find_iterator_compunit_symtab): Renamed from find_iterator_symtab.
	Change result to "struct compunit_symtab *".  All callers updated.
	* block.h (struct global_block) <compunit_symtab>: Renamed from symtab.
	hange type to "struct compunit_symtab *".  All uses updated.
	(struct block_iterator) <d.compunit_symtab>: Renamed from "d.symtab".
	Change type to "struct compunit_symtab *".  All uses updated.
	* buildsym.c (struct buildsym_compunit): New struct.
	(subfiles, buildsym_compdir, buildsym_objfile, main_subfile): Delete.
	(buildsym_compunit): New static global.
	(finish_block_internal): Update to fetch objfile from
	buildsym_compunit.
	(make_blockvector): Delete objfile argument.
	(start_subfile): Rewrite to use buildsym_compunit.  Don't initialize
	debugformat, producer.
	(start_buildsym_compunit): New function.
	(free_buildsym_compunit): Renamed from free_subfiles_list.
	All callers updated.
	(patch_subfile_names): Rewrite to use buildsym_compunit.
	(get_compunit_symtab): New function.
	(get_macro_table): Delete argument comp_dir.  All callers updated.
	(start_symtab): Change result to "struct compunit_symtab *".
	All callers updated.  Create the subfile of the main source file.
	(watch_main_source_file_lossage): Rewrite to use buildsym_compunit.
	(reset_symtab_globals): Update.
	(end_symtab_get_static_block): Update to use buildsym_compunit.
	(end_symtab_without_blockvector): Rewrite.
	(end_symtab_with_blockvector): Change result to
	"struct compunit_symtab *".  All callers updated.
	Update to use buildsym_compunit.  Don't set symtab->dirname,
	instead set it in the compunit.
	Explicitly make sure main symtab is first in its list.
	Set debugformat, producer, blockvector, block_line_section, and
	macrotable in the compunit.
	(end_symtab_from_static_block): Change result to
	"struct compunit_symtab *".  All callers updated.
	(end_symtab, end_expandable_symtab): Ditto.
	(set_missing_symtab): Change symtab argument to
	"struct compunit_symtab *".  All callers updated.
	(augment_type_symtab): Ditto.
	(record_debugformat): Update to use buildsym_compunit.
	(record_producer): Update to use buildsym_compunit.
	* buildsym.h (struct subfile) <dirname>: Delete.
	<producer, debugformat>: Delete.
	<buildsym_compunit>: New member.
	(get_compunit_symtab): Declare.
	* dwarf2read.c (struct type_unit_group) <compunit_symtab>: Renamed
	from primary_symtab.  Change type to "struct compunit_symtab *".
	All uses updated.
	(dwarf2_start_symtab): Change result to "struct compunit_symtab *".
	All callers updated.
	(dwarf_decode_macros): Delete comp_dir argument.  All callers updated.
	(struct dwarf2_per_cu_quick_data) <compunit_symtab>: Renamed from
	symtab.  Change type to "struct compunit_symtab *".  All uses updated.
	(dw2_instantiate_symtab): Change result to "struct compunit_symtab *".
	All callers updated.
	(dw2_find_last_source_symtab): Ditto.
	(dw2_lookup_symbol): Ditto.
	(recursively_find_pc_sect_compunit_symtab): Renamed from
	recursively_find_pc_sect_symtab.  Change result to
	"struct compunit_symtab *".  All callers updated.
	(dw2_find_pc_sect_compunit_symtab): Renamed from
	dw2_find_pc_sect_symtab.  Change result to
	"struct compunit_symtab *".  All callers updated.
	(get_compunit_symtab): Renamed from get_symtab.  Change result to
	"struct compunit_symtab *".  All callers updated.
	(recursively_compute_inclusions): Change type of immediate_parent
	argument to "struct compunit_symtab *".  All callers updated.
	(compute_compunit_symtab_includes): Renamed from
	compute_symtab_includes.  All callers updated.  Rewrite to compute
	includes of compunit_symtabs and not symtabs.
	(process_full_comp_unit): Update to work with struct compunit_symtab.
	(process_full_type_unit): Ditto.
	(dwarf_decode_lines_1): Delete argument comp_dir.  All callers updated.
	(dwarf_decode_lines): Remove special case handling of main subfile.
	(macro_start_file): Delete argument comp_dir.  All callers updated.
	(dwarf_decode_macro_bytes): Ditto.
	* guile/scm-block.c (bkscm_print_block_syms_progress_smob): Update to
	use struct compunit_symtab.
	* i386-tdep.c (i386_skip_prologue): Fetch producer from compunit.
	* jit.c (finalize_symtab): Build compunit_symtab.
	* jv-lang.c (get_java_class_symtab): Change result to
	"struct compunit_symtab *".  All callers updated.
	* macroscope.c (sal_macro_scope): Fetch macro table from compunit.
	* macrotab.c (struct macro_table) <compunit_symtab>: Renamed from
	comp_dir.  Change type to "struct compunit_symtab *".
	All uses updated.
	(new_macro_table): Change comp_dir argument to cust,
	"struct compunit_symtab *".  All callers updated.
	* maint.c (struct cmd_stats) <nr_compunit_symtabs>: Renamed from
	nr_primary_symtabs.  All uses updated.
	(count_symtabs_and_blocks): Update to handle compunits.
	(report_command_stats): Update output, "primary symtabs" renamed to
	"compunits".
	* mdebugread.c (new_symtab): Change result to
	"struct compunit_symtab *".  All callers updated.
	(parse_procedure): Change type of search_symtab argument to
	"struct compunit_symtab *".  All callers updated.
	* objfiles.c (objfile_relocate1): Loop over blockvectors in a
	separate loop.
	* objfiles.h (struct objfile) <compunit_symtabs>: Renamed from
	symtabs.  Change type to "struct compunit_symtab *".  All uses updated.
	(ALL_OBJFILE_FILETABS): Renamed from ALL_OBJFILE_SYMTABS.
	All uses updated.
	(ALL_OBJFILE_COMPUNITS): Renamed from ALL_OBJFILE_PRIMARY_SYMTABS.
	All uses updated.
	(ALL_FILETABS): Renamed from ALL_SYMTABS.  All uses updated.
	(ALL_COMPUNITS): Renamed from ALL_PRIMARY_SYMTABS.  All uses updated.
	* psympriv.h (struct partial_symtab) <compunit_symtab>: Renamed from
	symtab.  Change type to "struct compunit_symtab *".  All uses updated.
	* psymtab.c (psymtab_to_symtab): Change result type to
	"struct compunit_symtab *".  All callers updated.
	(find_pc_sect_compunit_symtab_from_partial): Renamed from
	find_pc_sect_symtab_from_partial.  Change result type to
	"struct compunit_symtab *".  All callers updated.
	(lookup_symbol_aux_psymtabs): Change result type to
	"struct compunit_symtab *".  All callers updated.
	(find_last_source_symtab_from_partial): Ditto.
	* python/py-symtab.c (stpy_get_producer): Fetch producer from compunit.
	* source.c (forget_cached_source_info_for_objfile): Fetch debugformat
	and macro_table from compunit.
	* symfile-debug.c (debug_qf_find_last_source_symtab): Change result
	type to "struct compunit_symtab *".  All callers updated.
	(debug_qf_lookup_symbol): Ditto.
	(debug_qf_find_pc_sect_compunit_symtab): Renamed from
	debug_qf_find_pc_sect_symtab, change result type to
	"struct compunit_symtab *".  All callers updated.
	* symfile.c (allocate_symtab): Delete objfile argument.
	New argument cust.
	(allocate_compunit_symtab): New function.
	(add_compunit_symtab_to_objfile): New function.
	* symfile.h (struct quick_symbol_functions) <lookup_symbol>:
	Change result type to "struct compunit_symtab *".  All uses updated.
	<find_pc_sect_compunit_symtab>: Renamed from find_pc_sect_symtab.
	Change result type to "struct compunit_symtab *".  All uses updated.
	* symmisc.c (print_objfile_statistics): Compute blockvector count in
	separate loop.
	(dump_symtab_1): Update test for primary source symtab.
	(maintenance_info_symtabs): Update to handle compunit symtabs.
	(maintenance_check_symtabs): Ditto.
	* symtab.c (set_primary_symtab): Delete.
	(compunit_primary_filetab): New function.
	(compunit_language): New function.
	(iterate_over_some_symtabs): Change type of arguments "first",
	"after_last" to "struct compunit_symtab *".  All callers updated.
	Update to loop over symtabs in each compunit.
	(error_in_psymtab_expansion): Rename symtab argument to cust,
	and change type to "struct compunit_symtab *".  All callers updated.
	(find_pc_sect_compunit_symtab): Renamed from find_pc_sect_symtab.
	Change result type to "struct compunit_symtab *".  All callers updated.
	(find_pc_compunit_symtab): Renamed from find_pc_symtab.
	Change result type to "struct compunit_symtab *".  All callers updated.
	(find_pc_sect_line): Only loop over symtabs within selected compunit
	instead of all symtabs in the objfile.
	* symtab.h (struct symtab) <blockvector>: Moved to compunit_symtab.
	<compunit_symtab> New member.
	<block_line_section>: Moved to compunit_symtab.
	<locations_valid>: Ditto.
	<epilogue_unwind_valid>: Ditto.
	<macro_table>: Ditto.
	<dirname>: Ditto.
	<debugformat>: Ditto.
	<producer>: Ditto.
	<objfile>: Ditto.
	<call_site_htab>: Ditto.
	<includes>: Ditto.
	<user>: Ditto.
	<primary>: Delete
	(SYMTAB_COMPUNIT): New macro.
	(SYMTAB_BLOCKVECTOR): Update definition.
	(SYMTAB_OBJFILE): Update definition.
	(SYMTAB_DIRNAME): Update definition.
	(struct compunit_symtab): New type.  Common members among all source
	symtabs within a compilation unit moved here.  All uses updated.
	(COMPUNIT_OBJFILE): New macro.
	(COMPUNIT_FILETABS): New macro.
	(COMPUNIT_DEBUGFORMAT): New macro.
	(COMPUNIT_PRODUCER): New macro.
	(COMPUNIT_DIRNAME): New macro.
	(COMPUNIT_BLOCKVECTOR): New macro.
	(COMPUNIT_BLOCK_LINE_SECTION): New macro.
	(COMPUNIT_LOCATIONS_VALID): New macro.
	(COMPUNIT_EPILOGUE_UNWIND_VALID): New macro.
	(COMPUNIT_CALL_SITE_HTAB): New macro.
	(COMPUNIT_MACRO_TABLE): New macro.
	(ALL_COMPUNIT_FILETABS): New macro.
	(compunit_symtab_ptr): New typedef.
	(DEF_VEC_P (compunit_symtab_ptr)): New vector type.

gdb/testsuite/ChangeLog:

	* gdb.base/maint.exp: Update expected output.
Run IFUNC run-time tests only if IFUNC is supported

	* lib/ld-lib.exp (check_ifunc_available): New.
	* ld-ifunc/ifunc.exp: Run IFUNC run-time tests only if IFUNC
	is supported.
* config/tc-arm.c (rotate_left): Avoid undefined behaviour when N = 0.
Partial fix for PR breakpoints/10737: Make syscall info be per-arch instead of global

This patch intends to partially fix PR breakpoints/10737, which is
about making the syscall information (for the "catch syscall" command)
be per-arch, instead of global.  This is not a full fix because of the
other issues pointed by Pedro here:

  <https://sourceware.org/bugzilla/show_bug.cgi?id=10737#c5>

However, I consider it a good step towards the real fix.  It will also
help me fix <https://sourceware.org/bugzilla/show_bug.cgi?id=17402>.

What this patch does, basically, is move the "syscalls_info"
struct to gdbarch.  Currently, the syscall information is stored in a
global variable inside gdb/xml-syscall.c, which means that there is no
easy way to correlate this info with the current target or
architecture being used, for example.  This causes strange behaviors,
because the syscall info is not re-read when the arch changes.  For
example, if you put a syscall catchpoint in syscall 5 on i386 (syscall
open), and then load a x86_64 program on GDB and put the same syscall
5 there (fstat on x86_64), you will still see that GDB tells you that
it is catching "open", even though it is not.  With this patch, GDB
correctly says that it will be catching fstat syscalls.

  (gdb) set architecture i386
  The target architecture is assumed to be i386
  (gdb) catch syscall 5
  Catchpoint 1 (syscall 'open' [5])
  (gdb) set architecture i386:x86-64
  The target architecture is assumed to be i386:x86-64
  (gdb) catch syscall 5
  Catchpoint 2 (syscall 'open' [5])

But with the patch:

  (gdb) set architecture i386
  The target architecture is assumed to be i386
  (gdb) catch syscall 5
  Catchpoint 1 (syscall 'open' [5])
  (gdb) set architecture i386:x86-64
  The target architecture is assumed to be i386:x86-64
  (gdb) catch syscall 5
  Catchpoint 2 (syscall 'fstat' [5])

As I said, there are still some problems on the "catch syscall"
mechanism, because (for example) the user should be able to "catch
syscall open" on i386, and then expect "open" to be caught also on
x86_64.  Currently, it doesn't work.  I intend to work on this later.

gdb/
2014-11-20  Sergio Durigan Junior  <sergiodj@redhat.com>

	PR breakpoints/10737
	* amd64-linux-tdep.c (amd64_linux_init_abi_common): Adjust call to
	set_xml_syscall_file_name to provide gdbarch.
	* arm-linux-tdep.c (arm_linux_init_abi): Likewise.
	* bfin-linux-tdep.c (bfin_linux_init_abi): Likewise.
	* breakpoint.c (print_it_catch_syscall): Adjust call to
	get_syscall_by_number to provide gdbarch.
	(print_one_catch_syscall): Likewise.
	(print_mention_catch_syscall): Likewise.
	(print_recreate_catch_syscall): Likewise.
	(catch_syscall_split_args): Adjust calls to get_syscall_by_number
	and get_syscall_by_name to provide gdbarch.
	(catch_syscall_completer): Adjust call to get_syscall_names to
	provide gdbarch.
	* gdbarch.c: Regenerate.
	* gdbarch.h: Likewise.
	* gdbarch.sh: Forward declare "struct syscalls_info".
	(xml_syscall_file): New variable.
	(syscalls_info): Likewise.
	* i386-linux-tdep.c (i386_linux_init_abi): Adjust call to
	set_xml_syscall_file_name to provide gdbarch.
	* mips-linux-tdep.c (mips_linux_init_abi): Likewise.
	* ppc-linux-tdep.c (ppc_linux_init_abi): Likewise.
	* s390-linux-tdep.c (s390_gdbarch_init): Likewise.
	* sparc-linux-tdep.c (sparc32_linux_init_abi): Likewise.
	* sparc64-linux-tdep.c (sparc64_linux_init_abi): Likewise.
	* xml-syscall.c: Include gdbarch.h.
	(set_xml_syscall_file_name): Accept gdbarch parameter.
	(get_syscall_by_number): Likewise.
	(get_syscall_by_name): Likewise.
	(get_syscall_names): Likewise.
	(my_gdb_datadir): Delete global variable.
	(struct syscalls_info) <my_gdb_datadir>: New variable.
	(struct syscalls_info) <sysinfo>: Rename variable to
	"syscalls_info".
	(sysinfo): Delete global variable.
	(have_initialized_sysinfo): Likewise.
	(xml_syscall_file): Likewise.
	(sysinfo_free_syscalls_desc): Rename to...
	(syscalls_info_free_syscalls_desc): ... this.
	(free_syscalls_info): Rename "sysinfo" to "syscalls_info".  Adjust
	code to the new layout of "struct syscalls_info".
	(make_cleanup_free_syscalls_info): Rename parameter "sysinfo" to
	"syscalls_info".
	(syscall_create_syscall_desc): Likewise.
	(syscall_start_syscall): Likewise.
	(syscall_parse_xml): Likewise.
	(xml_init_syscalls_info): Likewise.  Drop "const" from return value.
	(init_sysinfo): Rename to...
	(init_syscalls_info): ...this.  Add gdbarch as a parameter.
	Adjust function to deal with gdbarch.
	(xml_get_syscall_number): Delete parameter sysinfo.  Accept
	gdbarch as a parameter.  Adjust code.
	(xml_get_syscall_name): Likewise.
	(xml_list_of_syscalls): Likewise.
	(set_xml_syscall_file_name): Accept gdbarch as parameter.
	(get_syscall_by_number): Likewise.
	(get_syscall_by_name): Likewise.
	(get_syscall_names): Likewise.
	* xml-syscall.h (set_xml_syscall_file_name): Likewise.
	(get_syscall_by_number): Likewise.
	(get_syscall_by_name): Likewise.
	(get_syscall_names): Likewise.

gdb/testsuite/
2014-11-20  Sergio Durigan Junior  <sergiodj@redhat.com>

	PR breakpoints/10737
	* gdb.base/catch-syscall.exp (do_syscall_tests): Call
	test_catch_syscall_multi_arch.
	(test_catch_syscall_multi_arch): New function.
Fix build breakage from previous commit

In the previous commit, I forgot to adjust the prototypes of the
functions inside gdb/xml-syscall.c for the case when GDB is compiled
without XML support.

gdb/
2014-11-20  Sergio Durigan Junior  <sergiodj@redhat.com>

	PR breakpoints/10737
	* xml-syscall.c (set_xml_syscall_file_name): Remove "const"
	modifier from "struct gdbarch" when compiling without Expat (XML)
	support.
	(get_syscall_by_number): Likewise.
	(get_syscall_by_name): Likewise.
	(get_syscall_names): Likewise.
Add ifunc-main IFUNC tests

	* ld-ifunc/ifunc.exp: Run ifunc-main.
	* ld-ifunc/ifunc-lib.c: New file.
	* ld-ifunc/ifunc-main.c: Likewise.
	* ld-ifunc/ifunc-main.out: Likewise.
Always load function pointer into a stack variable

This patch makes sure that compiler won't optimize out loading function
into a stack variable.

	* ld-ifunc/ifunc-main.c (get_bar): New function.
	(main): Use it.
Add function and function pointer tests

This patch adds tests for function and function pointer.

	* ld-x86-64/plt-lib.c: New file.
	* ld-x86-64/plt-main.out: Likewise.
	* ld-x86-64/plt-main1.c: Likewise.
	* ld-x86-64/plt-main1.rd: Likewise.
	* ld-x86-64/plt-main2.c: Likewise.
	* ld-x86-64/plt-main2.rd: Likewise.
	* ld-x86-64/plt-main3.c: Likewise.
	* ld-x86-64/plt-main3.rd: Likewise.
	* ld-x86-64/plt-main4.c: Likewise.
	* ld-x86-64/plt-main4.rd: Likewise.
	* ld-x86-64/plt-main5.c: Likewise.

	* ld-x86-64/x86-64.exp: Run plt-main tests.
Update plt-main tests for x32

	* ld-x86-64/plt-main1.rd: Updated for x32.
	* ld-x86-64/plt-main2.rd: Likewise.
	* ld-x86-64/plt-main3.rd: Likewise.
	* ld-x86-64/plt-main4.rd: Likewise.
Don't run pr17618 test on x32

	* ld-x86-64/pr17618.d: Don't run on x32.
Create .plt.got to avoid JUMP_SLOT relocation