public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  users/jkratoch/indexcxx-nameswrite: Merge branch 'indexcxx' into indexcxx-nameswrite
@ 2017-05-24 20:35 jkratoch
  0 siblings, 0 replies; 3+ messages in thread
From: jkratoch @ 2017-05-24 20:35 UTC (permalink / raw)
  To: archer-commits

The branch, users/jkratoch/indexcxx-nameswrite has been updated
       via  59545af072a3781081ced3b72e6a675e3db3631a (commit)
       via  a5a2c6c693bd290b3a5ffe924aa2c2e30b7d221f (commit)
       via  88c1242dc0a1e1ab582a65ea8bd05eb5f244c59b (commit)
       via  f4985dba0f53b38efcca4eef42cfbfca5ef44ee2 (commit)
       via  ab20fa4ae95212c58e369916de347f3d518530c2 (commit)
       via  f532ab94387d1bc47de619ae08ead522753d89fa (commit)
       via  39503f82427e22ed8e04d986ccdc8562091ec62e (commit)
       via  003ca0fd22863aaf1a9811c8a35a0133a2d27fb1 (commit)
      from  044f278be92054f43f2012f47849e79d8528bcbd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 59545af072a3781081ced3b72e6a675e3db3631a
Merge: 044f278 a5a2c6c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed May 24 22:35:27 2017 +0200

    Merge branch 'indexcxx' into indexcxx-nameswrite

-----------------------------------------------------------------------

Summary of changes:
 binutils/ChangeLog       |    4 ++
 binutils/objdump.c       |    4 +-
 gdb/ChangeLog            |   63 ++++++++++++++++++++++++++++
 gdb/alpha-tdep.c         |    3 -
 gdb/arc-tdep.c           |    2 -
 gdb/arch-utils.c         |   20 +++++++++
 gdb/arch-utils.h         |    2 +
 gdb/avr-tdep.c           |    1 -
 gdb/bfin-tdep.c          |    1 -
 gdb/cris-tdep.c          |   18 --------
 gdb/frv-tdep.c           |    1 -
 gdb/ft32-tdep.c          |    2 -
 gdb/gdbarch.c            |    4 +-
 gdb/gdbarch.sh           |    2 +-
 gdb/h8300-tdep.c         |    4 --
 gdb/hppa-tdep.c          |    2 -
 gdb/iq2000-tdep.c        |    1 -
 gdb/lm32-tdep.c          |    3 -
 gdb/m32c-tdep.c          |    3 -
 gdb/m32r-tdep.c          |    2 -
 gdb/m68hc11-tdep.c       |   11 -----
 gdb/m68k-tdep.c          |    4 --
 gdb/m88k-tdep.c          |    2 -
 gdb/microblaze-tdep.c    |    2 -
 gdb/mn10300-tdep.c       |    2 -
 gdb/moxie-tdep.c         |    2 -
 gdb/msp430-tdep.c        |    3 -
 gdb/mt-tdep.c            |    1 -
 gdb/nds32-tdep.c         |    2 -
 gdb/nios2-tdep.c         |   14 ------
 gdb/rl78-tdep.c          |    3 -
 gdb/rs6000-tdep.c        |   14 ------
 gdb/rx-tdep.c            |    2 -
 gdb/s390-linux-tdep.c    |    2 -
 gdb/score-tdep.c         |   10 -----
 gdb/sh-tdep.c            |    1 -
 gdb/sh64-tdep.c          |    2 -
 gdb/sparc-tdep.c         |    2 -
 gdb/tic6x-tdep.c         |   10 -----
 gdb/tilegx-tdep.c        |    2 -
 gdb/v850-tdep.c          |    2 -
 gdb/vax-tdep.c           |    2 -
 gdb/xstormy16-tdep.c     |    2 -
 gdb/xtensa-tdep.c        |    2 -
 include/ChangeLog        |    9 ++++
 include/dis-asm.h        |   88 ++++------------------------------------
 opcodes/ChangeLog        |   38 +++++++++++++++++
 opcodes/alpha-dis.c      |    2 +-
 opcodes/avr-dis.c        |    2 +-
 opcodes/bfin-dis.c       |    2 +-
 opcodes/cr16-dis.c       |    2 +-
 opcodes/crx-dis.c        |    2 +-
 opcodes/d10v-dis.c       |    2 +-
 opcodes/d30v-dis.c       |    2 +-
 opcodes/disassemble.c    |   43 ++++++++++++-------
 opcodes/disassemble.h    |  102 ++++++++++++++++++++++++++++++++++++++++++++++
 opcodes/dlx-dis.c        |    2 +-
 opcodes/epiphany-dis.c   |    2 +-
 opcodes/fr30-dis.c       |    2 +-
 opcodes/frv-dis.c        |    2 +-
 opcodes/ft32-dis.c       |    2 +-
 opcodes/h8300-dis.c      |    2 +-
 opcodes/h8500-dis.c      |    2 +-
 opcodes/hppa-dis.c       |    2 +-
 opcodes/i370-dis.c       |    2 +-
 opcodes/i386-dis.c       |    2 +-
 opcodes/i860-dis.c       |    2 +-
 opcodes/i960-dis.c       |    2 +-
 opcodes/ip2k-dis.c       |    2 +-
 opcodes/iq2000-dis.c     |    2 +-
 opcodes/lm32-dis.c       |    2 +-
 opcodes/m10200-dis.c     |    2 +-
 opcodes/m10300-dis.c     |    2 +-
 opcodes/m32r-dis.c       |    2 +-
 opcodes/m68hc11-dis.c    |    2 +-
 opcodes/m68k-dis.c       |    2 +-
 opcodes/m88k-dis.c       |    2 +-
 opcodes/mcore-dis.c      |    2 +-
 opcodes/metag-dis.c      |    2 +-
 opcodes/microblaze-dis.c |    2 +-
 opcodes/mmix-dis.c       |    2 +-
 opcodes/moxie-dis.c      |    2 +-
 opcodes/msp430-dis.c     |    2 +-
 opcodes/mt-dis.c         |    2 +-
 opcodes/nds32-dis.c      |    2 +-
 opcodes/nios2-dis.c      |    2 +-
 opcodes/ns32k-dis.c      |    2 +-
 opcodes/or1k-dis.c       |    2 +-
 opcodes/pdp11-dis.c      |    2 +-
 opcodes/pj-dis.c         |    2 +-
 opcodes/ppc-dis.c        |    2 +-
 opcodes/pru-dis.c        |    2 +-
 opcodes/riscv-dis.c      |    2 +-
 opcodes/rl78-dis.c       |    8 +++-
 opcodes/s390-dis.c       |    2 +-
 opcodes/score-dis.c      |    2 +-
 opcodes/sh-dis.c         |    2 +-
 opcodes/sh64-dis.c       |    2 +-
 opcodes/tic30-dis.c      |    2 +-
 opcodes/tic4x-dis.c      |    2 +-
 opcodes/tic54x-dis.c     |    2 +-
 opcodes/tic6x-dis.c      |    2 +-
 opcodes/tic80-dis.c      |    2 +-
 opcodes/tilegx-dis.c     |    2 +-
 opcodes/tilepro-dis.c    |    2 +-
 opcodes/v850-dis.c       |    2 +-
 opcodes/vax-dis.c        |    2 +-
 opcodes/visium-dis.c     |    2 +-
 opcodes/w65-dis.c        |    2 +-
 opcodes/wasm32-dis.c     |    2 +-
 opcodes/xc16x-dis.c      |    2 +-
 opcodes/xgate-dis.c      |    2 +-
 opcodes/xstormy16-dis.c  |    2 +-
 opcodes/xtensa-dis.c     |    2 +-
 opcodes/z80-dis.c        |    2 +-
 opcodes/z8k-dis.c        |    2 +-
 sim/common/ChangeLog     |    4 ++
 sim/common/sim-trace.c   |    6 ++-
 118 files changed, 360 insertions(+), 311 deletions(-)
 create mode 100644 opcodes/disassemble.h

First 500 lines of diff:
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 60a199a..b2f0f11 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2017-05-24  Yao Qi  <yao.qi@linaro.org>
+
+	* objdump.c (disassemble_data): Caller update.
+
 2017-05-19  Jose E. Marchesi  <jose.marchesi@oracle.com>
 
 	* objcopy.c (merge_gnu_build_notes): Remove workaround that
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 5972da1..81d47a0 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -2386,7 +2386,9 @@ disassemble_data (bfd *abfd)
     }
 
   /* Use libopcodes to locate a suitable disassembler.  */
-  aux.disassemble_fn = disassembler (abfd);
+  aux.disassemble_fn = disassembler (bfd_get_arch (abfd),
+				     bfd_big_endian (abfd),
+				     bfd_get_mach (abfd), abfd);
   if (!aux.disassemble_fn)
     {
       non_fatal (_("can't disassemble for architecture %s\n"),
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c8bd6fd..a96e71f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,66 @@
+2017-05-24  Yao Qi  <yao.qi@linaro.org>
+
+	* rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
+	(rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
+
+2017-05-24  Yao Qi  <yao.qi@linaro.org>
+
+	* rl78-tdep.c (rl78_gdbarch_init): Don't call
+	set_gdbarch_print_insn.
+
+2017-05-24  Yao Qi  <yao.qi@linaro.org>
+
+	* h8300-tdep.c (h8300_gdbarch_init): Don't call
+	set_gdbarch_print_insn.
+
+2017-05-24  Yao Qi  <yao.qi@linaro.org>
+
+	* alpha-tdep.c (alpha_gdbarch_init): Don't call
+	set_gdbarch_print_insn.
+	* arc-tdep.c (arc_gdbarch_init): Likewise.
+	* arch-utils.c: include dis-asm.h.
+	(default_print_insn): New function.
+	* arch-utils.h (default_print_insn): Declare.
+	* avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
+	* bfin-tdep.c (bfin_gdbarch_init): Likewise.
+	* cris-tdep.c (cris_delayed_get_disassembler): Remove.
+	(cris_gdbarch_init): Don't call set_gdbarch_print_insn.
+	* frv-tdep.c (frv_gdbarch_init): Likewise.
+	* ft32-tdep.c (ft32_gdbarch_init): Likewise.
+	* gdbarch.sh (print_insn): Use default_print_insn.
+	* gdbarch.c: Regenerated.
+	* hppa-tdep.c (hppa_gdbarch_init): Likewise.
+	* iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
+	* lm32-tdep.c (lm32_gdbarch_init): Likewise.
+	* m32c-tdep.c (m32c_gdbarch_init): Likewise.
+	* m32r-tdep.c (m32r_gdbarch_init): Likewise.
+	* m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
+	(m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
+	* m68k-tdep.c (m68k_gdbarch_init): Likewise.
+	* m88k-tdep.c (m88k_gdbarch_init): Likewise.
+	* microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
+	* mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
+	* moxie-tdep.c (moxie_gdbarch_init): Likewise.
+	* msp430-tdep.c (msp430_gdbarch_init): Likewise.
+	* mt-tdep.c (mt_gdbarch_init): Likewise.
+	* nds32-tdep.c (nds32_gdbarch_init): Likewise.
+	* nios2-tdep.c (nios2_print_insn): Remove.
+	(nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
+	* rx-tdep.c (rx_gdbarch_init): Likewise.
+	* s390-linux-tdep.c (s390_gdbarch_init): Likewise.
+	* score-tdep.c (score_print_insn): Remove.
+	(score_gdbarch_init): Don't call set_gdbarch_print_insn.
+	* sh-tdep.c (sh_gdbarch_init): Likewise.
+	* sh64-tdep.c (sh64_gdbarch_init): Likewise.
+	* sparc-tdep.c (sparc32_gdbarch_init): Likewise.
+	* tic6x-tdep.c (tic6x_print_insn): Remove.
+	(tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
+	* tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
+	* v850-tdep.c (v850_gdbarch_init): Likewise.
+	* vax-tdep.c (vax_gdbarch_init): Likewise.
+	* xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
+	* xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
+
 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
 
 	* mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index d62566c..b1bc6a1 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -1798,9 +1798,6 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* Prologue heuristics.  */
   set_gdbarch_skip_prologue (gdbarch, alpha_skip_prologue);
 
-  /* Disassembler.  */
-  set_gdbarch_print_insn (gdbarch, print_insn_alpha);
-
   /* Call info.  */
 
   set_gdbarch_return_value (gdbarch, alpha_return_value);
diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
index 4f866a9..d9ee5c6 100644
--- a/gdb/arc-tdep.c
+++ b/gdb/arc-tdep.c
@@ -2013,8 +2013,6 @@ arc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_frame_align (gdbarch, arc_frame_align);
 
-  set_gdbarch_print_insn (gdbarch, arc_delayed_print_insn);
-
   set_gdbarch_cannot_step_breakpoint (gdbarch, 1);
 
   /* "nonsteppable" watchpoint means that watchpoint triggers before
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index b1cec80..c011b0f 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -37,6 +37,7 @@
 
 #include "floatformat.h"
 
+#include "dis-asm.h"
 
 struct displaced_step_closure *
 simple_displaced_step_copy_insn (struct gdbarch *gdbarch,
@@ -973,6 +974,25 @@ default_guess_tracepoint_registers (struct gdbarch *gdbarch,
   regcache_raw_supply (regcache, pc_regno, regs);
 }
 
+int
+default_print_insn (bfd_vma memaddr, disassemble_info *info)
+{
+  disassembler_ftype disassemble_fn;
+
+  if (exec_bfd != NULL)
+    {
+      gdb_assert (info->arch == bfd_get_arch (exec_bfd));
+      gdb_assert (info->endian == (bfd_big_endian (exec_bfd)
+				   ? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE));
+      gdb_assert (info->mach == bfd_get_mach (exec_bfd));
+    }
+  disassemble_fn = disassembler (info->arch, info->endian == BFD_ENDIAN_BIG,
+				 info->mach, exec_bfd);
+
+  gdb_assert (disassemble_fn != NULL);
+  return (*disassemble_fn) (memaddr, info);
+}
+
 /* -Wmissing-prototypes */
 extern initialize_file_ftype _initialize_gdbarch_utils;
 
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index 967a4b1..040afca 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -273,4 +273,6 @@ extern void default_guess_tracepoint_registers (struct gdbarch *gdbarch,
 						struct regcache *regcache,
 						CORE_ADDR addr);
 
+extern int default_print_insn (bfd_vma memaddr, disassemble_info *info);
+
 #endif
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index ec9db1c..3d041c6 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -1499,7 +1499,6 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_pseudo_register_write (gdbarch, avr_pseudo_register_write);
 
   set_gdbarch_return_value (gdbarch, avr_return_value);
-  set_gdbarch_print_insn (gdbarch, print_insn_avr);
 
   set_gdbarch_push_dummy_call (gdbarch, avr_push_dummy_call);
 
diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index c590a91..bfb5d57 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -838,7 +838,6 @@ bfin_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_frame_args_skip (gdbarch, 8);
   set_gdbarch_unwind_pc (gdbarch, bfin_unwind_pc);
   set_gdbarch_frame_align (gdbarch, bfin_frame_align);
-  set_gdbarch_print_insn (gdbarch, print_insn_bfin);
 
   /* Hook in ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch);
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index eb39772..e554e24 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -3785,19 +3785,6 @@ cris_gdb_func (struct gdbarch *gdbarch, enum cris_op_type op_type,
     }
 }
 
-/* This wrapper is to avoid cris_get_assembler being called before 
-   exec_bfd has been set.  */
-
-static int
-cris_delayed_get_disassembler (bfd_vma addr, struct disassemble_info *info)
-{
-  int (*print_insn) (bfd_vma addr, struct disassemble_info *info);
-
-  print_insn = cris_get_disassembler (exec_bfd);
-  gdb_assert (print_insn != NULL);
-  return print_insn (addr, info);
-}
-
 /* Originally from <asm/elf.h>.  */
 typedef unsigned char cris_elf_greg_t[4];
 
@@ -4134,10 +4121,5 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* Hook in ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch);
 
-  /* FIXME: cagney/2003-08-27: It should be possible to select a CRIS
-     disassembler, even when there is no BFD.  Does something like
-     "gdb; target remote; disassmeble *0x123" work?  */
-  set_gdbarch_print_insn (gdbarch, cris_delayed_get_disassembler);
-
   return gdbarch;
 }
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 8744733..c0257bd 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -1582,7 +1582,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       break;
     }
 
-  set_gdbarch_print_insn (gdbarch, print_insn_frv);
   if (frv_abi (gdbarch) == FRV_ABI_FDPIC)
     set_gdbarch_convert_from_func_ptr_addr (gdbarch,
 					    frv_convert_from_func_ptr_addr);
diff --git a/gdb/ft32-tdep.c b/gdb/ft32-tdep.c
index 5b28275..966a593 100644
--- a/gdb/ft32-tdep.c
+++ b/gdb/ft32-tdep.c
@@ -637,8 +637,6 @@ ft32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_unwind_pc (gdbarch, ft32_unwind_pc);
 
-  set_gdbarch_print_insn (gdbarch, print_insn_ft32);
-
   /* Hook in ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch);
 
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 9c827ac..257c39f 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -429,6 +429,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
   gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
   gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
   gdbarch->addr_bits_remove = core_addr_identity;
+  gdbarch->print_insn = default_print_insn;
   gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
   gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
   gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
@@ -621,8 +622,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of addr_bits_remove, invalid_p == 0 */
   /* Skip verify of software_single_step, has predicate.  */
   /* Skip verify of single_step_through_delay, has predicate.  */
-  if (gdbarch->print_insn == 0)
-    log.puts ("\n\tprint_insn");
+  /* Skip verify of print_insn, invalid_p == 0 */
   /* Skip verify of skip_trampoline_code, invalid_p == 0 */
   /* Skip verify of skip_solib_resolver, invalid_p == 0 */
   /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 753819f..7992cbe 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -643,7 +643,7 @@ F;std::vector<CORE_ADDR>;software_single_step;struct regcache *regcache;regcache
 M;int;single_step_through_delay;struct frame_info *frame;frame
 # FIXME: cagney/2003-08-28: Need to find a better way of selecting the
 # disassembler.  Perhaps objdump can handle it?
-f;int;print_insn;bfd_vma vma, struct disassemble_info *info;vma, info;;0;
+f;int;print_insn;bfd_vma vma, struct disassemble_info *info;vma, info;;default_print_insn;;0
 f;CORE_ADDR;skip_trampoline_code;struct frame_info *frame, CORE_ADDR pc;frame, pc;;generic_skip_trampoline_code;;0
 
 
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 7b260b1..1e8bde1 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -1275,7 +1275,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       set_gdbarch_ptr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
       set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
       set_gdbarch_return_value (gdbarch, h8300_return_value);
-      set_gdbarch_print_insn (gdbarch, print_insn_h8300);
       break;
     case bfd_mach_h8300h:
     case bfd_mach_h8300hn:
@@ -1296,7 +1295,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 	  set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
 	}
       set_gdbarch_return_value (gdbarch, h8300h_return_value);
-      set_gdbarch_print_insn (gdbarch, print_insn_h8300h);
       break;
     case bfd_mach_h8300s:
     case bfd_mach_h8300sn:
@@ -1317,7 +1315,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 	  set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
 	}
       set_gdbarch_return_value (gdbarch, h8300h_return_value);
-      set_gdbarch_print_insn (gdbarch, print_insn_h8300s);
       break;
     case bfd_mach_h8300sx:
     case bfd_mach_h8300sxn:
@@ -1338,7 +1335,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 	  set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
 	}
       set_gdbarch_return_value (gdbarch, h8300h_return_value);
-      set_gdbarch_print_insn (gdbarch, print_insn_h8300s);
       break;
     }
 
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 2636a27..229b061 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -3122,8 +3122,6 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* Helper for function argument information.  */
   set_gdbarch_fetch_pointer_argument (gdbarch, hppa_fetch_pointer_argument);
 
-  set_gdbarch_print_insn (gdbarch, print_insn_hppa);
-
   /* When a hardware watchpoint triggers, we'll move the inferior past
      it by removing all eventpoints; stepping past the instruction
      that caused the trigger; reinserting eventpoints; and checking
diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c
index 7d8ed3c..99824b7 100644
--- a/gdb/iq2000-tdep.c
+++ b/gdb/iq2000-tdep.c
@@ -838,7 +838,6 @@ iq2000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_frame_args_skip      (gdbarch, 0);
   set_gdbarch_skip_prologue        (gdbarch, iq2000_skip_prologue);
   set_gdbarch_inner_than           (gdbarch, core_addr_lessthan);
-  set_gdbarch_print_insn           (gdbarch, print_insn_iq2000);
   set_gdbarch_register_type (gdbarch, iq2000_register_type);
   set_gdbarch_frame_align (gdbarch, iq2000_frame_align);
   set_gdbarch_unwind_sp (gdbarch, iq2000_unwind_sp);
diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c
index bd3e182..84ece3e 100644
--- a/gdb/lm32-tdep.c
+++ b/gdb/lm32-tdep.c
@@ -565,9 +565,6 @@ lm32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_push_dummy_call (gdbarch, lm32_push_dummy_call);
   set_gdbarch_return_value (gdbarch, lm32_return_value);
 
-  /* Instruction disassembler.  */
-  set_gdbarch_print_insn (gdbarch, print_insn_lm32);
-
   lm32_add_reggroups (gdbarch);
   set_gdbarch_register_reggroup_p (gdbarch, lm32_register_reggroup_p);
 
diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c
index 7376372..1bc5950 100644
--- a/gdb/m32c-tdep.c
+++ b/gdb/m32c-tdep.c
@@ -2639,9 +2639,6 @@ m32c_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* Register set.  */
   make_regs (gdbarch);
 
-  /* Disassembly.  */
-  set_gdbarch_print_insn (gdbarch, print_insn_m32c);
-
   /* Breakpoints.  */
   set_gdbarch_breakpoint_kind_from_pc (gdbarch, m32c_breakpoint::kind_from_pc);
   set_gdbarch_sw_breakpoint_from_kind (gdbarch, m32c_breakpoint::bp_from_kind);
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index 0820af9..2d14ced 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -947,8 +947,6 @@ m32r_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* Return the unwound PC value.  */
   set_gdbarch_unwind_pc (gdbarch, m32r_unwind_pc);
 
-  set_gdbarch_print_insn (gdbarch, print_insn_m32r);
-
   /* Hook in ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch);
 
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 893d9c2..b19ddf7 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1344,16 +1344,6 @@ m68hc11_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym)
   if (flags & STO_M68HC12_INTERRUPT)
     MSYMBOL_SET_RTI (msym);
 }
-
-static int
-gdb_print_insn_m68hc11 (bfd_vma memaddr, disassemble_info *info)
-{
-  if (info->arch == bfd_arch_m68hc11)
-    return print_insn_m68hc11 (memaddr, info);
-  else
-    return print_insn_m68hc12 (memaddr, info);
-}
-
 \f
 
 /* 68HC11/68HC12 register groups.
@@ -1525,7 +1515,6 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
 				       m68hc11_breakpoint::kind_from_pc);
   set_gdbarch_sw_breakpoint_from_kind (gdbarch,
 				       m68hc11_breakpoint::bp_from_kind);
-  set_gdbarch_print_insn (gdbarch, gdb_print_insn_m68hc11);
 
   m68hc11_add_reggroups (gdbarch);
   set_gdbarch_register_reggroup_p (gdbarch, m68hc11_register_reggroup_p);
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 7c3bf4c..5b4736d 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -1240,10 +1240,6 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_return_in_first_hidden_param_p (gdbarch,
 					      m68k_return_in_first_hidden_param_p);
 
-
-  /* Disassembler.  */
-  set_gdbarch_print_insn (gdbarch, print_insn_m68k);
-
 #if defined JB_PC && defined JB_ELEMENT_SIZE
   tdep->jb_pc = JB_PC;
   tdep->jb_elt_size = JB_ELEMENT_SIZE;
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c
index 57fe644..d08a913 100644
--- a/gdb/m88k-tdep.c
+++ b/gdb/m88k-tdep.c
@@ -838,8 +838,6 @@ m88k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_iterate_over_regset_sections
     (gdbarch, m88k_iterate_over_regset_sections);
 
-  set_gdbarch_print_insn (gdbarch, print_insn_m88k);
-
   set_gdbarch_skip_prologue (gdbarch, m88k_skip_prologue);
 
   /* Stack grows downward.  */
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index 59f94c5..86cb090 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -738,8 +738,6 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_frame_args_skip (gdbarch, 8);
 
-  set_gdbarch_print_insn (gdbarch, print_insn_microblaze);
-
   set_gdbarch_write_pc (gdbarch, microblaze_write_pc);
 
   set_gdbarch_unwind_pc (gdbarch, microblaze_unwind_pc);
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 0f5e10f..1e2526f 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -1444,8 +1444,6 @@ mn10300_gdbarch_init (struct gdbarch_info info,
   set_gdbarch_sw_breakpoint_from_kind (gdbarch,
 				       mn10300_breakpoint::bp_from_kind);
   /* decr_pc_after_break?  */
-  /* Disassembly.  */
-  set_gdbarch_print_insn (gdbarch, print_insn_mn10300);
 
   /* Stage 2 */
   set_gdbarch_return_value (gdbarch, mn10300_return_value);
diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c
index 2972d52..91248cc 100644
--- a/gdb/moxie-tdep.c
+++ b/gdb/moxie-tdep.c
@@ -1142,8 +1142,6 @@ moxie_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_unwind_pc (gdbarch, moxie_unwind_pc);
 
-  set_gdbarch_print_insn (gdbarch, print_insn_moxie);
-
   /* Hook in ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch);
 
diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c
index d9eebf0..d730e1b 100644
--- a/gdb/msp430-tdep.c
+++ b/gdb/msp430-tdep.c
@@ -997,9 +997,6 @@ msp430_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 				       msp430_breakpoint::bp_from_kind);
   set_gdbarch_decr_pc_after_break (gdbarch, 1);
 
-  /* Disassembly.  */


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] 3+ messages in thread
* [SCM]  users/jkratoch/indexcxx-nameswrite: Merge branch 'indexcxx' into indexcxx-nameswrite
@ 2017-05-24  7:20 jkratoch
  0 siblings, 0 replies; 3+ messages in thread
From: jkratoch @ 2017-05-24  7:20 UTC (permalink / raw)
  To: archer-commits

The branch, users/jkratoch/indexcxx-nameswrite has been updated
       via  d0ddba867e31c2bfc2e46f08ae696df1f0247590 (commit)
       via  480030250901adfbd6e8080e87143fc9959f372e (commit)
       via  60fd657792228e3eb59e87c26fcdeccbfe94d224 (commit)
       via  f7241d4f27cd59357a75bf802e9ffa7d95036deb (commit)
       via  d489d81d0934c4fda8c8aa68fbec1b1315cf8df0 (commit)
       via  6e92fed5946111a76064feb8a2a184d224deae1a (commit)
       via  590b87ffa386ea403e2cb61525c6aafef77097a2 (commit)
       via  6e3f3473e2136e77d6346d5bca894c38e5389116 (commit)
       via  8e7f04f17c60069143078dafd3d3eb8cd15f10fb (commit)
       via  575dcd27f8be6ecd3f89539a8210a8d3f0a271b1 (commit)
       via  903b2a564d78b8e47f2460a2a452f442e6e5e979 (commit)
       via  176efed15cabb932a7e9fb2c5e6ef0753e8351a0 (commit)
       via  04ef582ace91cad765d056cc95624478e0421144 (commit)
       via  25f94347373b1b6f4bfc79eeb38e79d383195779 (commit)
       via  9a6465c207ed4e34be92741316d78fc00f0836e4 (commit)
       via  3c0367d0e2df21717b7345a1ccadef39183457ab (commit)
       via  e11b3cdc565c5e86e43ef79d25fc5e8b88162ec1 (commit)
       via  0f068fb5e5b65038c3ded3cfd2a4b8805196956c (commit)
       via  ca49a96781f723d43ec49471cbbb50aa511d063e (commit)
       via  e6cf65f283b8be44014fad0ad0aebfbcc71fceac (commit)
      from  59bc95f8092bd2b5765532e3c3ea010476cf5711 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit d0ddba867e31c2bfc2e46f08ae696df1f0247590
Merge: 59bc95f 4800302
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed May 24 09:18:59 2017 +0200

    Merge branch 'indexcxx' into indexcxx-nameswrite

-----------------------------------------------------------------------

Summary of changes:
 bfd/ChangeLog                                 |   10 +
 bfd/elf32-arc.c                               |    4 +
 bfd/elf64-x86-64.c                            |    3 +-
 bfd/version.h                                 |    2 +-
 gas/ChangeLog                                 |   48 +
 gas/config/tc-aarch64.c                       |   30 +-
 gas/config/tc-aarch64.h                       |    3 +
 gas/config/tc-arc.c                           |   21 +-
 gas/config/tc-i386.c                          |   75 +-
 gas/configure                                 |    2 +-
 gas/configure.ac                              |    2 +-
 gas/configure.tgt                             |    9 +-
 gas/testsuite/gas/i386/i386.exp               |    6 +
 gas/testsuite/gas/i386/notrack-intel.d        |   29 +
 gas/testsuite/gas/i386/notrack.d              |   28 +
 gas/testsuite/gas/i386/notrack.s              |   35 +
 gas/testsuite/gas/i386/notrackbad.l           |   53 +
 gas/testsuite/gas/i386/notrackbad.s           |   22 +
 gas/testsuite/gas/i386/x86-64-notrack-intel.d |   30 +
 gas/testsuite/gas/i386/x86-64-notrack.d       |   29 +
 gas/testsuite/gas/i386/x86-64-notrack.s       |   40 +
 gas/testsuite/gas/i386/x86-64-notrackbad.l    |   53 +
 gas/testsuite/gas/i386/x86-64-notrackbad.s    |   22 +
 gdb/ChangeLog                                 |   47 +
 gdb/MAINTAINERS                               |    1 +
 gdb/doc/ChangeLog                             |    4 +
 gdb/doc/gdb.texinfo                           |   13 +
 gdb/mips-fbsd-nat.c                           |   24 +-
 gdb/mips-fbsd-tdep.c                          |   29 +-
 gdb/ppc-linux-nat.c                           |    4 +-
 gdb/ppc-sysv-tdep.c                           |   34 +-
 gdb/ppc-tdep.h                                |    3 +
 gdb/rs6000-aix-tdep.c                         |    6 +-
 gdb/rs6000-lynx178-tdep.c                     |    6 +-
 gdb/rs6000-nat.c                              |    4 +-
 gdb/rs6000-tdep.c                             |    4 +-
 gdb/rust-lang.c                               |    5 +-
 gdb/testsuite/ChangeLog                       |    6 +
 gdb/testsuite/gdb.rust/unsized.exp            |   35 +
 gdb/testsuite/gdb.rust/unsized.rs             |   33 +
 gold/ChangeLog                                |   21 +
 gold/options.h                                |    4 +
 gold/powerpc.cc                               |  192 +-
 include/ChangeLog                             |    8 +
 include/opcode/arc.h                          |    2 +-
 include/opcode/i386.h                         |    1 +
 ld/ChangeLog                                  |    6 +
 ld/configure.tgt                              |    8 +
 opcodes/ChangeLog                             |   16 +
 opcodes/i386-dis.c                            |   44 +-
 opcodes/i386-gen.c                            |    1 +
 opcodes/i386-opc.h                            |    3 +
 opcodes/i386-opc.tbl                          |   15 +-
 opcodes/i386-tbl.h                            |21299 +++++++++++++------------
 54 files changed, 11660 insertions(+), 10774 deletions(-)
 create mode 100644 gas/testsuite/gas/i386/notrack-intel.d
 create mode 100644 gas/testsuite/gas/i386/notrack.d
 create mode 100644 gas/testsuite/gas/i386/notrack.s
 create mode 100644 gas/testsuite/gas/i386/notrackbad.l
 create mode 100644 gas/testsuite/gas/i386/notrackbad.s
 create mode 100644 gas/testsuite/gas/i386/x86-64-notrack-intel.d
 create mode 100644 gas/testsuite/gas/i386/x86-64-notrack.d
 create mode 100644 gas/testsuite/gas/i386/x86-64-notrack.s
 create mode 100644 gas/testsuite/gas/i386/x86-64-notrackbad.l
 create mode 100644 gas/testsuite/gas/i386/x86-64-notrackbad.s
 create mode 100644 gdb/testsuite/gdb.rust/unsized.exp
 create mode 100644 gdb/testsuite/gdb.rust/unsized.rs

First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 38462fe..4d15e1a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,13 @@
+2017-05-23  Dilian Palauzov  <git-dpa@aegee.org>
+
+	* elf32-arc.c (arc_elf_merge_attributes): Add fall through
+	comments.
+
+2017-05-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
+	dynobj instead of htab->elf.dynobj.
+
 2017-05-19  Maciej W. Rozycki  <macro@imgtec.com>
 
 	* elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index 3e99cab..ef0d893 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -728,9 +728,11 @@ arc_elf_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
 
 	case Tag_ARC_ABI_pic:
 	  tagname = "PIC";
+	  /* fall through */
 	case Tag_ARC_ABI_sda:
 	  if (!tagname)
 	    tagname = "SDA";
+	  /* fall through */
 	case Tag_ARC_ABI_tls:
 	  {
 	    const char *tagval[] = { "Absent", "MWDT", "GNU" };
@@ -756,9 +758,11 @@ arc_elf_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
 
 	case Tag_ARC_ABI_double_size:
 	  tagname = "Double size";
+	  /* fall through */
 	case Tag_ARC_ABI_enumsize:
 	  if (!tagname)
 	    tagname = "Enum size";
+	  /* fall through */
 	case Tag_ARC_ABI_exceptions:
 	  if (!tagname)
 	    tagname = "ABI exceptions";
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 00cf70a..7beb78e 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -7245,8 +7245,7 @@ error_alignment:
 	  /* MPX PLT is supported only for non-NaCl target in 64-bit
 	     mode and is needed only for lazy binding.  */
 	  if (lazy_plt
-	      && info->bndplt
-	      && ABI_64_P (htab->elf.dynobj))
+	      && info->bndplt && ABI_64_P (dynobj))
 	    {
 	      /* Create the second PLT for Intel MPX support.  */
 	      sec = bfd_make_section_anyway_with_flags (dynobj,
diff --git a/bfd/version.h b/bfd/version.h
index 10ba349..e8c13d4 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20170521
+#define BFD_VERSION_DATE 20170524
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
 #define REPORT_BUGS_TO @report_bugs_to@
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 8fff0e4..2e7bb8d 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,51 @@
+2017-05-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* gas/testsuite/gas/i386/notrackbad.l: Updated for non-ELF
+	targets.
+	* gas/testsuite/gas/i386/x86-64-notrackbad.l: Likewise.
+
+2017-05-23  Claudiu Zissulescu <claziss@synopsys.com>
+
+	* config/tc-arc.c (md_apply_fix): Use as_bad_where.
+	(assemble_insn): Use as_bad.
+
+2017-05-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* config/tc-i386.c (REX_PREFIX): Changed to 7.
+	(NOTRACK_PREFIX): New.
+	(MAX_PREFIXES): Changed to 8.
+	(_i386_insn): Add notrack_prefix.
+	(PREFIX_GROUP): Add PREFIX_DS.
+	(add_prefix): Return PREFIX_DS for DS_PREFIX_OPCODE.
+	(md_assemble): Check if NOTRACK prefix is supported.
+	(parse_insn): Set notrack_prefix and issue an error for
+	other prefixes after NOTRACK prefix.
+	* testsuite/gas/i386/i386.exp: Run tests for NOTRACK prefix.
+	* testsuite/gas/i386/notrack-intel.d: New file.
+	* testsuite/gas/i386/notrack.d: Likewise.
+	* testsuite/gas/i386/notrack.s: Likewise.
+	* testsuite/gas/i386/notrackbad.l: Likewise.
+	* testsuite/gas/i386/notrackbad.s: Likewise.
+	* testsuite/gas/i386/x86-64-notrack-intel.d: Likewise.
+	* testsuite/gas/i386/x86-64-notrack.d: Likewise.
+	* testsuite/gas/i386/x86-64-notrack.s: Likewise.
+	* testsuite/gas/i386/x86-64-notrackbad.l: Likewise.
+	* testsuite/gas/i386/x86-64-notrackbad.s: Likewise.
+
+2017-05-22  Jiong Wang <jiong.wang@arm.com>
+
+	* configure.tgt: Set "arch" to "aarch64" if ${cpu} equals "aarch64".
+	Recognize the new triplet name aarch64*-linux-gnu_ilp32.
+	* configure.ac: Output DEFAULT_ARCH macro for AArch64.
+	* configure: Regenerate.
+	* config/tc-aarch64.h (aarch64_after_parse_args): New declaration.
+	(md_after_parse_args): New define.
+	* config/tc-aarch64.c (aarch64_abi_type): New enumeration
+	AARCH64_ABI_NONE.
+	(DEFAULT_ARCH): New define.
+	(aarch64_abi): Set default value to AARCH64_ABI_NONE.
+	(aarch64_after_parse_args): New function.
+
 2017-05-19  Jose E. Marchesi  <jose.marchesi@oracle.com>
 
 	* config/tc-sparc.c (sparc_arch_table): Entries for `sparc6',
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 72b98fd..cdb2903 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -62,12 +62,20 @@ static symbolS *GOT_symbol;
 /* Which ABI to use.  */
 enum aarch64_abi_type
 {
-  AARCH64_ABI_LP64 = 0,
-  AARCH64_ABI_ILP32 = 1
+  AARCH64_ABI_NONE = 0,
+  AARCH64_ABI_LP64 = 1,
+  AARCH64_ABI_ILP32 = 2
 };
 
+#ifndef DEFAULT_ARCH
+#define DEFAULT_ARCH "aarch64"
+#endif
+
+/* DEFAULT_ARCH is initialized in gas/configure.tgt.  */
+static const char *default_arch = DEFAULT_ARCH;
+
 /* AArch64 ABI for the output file.  */
-static enum aarch64_abi_type aarch64_abi = AARCH64_ABI_LP64;
+static enum aarch64_abi_type aarch64_abi = AARCH64_ABI_NONE;
 
 /* When non-zero, program to a 32-bit model, in which the C data types
    int, long and all pointer types are 32-bit objects (ILP32); or to a
@@ -7975,6 +7983,22 @@ aarch64_force_relocation (struct fix *fixp)
 
 #ifdef OBJ_ELF
 
+/* Implement md_after_parse_args.  This is the earliest time we need to decide
+   ABI.  If no -mabi specified, the ABI will be decided by target triplet.  */
+
+void
+aarch64_after_parse_args (void)
+{
+  if (aarch64_abi != AARCH64_ABI_NONE)
+    return;
+
+  /* DEFAULT_ARCH will have ":32" extension if it's configured for ILP32.  */
+  if (strlen (default_arch) > 7 && strcmp (default_arch + 7, ":32") == 0)
+    aarch64_abi = AARCH64_ABI_ILP32;
+  else
+    aarch64_abi = AARCH64_ABI_LP64;
+}
+
 const char *
 elf64_aarch64_target_format (void)
 {
diff --git a/gas/config/tc-aarch64.h b/gas/config/tc-aarch64.h
index 5bf1399..4aa3494 100644
--- a/gas/config/tc-aarch64.h
+++ b/gas/config/tc-aarch64.h
@@ -192,6 +192,9 @@ struct aarch64_segment_info_type
 #define tc_regname_to_dw2regnum            tc_aarch64_regname_to_dw2regnum
 #define tc_cfi_frame_initial_instructions  tc_aarch64_frame_initial_instructions
 
+extern void aarch64_after_parse_args (void);
+#define md_after_parse_args() aarch64_after_parse_args ()
+
 #else /* Not OBJ_ELF.  */
 #define GLOBAL_OFFSET_TABLE_NAME "__GLOBAL_OFFSET_TABLE_"
 #endif
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index a092892..173a1a0 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -2966,8 +2966,10 @@ md_apply_fix (fixS *fixP,
 	  break;
 	default:
 	  if ((int) fixP->fx_r_type < 0)
-	    as_fatal (_("PC relative relocation not allowed for (internal) type %d"),
-		      fixP->fx_r_type);
+	    as_bad_where (fixP->fx_file, fixP->fx_line,
+			  _("PC relative relocation not allowed for (internal)"
+			    " type %d"),
+			  fixP->fx_r_type);
 	  break;
 	}
     }
@@ -3942,9 +3944,8 @@ assemble_insn (const struct arc_opcode *opcode,
 	    {
 	    case O_plt:
 	      if (opcode->insn_class == JUMP)
-		as_bad_where (frag_now->fr_file, frag_now->fr_line,
-			      _("Unable to use @plt relocation for insn %s"),
-			      opcode->name);
+		as_bad (_("Unable to use @plt relocation for insn %s"),
+			opcode->name);
 	      needGOTSymbol = TRUE;
 	      reloc = find_reloc ("plt", opcode->name,
 				  pflags, nflg,
@@ -3962,9 +3963,8 @@ assemble_insn (const struct arc_opcode *opcode,
 		  reloc = ARC_RELOC_TABLE (t->X_md)->reloc;
 		  if (arc_opcode_len (opcode) == 2
 		      || opcode->insn_class == JUMP)
-		    as_bad_where (frag_now->fr_file, frag_now->fr_line,
-				  _("Unable to use @pcl relocation for insn %s"),
-				  opcode->name);
+		    as_bad (_("Unable to use @pcl relocation for insn %s"),
+			    opcode->name);
 		}
 	      else
 		{
@@ -4130,8 +4130,9 @@ assemble_insn (const struct arc_opcode *opcode,
   /* Check if the current instruction is legally used.  */
   if (arc_last_insns[1].has_delay_slot
       && is_br_jmp_insn_p (arc_last_insns[0].opcode))
-    as_bad_where (frag_now->fr_file, frag_now->fr_line,
-		  _("A jump/branch instruction in delay slot."));
+    as_bad (_("Insn %s has a jump/branch instruction %s in its delay slot."),
+	    arc_last_insns[1].opcode->name,
+	    arc_last_insns[0].opcode->name);
 }
 
 void
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 6250793..6c1091e 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -66,8 +66,11 @@
 #define HLE_PREFIX	REP_PREFIX
 #define BND_PREFIX	REP_PREFIX
 #define LOCK_PREFIX	5
-#define REX_PREFIX	6       /* must come last.  */
-#define MAX_PREFIXES	7	/* max prefixes per opcode */
+/* Only one of NOTRACK_PREFIX and SEG_PREFIX can be used at the same
+   time.  */
+#define NOTRACK_PREFIX	6
+#define REX_PREFIX	7       /* must come last.  */
+#define MAX_PREFIXES	8	/* max prefixes per opcode */
 
 /* we define the syntax here (modulo base,index,scale syntax) */
 #define REGISTER_PREFIX '%'
@@ -388,6 +391,9 @@ struct _i386_insn
     /* Have BND prefix.  */
     const char *bnd_prefix;
 
+    /* Have NOTRACK prefix.  */
+    const char *notrack_prefix;
+
     /* Error message.  */
     enum i386_error error;
   };
@@ -2144,6 +2150,7 @@ enum PREFIX_GROUP
   PREFIX_EXIST = 0,
   PREFIX_LOCK,
   PREFIX_REP,
+  PREFIX_DS,
   PREFIX_OTHER
 };
 
@@ -2152,7 +2159,8 @@ enum PREFIX_GROUP
    same class already exists.
    b. PREFIX_LOCK if lock prefix is added.
    c. PREFIX_REP if rep/repne prefix is added.
-   d. PREFIX_OTHER if other prefix is added.
+   d. PREFIX_DS if ds prefix is added.
+   e. PREFIX_OTHER if other prefix is added.
  */
 
 static enum PREFIX_GROUP
@@ -2177,8 +2185,10 @@ add_prefix (unsigned int prefix)
 	default:
 	  abort ();
 
-	case CS_PREFIX_OPCODE:
 	case DS_PREFIX_OPCODE:
+	  ret = PREFIX_DS;
+	  /* Fall through.  */
+	case CS_PREFIX_OPCODE:
 	case ES_PREFIX_OPCODE:
 	case FS_PREFIX_OPCODE:
 	case GS_PREFIX_OPCODE:
@@ -3702,6 +3712,15 @@ md_assemble (char *line)
   if (i.bnd_prefix && !i.tm.opcode_modifier.bndprefixok)
     as_bad (_("expecting valid branch instruction after `bnd'"));
 
+  /* Check NOTRACK prefix.  */
+  if (i.notrack_prefix
+      && (!i.tm.opcode_modifier.notrackprefixok
+	  || i.reg_operands != 1
+	  || i.disp_operands != 0
+	  || i.mem_operands != 0
+	  || i.imm_operands != 0))
+    as_bad (_("expecting register indirect branch instruction after `notrack'"));
+
   if (i.tm.cpu_flags.bitfield.cpumpx)
     {
       if (flag_code == CODE_64BIT && i.prefix[ADDR_PREFIX])
@@ -3964,20 +3983,42 @@ parse_insn (char *line, char *mnemonic)
 	  else
 	    {
 	      /* Add prefix, checking for repeated prefixes.  */
-	      switch (add_prefix (current_templates->start->base_opcode))
+	      enum PREFIX_GROUP p
+		= add_prefix (current_templates->start->base_opcode);
+	      if (p == PREFIX_DS
+		  && current_templates->start->cpu_flags.bitfield.cpucet)
 		{
-		case PREFIX_EXIST:
-		  return NULL;
-		case PREFIX_REP:
-		  if (current_templates->start->cpu_flags.bitfield.cpuhle)
-		    i.hle_prefix = current_templates->start->name;
-		  else if (current_templates->start->cpu_flags.bitfield.cpumpx)
-		    i.bnd_prefix = current_templates->start->name;
-		  else
-		    i.rep_prefix = current_templates->start->name;
-		  break;
-		default:
-		  break;
+		  i.notrack_prefix = current_templates->start->name;
+		  /* Move NOTRACK_PREFIX_OPCODE to NOTRACK_PREFIX slot so
+		     that it is placed before others.  */
+		  i.prefix[SEG_PREFIX] = 0;
+		  i.prefix[NOTRACK_PREFIX] = NOTRACK_PREFIX_OPCODE;
+		}
+	      else
+		{
+		  switch (p)
+		    {
+		    case PREFIX_EXIST:
+		      return NULL;
+		    case PREFIX_REP:
+		      if (current_templates->start->cpu_flags.bitfield.cpuhle)
+			i.hle_prefix = current_templates->start->name;
+		      else if (current_templates->start->cpu_flags.bitfield.cpumpx)
+			i.bnd_prefix = current_templates->start->name;
+		      else
+			i.rep_prefix = current_templates->start->name;
+		      break;
+		    default:
+		      break;
+		    }
+
+		  if (i.notrack_prefix != NULL)
+		    {
+		      /* There must be no other prefixes after NOTRACK
+			 prefix.  */
+		      as_bad (_("expecting no other prefixes after `notrack'"));
+		      return NULL;
+		    }
 		}
 	    }
 	  /* Skip past PREFIX_SEPARATOR and reset token_start.  */
diff --git a/gas/configure b/gas/configure
index d3ae96e..96fa7cb 100755
--- a/gas/configure
+++ b/gas/configure
@@ -12583,7 +12583,7 @@ $as_echo "#define NDS32_DEFAULT_AUDIO_EXT 1" >>confdefs.h
 $as_echo "$enable_audio_ext" >&6; }
 	;;
 
-      i386 | riscv | s390 | sparc)
+      aarch64 | i386 | riscv | s390 | sparc)
 	if test $this_target = $target ; then
 
 cat >>confdefs.h <<_ACEOF
diff --git a/gas/configure.ac b/gas/configure.ac
index cc70aa7..da161b7 100644
--- a/gas/configure.ac
+++ b/gas/configure.ac
@@ -511,7 +511,7 @@ changequote([,])dnl
 	AC_MSG_RESULT($enable_audio_ext)
 	;;
 
-      i386 | riscv | s390 | sparc)
+      aarch64 | i386 | riscv | s390 | sparc)
 	if test $this_target = $target ; then
 	  AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.])
 	fi
diff --git a/gas/configure.tgt b/gas/configure.tgt
index ca58b69..9d5e781 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -46,8 +46,8 @@ eval `echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
 # endian and arch.
 # Note: This table is alpha-sorted, please try to keep it that way.
 case ${cpu} in
-  aarch64)		cpu_type=aarch64 endian=little ;;
-  aarch64_be)		cpu_type=aarch64 endian=big ;;
+  aarch64)		cpu_type=aarch64 endian=little arch=aarch64;;
+  aarch64_be)		cpu_type=aarch64 endian=big arch=aarch64;;
   alpha*)		cpu_type=alpha ;;
   am33_2.0)		cpu_type=mn10300 endian=little ;;
   arc*eb)		cpu_type=arc endian=big ;;
@@ -126,7 +126,10 @@ generic_target=${cpu_type}-$vendor-$os
 case ${generic_target} in
   aarch64*-*-elf*)			fmt=elf;;
   aarch64*-*-fuchsia*)			fmt=elf;;
-  aarch64*-*-linux*)			fmt=elf em=linux ;;
+  aarch64*-*-linux*)			fmt=elf em=linux
+    case ${cpu}-${os} in
+      aarch64*-linux-gnu_ilp32)		arch=aarch64:32 ;;
+    esac ;;
 
   alpha-*-*vms*)			fmt=evax ;;
   alpha-*-osf*)				fmt=ecoff ;;
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index c1d6af7..67a7a13 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -385,6 +385,9 @@ if [expr ([istarget "i*86-*-*"] ||  [istarget "x86_64-*-*"]) && [gas_32_check]]
     run_dump_test "cet"
     run_dump_test "cet-intel"
     run_dump_test "pseudos"
+    run_dump_test "notrack"
+    run_dump_test "notrack-intel"
+    run_list_test "notrackbad" "-al"
 
     # These tests require support for 8 and 16 bit relocs,
     # so we only run them for ELF and COFF targets.
@@ -805,6 +808,9 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
     run_dump_test "x86-64-cet"
     run_dump_test "x86-64-cet-intel"
     run_dump_test "x86-64-pseudos"
+    run_dump_test "x86-64-notrack"
+    run_dump_test "x86-64-notrack-intel"
+    run_list_test "x86-64-notrackbad" "-al"
 
     if { ![istarget "*-*-aix*"]
       && ![istarget "*-*-beos*"]
diff --git a/gas/testsuite/gas/i386/notrack-intel.d b/gas/testsuite/gas/i386/notrack-intel.d
new file mode 100644
index 0000000..b99e194
--- /dev/null
+++ b/gas/testsuite/gas/i386/notrack-intel.d
@@ -0,0 +1,29 @@
+#source: notrack.s
+#objdump: -dw -Mintel
+#name: i386 NOTRACK prefix (Intel disassembly)
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <_start>:
+[ 	]*[a-f0-9]+:	3e ff d0             	notrack call eax
+[ 	]*[a-f0-9]+:	66 3e ff d0          	notrack call ax
+[ 	]*[a-f0-9]+:	3e ff e0             	notrack jmp eax
+[ 	]*[a-f0-9]+:	66 3e ff e0          	notrack jmp ax
+[ 	]*[a-f0-9]+:	f2 3e ff d0          	bnd notrack call eax
+[ 	]*[a-f0-9]+:	66 f2 3e ff d0       	bnd notrack call ax
+[ 	]*[a-f0-9]+:	f2 3e ff e0          	bnd notrack jmp eax
+[ 	]*[a-f0-9]+:	66 f2 3e ff e0       	bnd notrack jmp ax
+[ 	]*[a-f0-9]+:	3e ff d0             	notrack call eax
+[ 	]*[a-f0-9]+:	66 3e ff d0          	notrack call ax
+[ 	]*[a-f0-9]+:	3e ff e0             	notrack jmp eax
+[ 	]*[a-f0-9]+:	66 3e ff e0          	notrack jmp ax
+[ 	]*[a-f0-9]+:	f2 3e ff d0          	bnd notrack call eax
+[ 	]*[a-f0-9]+:	66 f2 3e ff d0       	bnd notrack call ax
+[ 	]*[a-f0-9]+:	f2 3e ff e0          	bnd notrack jmp eax
+[ 	]*[a-f0-9]+:	66 f2 3e ff e0       	bnd notrack jmp ax
+[ 	]*[a-f0-9]+:	3e f2 ff d0          	ds bnd call eax
+[ 	]*[a-f0-9]+:	3e 66 ff d0          	ds call ax
+#pass
diff --git a/gas/testsuite/gas/i386/notrack.d b/gas/testsuite/gas/i386/notrack.d
new file mode 100644
index 0000000..eda09eb
--- /dev/null
+++ b/gas/testsuite/gas/i386/notrack.d
@@ -0,0 +1,28 @@
+#objdump: -dw
+#name: i386 NOTRACK prefix
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] 3+ messages in thread
* [SCM]  users/jkratoch/indexcxx-nameswrite: Merge branch 'indexcxx' into indexcxx-nameswrite
@ 2017-04-29 22:28 jkratoch
  0 siblings, 0 replies; 3+ messages in thread
From: jkratoch @ 2017-04-29 22:28 UTC (permalink / raw)
  To: archer-commits

The branch, users/jkratoch/indexcxx-nameswrite has been updated
       via  90ce9379105f3c780affda2e825b9e9f91cb4710 (commit)
       via  98bebcd98b51d05daf04b0d5c4d7f6e112597c57 (commit)
       via  a941291cab71b9ac356e1c03968c177c03e602ab (commit)
       via  45ce1b47e4490993b5c1a04f4a8acb62d9ec5039 (commit)
       via  a93866c8bfd4ad4b32c81e73e6a73aa9d831d350 (commit)
       via  0749542484129e77a30f1089d6d671197be5035f (commit)
       via  deb1fa3edaf10c65d1f39951779927da955e3a57 (commit)
       via  b421c83cb866120ab347d60fda20fb0e2011be8c (commit)
       via  ef79d9a3c6ed1e3ccd466bae76956019a7c5d376 (commit)
       via  f8fdb78eafb3f70661f6e4a43beb004dde9e0921 (commit)
       via  9ccbfd7bc1b7228d67f2d4ca878224d493918264 (commit)
       via  76e75227c37bc058449a09fe5017eeb40cda0781 (commit)
       via  51046d9e60727cd6a4cfeae29a05ce2e1e394dc9 (commit)
       via  4023ae762ed9b52e4925242b705d0b3a50f6ed13 (commit)
       via  af43057bafa7260dbcc453d2acc47eb63b974c50 (commit)
       via  b091120773f8a740065b6449617cfbf1e0e789f4 (commit)
       via  6c401f72e979ddd7e2f890dcc88f93f683233d74 (commit)
       via  d0e449a1865c741c5e0c9d43a7d61a0621163aa7 (commit)
       via  434a40239548115cf04a80410e4f570f35c361c1 (commit)
       via  1670f9c1546818c4ffe02e8f460df1c1c4b1601d (commit)
       via  d6f48aed23d1004a4ed8ab3b2742b0bf7c838c1c (commit)
       via  428544e8ae6252a615a3100889f3df7d2c5483c4 (commit)
       via  750eaa47f10f48d19aacbec74ab6867da0164677 (commit)
       via  4621115fe529869e938dca605bb90190ea52316a (commit)
       via  b06b2c92c06cf100f259f218337d007ee0b1c884 (commit)
       via  4e3afec278d1fb55b983751d02119f65566bd094 (commit)
       via  d949ff5607b9f595e0eed2ff15fbe5eb84eb3a34 (commit)
       via  339053c29abac25e5f86a1ccccd4e8e3b2d362df (commit)
       via  7974a6050b6e2c44722a533e2d5d9131e7db00ff (commit)
       via  343b374c61f793f745b820c3cf61f69186566b18 (commit)
       via  e15c3eb45bdc8bd5717fd5ceddcc30c3de07b58f (commit)
       via  5b66fac4bad619766fb1a5f5179c08b67d48a8c5 (commit)
       via  72bc1d246686ff38ef01f5a35769ebdbe39f023c (commit)
       via  de9a3c4285fad1914929ee304ddaa26e76af8031 (commit)
       via  da3d25afa26476bf24247b8696fd00ab31f39db9 (commit)
       via  fba37edd96c8dc65a63bd5b4fef5366de45b165a (commit)
       via  1f78f649e868979d36490d7c2ea0b3d41abc5ec6 (commit)
       via  55bcecda5703eb4647165cb3ddb86aed63fd44d2 (commit)
       via  14f72d45a22f25f6d00a62fc03bcf9827df226f5 (commit)
       via  1425c41dcd68350d9be9670910c547cc7ab91e0e (commit)
       via  5c99fcf8031bcf96f2c948e9fc5d3b03c97f631a (commit)
       via  f2d830a50def7a00a911620a3e9c7d920e5ef0f0 (commit)
       via  76c20d54ca5042e11af9ddf5723cc24cf47736ec (commit)
       via  d7153c4ac333c9127c18efcf184607d368bb142d (commit)
       via  641338d8e9b62bde9672f13f0dca2324b61e46e2 (commit)
       via  21d68fcd0c2f9113369d860ee1e5841bfacc35ff (commit)
       via  a61d92b7bd4da998dd5d73e9205b4871f7c4825d (commit)
       via  7a81a73b2e5d00b76e15d97db7b8f0c9809ba1b7 (commit)
       via  ce8ad8721313d288a05a95b62d95ca43db584ebb (commit)
       via  97d343d40012b1030f1fd219f91efcab180fb3ef (commit)
       via  04b31182bf3f8a1a76e995bdfaaaab4c009b9cb2 (commit)
       via  d21f3ddb0d5f95aff5c769ae283ce5522262f48d (commit)
       via  740a463062bd5d1641bdfb639295dafe89341b9b (commit)
       via  3e6b644558f941d3fe482e15efbc53d8f39ef8b7 (commit)
       via  b41c5a85a734b9ca813d4a314b66ef4b4b4d1b11 (commit)
       via  23ec1e32b1ab714649a7c25e49b5d721fe3bd3db (commit)
       via  c46cec3a8cfe02fbe0f6c67ba53abc5369c5c659 (commit)
       via  bbdd9a6894d7875407da59d490faf5588163d21c (commit)
       via  e63d123268f23a4cbc45ee55fb6dbc7d84729da3 (commit)
       via  c185f580b2b3baf7cee762c8ab31ab6925b9534a (commit)
       via  19c4559475791cd70e319eaf5c1e23d23d9ae81e (commit)
       via  03def0812a9ee962d9dcfe9b0ba37783e58acfb8 (commit)
       via  4658f12e9c5ec0d2efb04f1688f6cd6bd9f1a47d (commit)
       via  c4ab9505b53cdc899506ed421fddb7e1f8faf7a3 (commit)
       via  919383ac718c2a3187ee2a9ad659daa22da26258 (commit)
       via  126124cc0f3f0417913bfd84d83e4e525b6facf9 (commit)
       via  be6a24d8eabdbeef32a9d79e81307af4491fcf56 (commit)
       via  d581dda88162831ebbd0757312fa93681d945327 (commit)
       via  0348fd79d4c32243d91e8a55f20f408a9b4ec20d (commit)
       via  6e3d1f0728d980a384c5aa63ce7f2ff3919c5024 (commit)
       via  adc1273cb27286452ed8b32c5ca3ea263b4854f0 (commit)
       via  debed3db4887483552103da36d180967ef0dca5f (commit)
       via  d28b6364b1fba1c0270c001f0d82a69e351e1922 (commit)
       via  b0b92aeb3828219075fce23543fb39fee8608e99 (commit)
       via  16c4d54a71d8052988ed9c8005a03a7f934245f4 (commit)
       via  b5c3668253b909fd1f5b011893a35bb8dfd3be9b (commit)
       via  5625a2864147f4d92b22edfeeab7600818988be2 (commit)
       via  23bcc18f470ee4364bd362a8b78c6c1415a9dadb (commit)
       via  a49abe0bb18e04d3a4b692995fcfae70cd470775 (commit)
       via  9e9821ddd80c0d0b3dda54d34cc8867f256d4583 (commit)
       via  0dc9a308a1ec9675bf6b33bae9e8b1faa0bad9ed (commit)
       via  46aed380156e5dcac1091eb7ca986947f9b5247e (commit)
       via  e1ba30532c6de26a14404ab4919bb591e8da3eab (commit)
       via  2c010169bb8392c28f662e989311f8f23a001f74 (commit)
       via  bb8fec0bdcdb16deb2cdadabfa2f80187feee5b8 (commit)
       via  e662f84f5d6d014746550ce3d3f623583c043ff0 (commit)
       via  1587442d37ee4266e54d59bfdc783574f0587aff (commit)
       via  534455547021f3262fa60d32cabb626af01692a3 (commit)
       via  8b353c47b70568ab9f0cfd619b7a19e931c2b0c8 (commit)
       via  957f6b39cab6cac0e4c54e650c7f75109544ac1d (commit)
       via  9ad8982091eeb76b380e459fe721aaeacf7b8f24 (commit)
       via  42354845ae5e00ec1c3519e1f2166b79a9533401 (commit)
       via  7034215fd6d99f275998f7f0f8a346ab35fcbee6 (commit)
       via  b02cd3e978e9273074f7cbe2ca1d5b372225a56d (commit)
       via  7eacd66b086cabb1daab20890d5481894d4f56b2 (commit)
       via  bce964aa6c777d236fbd641f2bc7bb931cfe4bf3 (commit)
       via  97e83a100aa8250be783304bfe0429761c6e6b6b (commit)
       via  f082820db966c79e47a143da774700055a1fad41 (commit)
       via  b43eea27e99f5fd270b3bec455054ea53ac700bb (commit)
       via  bf1554384b186b448904dbc13ee5374239c88520 (commit)
       via  10f489e57677e670bf980e93896762594e9ad908 (commit)
       via  0092b74da6d86185c4d0c0fa0f540b97647bf44a (commit)
       via  a14a62ddff9eadbb8a7ad101ab06b02e44b6c00a (commit)
       via  46b9c12945629fffb61001a8f13a37c96675c0b7 (commit)
       via  2e78302469502f4f8a98144b60c09d4d9b6438fd (commit)
      from  f037c45796b4b47969b17cab1355366eb461f2d1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 90ce9379105f3c780affda2e825b9e9f91cb4710
Merge: 46aed38 98bebcd
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sat Apr 29 23:58:47 2017 +0200

    Merge branch 'indexcxx' into indexcxx-nameswrite

commit 46aed380156e5dcac1091eb7ca986947f9b5247e
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Apr 24 22:30:51 2017 +0200

    .

commit 2c010169bb8392c28f662e989311f8f23a001f74
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Apr 24 21:59:50 2017 +0200

    .

commit bb8fec0bdcdb16deb2cdadabfa2f80187feee5b8
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Apr 24 21:38:01 2017 +0200

    .

-----------------------------------------------------------------------

Summary of changes:
 bfd/ChangeLog                                      |  191 +++++
 bfd/bfd-in2.h                                      |   12 +
 bfd/compress.c                                     |   19 +-
 bfd/dwarf2.c                                       |    2 +-
 bfd/elf-bfd.h                                      |   30 +-
 bfd/elf-eh-frame.c                                 |  162 ++++-
 bfd/elf-properties.c                               |   11 +-
 bfd/elf.c                                          |   67 +-
 bfd/elf32-i386.c                                   |  230 +++---
 bfd/elf32-m32c.c                                   |    3 +-
 bfd/elf32-msp430.c                                 |    3 +-
 bfd/elf32-ppc.c                                    |   38 +-
 bfd/elf64-ppc.c                                    |   28 +-
 bfd/elf64-x86-64.c                                 |  326 ++++----
 bfd/elflink.c                                      |   48 +-
 bfd/elfxx-mips.c                                   |    2 +-
 bfd/elfxx-mips.h                                   |    3 +-
 bfd/elfxx-target.h                                 |    8 +-
 bfd/reloc.c                                        |   29 +-
 bfd/section.c                                      |   24 +-
 bfd/version.h                                      |    2 +-
 binutils/ChangeLog                                 |   80 ++
 binutils/ar.c                                      |   13 +-
 binutils/bucomm.c                                  |    3 +
 binutils/dwarf.c                                   |   98 ++-
 binutils/objdump.c                                 |    7 +-
 binutils/readelf.c                                 |  175 ++++-
 binutils/testsuite/binutils-all/mips/mips.exp      |    2 +
 .../testsuite/binutils-all/mips/mips16-alias.d     |   15 +
 .../testsuite/binutils-all/mips/mips16-alias.s     |   20 +
 .../testsuite/binutils-all/mips/mips16-noalias.d   |   16 +
 binutils/testsuite/binutils-all/note-2-32.s        |   32 +-
 binutils/testsuite/binutils-all/note-2-64.s        |   34 +-
 gas/ChangeLog                                      |  114 +++
 gas/config/tc-arm.c                                |   14 +-
 gas/config/tc-mips.c                               |  316 ++++----
 gas/config/tc-sparc.c                              |    9 +-
 gas/symbols.c                                      |   16 +-
 gas/testsuite/gas/arc/b.d                          |    8 +-
 gas/testsuite/gas/arc/leave_enter.d                |   41 +-
 gas/testsuite/gas/arc/leave_enter.s                |   11 +
 gas/testsuite/gas/arc/noargs_hs.d                  |    2 +-
 .../arm/thumb2_ldr_immediate_highregs_armv6t2.d    |   24 +-
 .../arm/thumb2_ldr_immediate_highregs_armv6t2.s    |   16 +-
 gas/testsuite/gas/mips/mips.exp                    |    9 +
 gas/testsuite/gas/mips/mips16-branch-addend-4.d    |   30 +
 gas/testsuite/gas/mips/mips16-branch-addend-4.s    |   24 +
 gas/testsuite/gas/mips/mips16-branch-addend-5.d    |    4 +
 gas/testsuite/gas/mips/mips16-branch-addend-5.l    |   11 +
 gas/testsuite/gas/mips/mips16-branch-addend-5.s    |   24 +
 gas/testsuite/gas/mips/option-pic-relax-0.d        |   21 +
 gas/testsuite/gas/mips/option-pic-relax-0.s        |   15 +
 gas/testsuite/gas/mips/option-pic-relax-1.d        |   18 +
 gas/testsuite/gas/mips/option-pic-relax-1.s        |   12 +
 gas/testsuite/gas/mips/option-pic-relax-2.d        |   28 +
 gas/testsuite/gas/mips/option-pic-relax-2.l        |    2 +
 gas/testsuite/gas/mips/option-pic-relax-2.s        |   19 +
 gas/testsuite/gas/mips/option-pic-relax-3.d        |   20 +
 gas/testsuite/gas/mips/option-pic-relax-3.l        |    2 +
 gas/testsuite/gas/mips/option-pic-relax-3.s        |   16 +
 gas/testsuite/gas/mips/option-pic-relax-3a.d       |    9 +
 gas/testsuite/gas/mips/option-pic-relax-4.d        |   28 +
 gas/testsuite/gas/mips/option-pic-relax-4.l        |    2 +
 gas/testsuite/gas/mips/option-pic-relax-4.s        |   20 +
 gas/testsuite/gas/mips/option-pic-relax-5.d        |   20 +
 gas/testsuite/gas/mips/option-pic-relax-5.l        |    2 +
 gas/testsuite/gas/mips/option-pic-relax-5.s        |   17 +
 gas/testsuite/gas/sparc/call-relax-aout.d          |   19 +
 gas/testsuite/gas/sparc/call-relax.d               |   18 +
 gas/testsuite/gas/sparc/call-relax.s               |   10 +
 gas/testsuite/gas/sparc/sparc.exp                  |    4 +
 gdb/ChangeLog                                      |  440 +++++++++++
 gdb/aarch64-tdep.c                                 |    1 -
 gdb/ada-lang.c                                     |   19 +-
 gdb/ada-tasks.c                                    |    4 +-
 gdb/annotate.h                                     |   11 +
 gdb/arch-utils.c                                   |    9 +
 gdb/arch-utils.h                                   |    6 +
 gdb/arm-tdep.c                                     |    1 -
 gdb/auto-load.c                                    |   16 +-
 gdb/breakpoint.c                                   |   81 +--
 gdb/breakpoint.h                                   |  125 ++--
 gdb/btrace.c                                       |   23 +-
 gdb/cli/cli-setshow.c                              |   15 +-
 gdb/common/common-defs.h                           |    1 +
 gdb/common/enum-flags.h                            |   10 -
 gdb/common/function-view.h                         |   40 +-
 gdb/common/poison.h                                |   87 +++
 gdb/common/traits.h                                |   43 +-
 gdb/cp-abi.c                                       |    5 +-
 gdb/disasm.c                                       |   19 +-
 gdb/doublest.c                                     |    3 +-
 gdb/dwarf2-frame.c                                 |   92 +--
 gdb/dwarf2-frame.h                                 |   58 ++
 gdb/dwarf2read.c                                   |   64 ++-
 gdb/gdb_bfd.c                                      |    4 +-
 gdb/gdbarch.c                                      |   23 +
 gdb/gdbarch.h                                      |    7 +
 gdb/gdbarch.sh                                     |    3 +
 gdb/gdbtypes.c                                     |  106 ++--
 gdb/gdbtypes.h                                     |   13 +-
 gdb/ia64-tdep.c                                    |   61 +-
 gdb/infcmd.c                                       |   14 +-
 gdb/inferior.c                                     |    5 +-
 gdb/linux-thread-db.c                              |    3 +-
 gdb/mi/mi-cmd-file.c                               |    5 +-
 gdb/mi/mi-cmd-info.c                               |   10 +-
 gdb/mi/mi-cmd-stack.c                              |   28 +-
 gdb/mi/mi-cmd-var.c                                |   21 +-
 gdb/mi/mi-interp.c                                 |   12 +-
 gdb/mi/mi-main.c                                   |  110 +--
 gdb/mi/mi-symbol-cmds.c                            |    8 +-
 gdb/mips-linux-nat.c                               |    5 +-
 gdb/mips-tdep.c                                    |    2 +-
 gdb/nds32-tdep.c                                   |   23 +-
 gdb/nto-tdep.c                                     |   35 +-
 gdb/osdata.c                                       |   29 +-
 gdb/probe.c                                        |    5 +-
 gdb/progspace.c                                    |    4 +-
 gdb/python/py-inferior.c                           |    7 +-
 gdb/record-btrace.c                                |   22 +-
 gdb/regcache.c                                     |  785 +++++++++++---------
 gdb/regcache.h                                     |  166 ++++-
 gdb/remote.c                                       |   11 +-
 gdb/skip.c                                         |    5 +-
 gdb/solib-aix.c                                    |  110 ++--
 gdb/solib-darwin.c                                 |   32 +-
 gdb/solib-dsbt.c                                   |   39 +-
 gdb/solib-frv.c                                    |  110 ++--
 gdb/solib-svr4.c                                   |  115 ++--
 gdb/solib-svr4.h                                   |   23 +
 gdb/solib-target.c                                 |  114 ++--
 gdb/solib.c                                        |    6 +-
 gdb/solist.h                                       |   10 +-
 gdb/sparc-tdep.c                                   |   32 +
 gdb/stack.c                                        |   44 +-
 gdb/target.c                                       |    5 +-
 gdb/testsuite/ChangeLog                            |   23 +
 gdb/testsuite/gdb.base/environ.exp                 |  302 ++-------
 gdb/testsuite/gdb.base/info-program.exp            |   45 ++
 gdb/testsuite/gdb.cp/oranking.cc                   |   22 +
 gdb/testsuite/gdb.cp/oranking.exp                  |    9 +-
 gdb/testsuite/gdb.cp/rvalue-ref-overload.exp       |    1 -
 gdb/testsuite/gdb.cp/rvalue-ref-params.exp         |    1 -
 gdb/thread.c                                       |   30 +-
 gdb/tracepoint.c                                   |   44 +-
 gdb/windows-nat.c                                  |   52 +-
 gdb/xcoffread.c                                    |   68 ++-
 gdb/xtensa-tdep.c                                  |   21 +-
 gold/ChangeLog                                     |    4 +
 gold/testsuite/plugin_section_order.c              |    1 +
 ld/ChangeLog                                       |   60 ++
 ld/testsuite/config/default.exp                    |   37 +
 ld/testsuite/ld-elf/shared.exp                     |   86 +++
 ld/testsuite/ld-i386/i386.exp                      |    1 +
 ld/testsuite/ld-i386/pr12570a.d                    |    1 +
 ld/testsuite/ld-i386/pr12570b.d                    |    1 +
 ld/testsuite/ld-i386/tls.exp                       |  111 +++
 ld/testsuite/ld-i386/tlsdesc1a.c                   |   19 +
 ld/testsuite/ld-i386/tlsdesc1b.c                   |    8 +
 ld/testsuite/ld-i386/tlsdesc2.d                    |   10 +
 ld/testsuite/ld-i386/vxworks2.sd                   |    2 +-
 ld/testsuite/ld-ifunc/ifunc.exp                    |   99 +++
 ld/testsuite/ld-mips-elf/mips-elf.exp              |   10 +
 ld/testsuite/ld-mips-elf/pr21334.dd                |   10 +
 ld/testsuite/ld-mips-elf/pr21334.gd                |   11 +
 ld/testsuite/ld-mips-elf/pr21334.ld                |    9 +
 ld/testsuite/ld-mips-elf/pr21334.s                 |   20 +
 ld/testsuite/ld-sparc/tlssunbin64.dd               |    2 +-
 ld/testsuite/ld-sparc/tlssunnopic64.dd             |    2 +-
 ld/testsuite/ld-sparc/tlssunpic64.dd               |    2 +-
 ld/testsuite/ld-x86-64/no-plt-1e.nd                |    7 +
 ld/testsuite/ld-x86-64/no-plt.exp                  |    2 +-
 ld/testsuite/ld-x86-64/pr21038a.d                  |    6 +-
 ld/testsuite/ld-x86-64/pr21038c.d                  |    4 +-
 ld/testsuite/ld-x86-64/tls.exp                     |  116 +++
 ld/testsuite/ld-x86-64/tlsdesc1a.c                 |   19 +
 ld/testsuite/ld-x86-64/tlsdesc1b.c                 |    8 +
 ld/testsuite/ld-x86-64/tlsdesc2.d                  |   10 +
 ld/testsuite/ld-x86-64/x86-64.exp                  |    1 +
 opcodes/ChangeLog                                  |   27 +
 opcodes/aarch64-opc.c                              |    4 +-
 opcodes/arc-dis.c                                  |   19 +-
 opcodes/arc-opc.c                                  |   20 +-
 opcodes/arc-tbl.h                                  |    8 +-
 opcodes/mips-dis.c                                 |    3 +
 opcodes/mips16-opc.c                               |   12 +-
 sim/aarch64/ChangeLog                              |   11 +
 sim/aarch64/simulator.c                            |  290 +++-----
 sim/testsuite/sim/aarch64/ChangeLog                |    9 +
 sim/testsuite/sim/aarch64/fcvtz.s                  |    1 +
 sim/testsuite/sim/aarch64/fstur.s                  |    1 +
 sim/testsuite/sim/aarch64/ldn_multiple.s           |  136 ++++
 sim/testsuite/sim/aarch64/ldn_single.s             |    2 +
 sim/testsuite/sim/aarch64/ldnr.s                   |    2 +
 sim/testsuite/sim/aarch64/mla.s                    |    2 +
 sim/testsuite/sim/aarch64/mls.s                    |    2 +
 sim/testsuite/sim/aarch64/stn_multiple.s           |  171 +++++
 sim/testsuite/sim/aarch64/stn_single.s             |   24 +-
 sim/testsuite/sim/aarch64/sumulh.s                 |    3 -
 sim/testsuite/sim/aarch64/uzp.s                    |    2 +
 201 files changed, 5442 insertions(+), 2657 deletions(-)
 create mode 100644 binutils/testsuite/binutils-all/mips/mips16-alias.d
 create mode 100644 binutils/testsuite/binutils-all/mips/mips16-alias.s
 create mode 100644 binutils/testsuite/binutils-all/mips/mips16-noalias.d
 create mode 100644 gas/testsuite/gas/mips/mips16-branch-addend-4.d
 create mode 100644 gas/testsuite/gas/mips/mips16-branch-addend-4.s
 create mode 100644 gas/testsuite/gas/mips/mips16-branch-addend-5.d
 create mode 100644 gas/testsuite/gas/mips/mips16-branch-addend-5.l
 create mode 100644 gas/testsuite/gas/mips/mips16-branch-addend-5.s
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-0.d
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-0.s
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-1.d
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-1.s
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-2.d
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-2.l
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-2.s
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-3.d
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-3.l
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-3.s
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-3a.d
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-4.d
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-4.l
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-4.s
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-5.d
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-5.l
 create mode 100644 gas/testsuite/gas/mips/option-pic-relax-5.s
 create mode 100644 gas/testsuite/gas/sparc/call-relax-aout.d
 create mode 100644 gas/testsuite/gas/sparc/call-relax.d
 create mode 100644 gas/testsuite/gas/sparc/call-relax.s
 create mode 100644 gdb/common/poison.h
 create mode 100644 gdb/testsuite/gdb.base/info-program.exp
 create mode 100644 ld/testsuite/ld-i386/tlsdesc1a.c
 create mode 100644 ld/testsuite/ld-i386/tlsdesc1b.c
 create mode 100644 ld/testsuite/ld-i386/tlsdesc2.d
 create mode 100644 ld/testsuite/ld-mips-elf/pr21334.dd
 create mode 100644 ld/testsuite/ld-mips-elf/pr21334.gd
 create mode 100644 ld/testsuite/ld-mips-elf/pr21334.ld
 create mode 100644 ld/testsuite/ld-mips-elf/pr21334.s
 create mode 100644 ld/testsuite/ld-x86-64/no-plt-1e.nd
 create mode 100644 ld/testsuite/ld-x86-64/tlsdesc1a.c
 create mode 100644 ld/testsuite/ld-x86-64/tlsdesc1b.c
 create mode 100644 ld/testsuite/ld-x86-64/tlsdesc2.d
 create mode 100644 sim/testsuite/sim/aarch64/ldn_multiple.s
 create mode 100644 sim/testsuite/sim/aarch64/stn_multiple.s

First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ba2d134..dff6a59 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,194 @@
+2017-04-29  Alan Modra  <amodra@gmail.com>
+
+	PR 21432
+	* reloc.c (reloc_offset_in_range): New function.
+	(bfd_perform_relocation, bfd_install_relocation): Use it.
+	(_bfd_final_link_relocate): Likewise.
+
+2017-04-28  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
+	before using .plt.got.
+	* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
+
+2017-04-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
+	instead of "+=" to update 0.
+
+2017-04-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_create_dynamic_sections): Create the
+	.plt.got section here.
+	(elf_i386_check_relocs): Don't create the .plt.got section.
+	* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
+	the .plt.got and .plt.bnd sections here.
+	(elf_x86_64_check_relocs): Don't create the .plt.got nor
+	.plt.bnd sections.
+
+2017-04-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
+	has_bnd_reloc.
+	(elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
+	(elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
+	(elf_x86_64_check_relocs): Don't set has_bnd_reloc.
+	(elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
+	has_bnd_reloc.
+
+2017-04-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf-bfd.h (elf_backend_data): Change setup_gnu_properties
+	to return bfd *.
+	(_bfd_elf_link_setup_gnu_properties): Return bfd *.
+	* elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
+	the first relocatable ELF input with GNU properties.
+
+2017-04-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
+	VxWorks for non-PIC.
+
+2017-04-27  Alan Modra  <amodra@gmail.com>
+
+	* elf-bfd.h (struct elf_backend_data): Make asection param of
+	elf_backend_eh_frame_address_size const.
+	(_bfd_elf_eh_frame_address_size): Likewise.
+	* elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
+	* elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
+	* elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
+	* elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
+	* elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
+	(next_cie_fde_offset): Constify params.
+	(offset_adjust, adjust_eh_frame_local_symbols): Likewise.
+
+2017-04-27  Alan Modra  <amodra@gmail.com>
+
+	* elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
+	(_bfd_elf_adjust_eh_frame_global_symbol): Declare.
+	* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
+	aug_data_len.
+	(offset_adjust): New function.
+	(_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
+	(adjust_eh_frame_local_symbols): Likewise.
+	(_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
+	after changing anything.  Return true if anything changed.
+	* elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
+	_bfd_elf_adjust_eh_frame_global_symbol for globals.
+
+2017-04-27  Alan Modra  <amodra@gmail.com>
+
+	* elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
+	when force_local.
+
+2017-04-27  Alan Modra  <amodra@gmail.com>
+
+	* elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
+	(ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
+	(ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
+	(ppc_elf_relocate_section): Likewise.  Delete silly optimisation
+	for undef and undefweak dyn_relocs.
+	* elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
+	(ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
+	(allocate_got, allocate_dynrelocs): Likewise.
+	(ppc64_elf_relocate_section): Likewise.
+
+2017-04-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
+	DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
+	* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
+	add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
+
+2017-04-26  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/21434
+	* reloc.c (bfd_perform_relocation): Check for a negative address
+	in the reloc.
+
+2017-04-26  Maciej W. Rozycki  <macro@imgtec.com>
+
+	PR ld/21334
+	* elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
+	member.
+	* elfxx-target.h [!elf_backend_always_renumber_dynsyms]
+	(elf_backend_always_renumber_dynsyms): Define.
+	(elfNN_bed): Initialize `always_renumber_dynsyms' member.
+	* elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
+	* elflink.c (bfd_elf_size_dynamic_sections): Also call
+	`_bfd_elf_link_renumber_dynsyms' if the backend has requested
+	it.
+	(bfd_elf_size_dynsym_hash_dynstr): Likewise.
+
+2017-04-26  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elflink.c (bfd_elf_size_dynamic_sections): Only call
+	`_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
+	sections have been created.
+
+2017-04-26  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/21431
+	* compress.c (bfd_init_section_compress_status): Check the return
+	value from bfd_malloc.
+
+2017-04-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
+	no_finish_dynamic_symbol.
+	(elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
+	0.
+	(elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
+	weak symbol, don't make it dynamic.
+	(elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
+	set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
+	relocation for GOT reference.
+	(elf_x86_64_finish_dynamic_symbol): Abort if
+	no_finish_dynamic_symbol isn't 0.
+
+2017-04-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/21402
+	* elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
+	undefined weak symbol, don't make it dynamic.
+	(elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
+	set no_finish_dynamic_symbol and generate R_386_RELATIVE
+	relocation for R_386_GOT32.
+
+2017-04-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/21425
+	* elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
+
+2017-04-23  Alan Modra  <amodra@gmail.com>
+
+	PR 21414
+	* section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
+	* elf.c (lcomm_sym): New.
+	(_bfd_elf_large_com_section): Use lcomm_sym section symbol.
+	* bfd-in2.h: Regenerate.
+
+2017-04-23  Alan Modra  <amodra@gmail.com>
+
+	PR 21412
+	* elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
+	parameters and comment.
+	(_bfd_elf_get_reloc_section): Delete.
+	(_bfd_elf_plt_get_reloc_section): Declare.
+	* elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
+	New functions.  Don't blindly skip over assumed .rel/.rela prefix.
+	Extracted from..
+	(_bfd_elf_get_reloc_section): ..here.  Delete.
+	(assign_section_numbers): Call elf_get_reloc_section.
+	* elf64-ppc.c (elf_backend_get_reloc_section): Define.
+	* elfxx-target.h (elf_backend_get_reloc_section): Update.
+
+2017-04-23  Alan Modra  <amodra@gmail.com>
+
+	PR 21409
+	* dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
+	no symbols.
+
 2017-04-21  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR ld/21402
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 1d73134..17a35c0 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1839,6 +1839,18 @@ extern asection _bfd_std_section[4];
      { NULL }, { NULL }                                                \
     }
 
+/* We use a macro to initialize the static asymbol structures because
+   traditional C does not permit us to initialize a union member while
+   gcc warns if we don't initialize it.
+   the_bfd, name, value, attr, section [, udata]  */
+#ifdef __STDC__
+#define GLOBAL_SYM_INIT(NAME, SECTION) \
+  { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }}
+#else
+#define GLOBAL_SYM_INIT(NAME, SECTION) \
+  { 0, NAME, 0, BSF_SECTION_SYM, SECTION }
+#endif
+
 void bfd_section_list_clear (bfd *);
 
 asection *bfd_get_section_by_name (bfd *abfd, const char *name);
diff --git a/bfd/compress.c b/bfd/compress.c
index f881c07..c854a20 100644
--- a/bfd/compress.c
+++ b/bfd/compress.c
@@ -542,7 +542,6 @@ bfd_init_section_compress_status (bfd *abfd, sec_ptr sec)
 {
   bfd_size_type uncompressed_size;
   bfd_byte *uncompressed_buffer;
-  bfd_boolean ret;
 
   /* Error if not opened for read.  */
   if (abfd->direction != read_direction
@@ -558,18 +557,18 @@ bfd_init_section_compress_status (bfd *abfd, sec_ptr sec)
   /* Read in the full section contents and compress it.  */
   uncompressed_size = sec->size;
   uncompressed_buffer = (bfd_byte *) bfd_malloc (uncompressed_size);
+  /* PR 21431 */
+  if (uncompressed_buffer == NULL)
+    return FALSE;
+
   if (!bfd_get_section_contents (abfd, sec, uncompressed_buffer,
 				 0, uncompressed_size))
-    ret = FALSE;
-  else
-    {
-      uncompressed_size = bfd_compress_section_contents (abfd, sec,
-							 uncompressed_buffer,
-							 uncompressed_size);
-      ret = uncompressed_size != 0;
-    }
+    return FALSE;
 
-  return ret;
+  uncompressed_size = bfd_compress_section_contents (abfd, sec,
+						     uncompressed_buffer,
+						     uncompressed_size);
+  return uncompressed_size != 0;
 }
 
 /*
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 132a674..0ef3e1f 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -4205,7 +4205,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
          looking up the function by section + offset uses the
          DW_AT_decl_line from the function DW_TAG_subprogram for the line,
          which will be the line of the function name.  */
-      if ((section->flags & SEC_CODE) == 0)
+      if (symbols != NULL && (section->flags & SEC_CODE) == 0)
 	{
 	  asymbol **tmp;
 
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index af377ee..4110ace 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -326,6 +326,12 @@ struct eh_cie_fde
 	 or 0 if the CIE doesn't have any.  */
       unsigned int personality_offset : 8;
 
+      /* Length of augmentation.  aug_str_len is the length of the
+	 string including null terminator.  aug_data_len is the length
+	 of the rest up to the initial insns.  */
+      unsigned int aug_str_len : 3;
+      unsigned int aug_data_len : 5;
+
       /* True if we have marked relocations associated with this CIE.  */
       unsigned int gc_mark : 1;
 
@@ -354,7 +360,7 @@ struct eh_cie_fde
       unsigned int merged : 1;
 
       /* Unused bits.  */
-      unsigned int pad1 : 17;
+      unsigned int pad1 : 9;
     } cie;
   } u;
   unsigned int reloc_index;
@@ -1285,7 +1291,7 @@ struct elf_backend_data
      that can't be determined for some reason.  The default definition
      goes by the bfd's EI_CLASS.  */
   unsigned int (*elf_backend_eh_frame_address_size)
-    (bfd *, asection *);
+    (bfd *, const asection *);
 
   /* These functions tell elf-eh-frame whether to attempt to turn
      absolute or lsda encodings into pc-relative ones.  The default
@@ -1360,8 +1366,10 @@ struct elf_backend_data
   bfd_size_type (*maybe_function_sym) (const asymbol *sym, asection *sec,
 				       bfd_vma *code_off);
 
-  /* Return the section which RELOC_SEC applies to.  */
-  asection *(*get_reloc_section) (asection *reloc_sec);
+  /* Given NAME, the name of a relocation section stripped of its
+     .rel/.rela prefix, return the section in ABFD to which the
+     relocations apply.  */
+  asection *(*get_reloc_section) (bfd *abfd, const char *name);
 
   /* Called to set the sh_flags, sh_link and sh_info fields of OSECTION which
      has a type >= SHT_LOOS.  Returns TRUE if the fields were initialised,
@@ -1433,7 +1441,7 @@ struct elf_backend_data
 				       elf_property *);
 
   /* Set up GNU properties.  */
-  void (*setup_gnu_properties) (struct bfd_link_info *);
+  bfd *(*setup_gnu_properties) (struct bfd_link_info *);
 
   /* Encoding used for compact EH tables.  */
   int (*compact_eh_encoding) (struct bfd_link_info *);
@@ -1529,6 +1537,10 @@ struct elf_backend_data
   /* Address of protected data defined in the shared library may be
      external, i.e., due to copy relocation.   */
   unsigned extern_protected_data : 1;
+
+  /* True if `_bfd_elf_link_renumber_dynsyms' must be called even for
+     static binaries.  */
+  unsigned always_renumber_dynsyms : 1;
 };
 
 /* Information about reloc sections associated with a bfd_elf_section_data
@@ -1975,7 +1987,7 @@ extern void bfd_elf_print_symbol
   (bfd *, void *, asymbol *, bfd_print_symbol_type);
 
 extern unsigned int _bfd_elf_eh_frame_address_size
-  (bfd *, asection *);
+  (bfd *, const asection *);
 extern bfd_byte _bfd_elf_encode_eh_address
   (bfd *abfd, struct bfd_link_info *info, asection *osec, bfd_vma offset,
    asection *loc_sec, bfd_vma loc_offset, bfd_vma *encoded);
@@ -2174,6 +2186,8 @@ extern bfd_boolean _bfd_elf_end_eh_frame_parsing
 extern bfd_boolean _bfd_elf_discard_section_eh_frame
   (bfd *, struct bfd_link_info *, asection *,
    bfd_boolean (*) (bfd_vma, void *), struct elf_reloc_cookie *);
+extern bfd_boolean _bfd_elf_adjust_eh_frame_global_symbol
+  (struct elf_link_hash_entry *, void *);
 extern bfd_boolean _bfd_elf_discard_section_eh_frame_hdr
   (bfd *, struct bfd_link_info *);
 extern bfd_vma _bfd_elf_eh_frame_section_offset
@@ -2448,7 +2462,7 @@ extern bfd_boolean _bfd_elf_is_function_type (unsigned int);
 extern bfd_size_type _bfd_elf_maybe_function_sym (const asymbol *, asection *,
 						  bfd_vma *);
 
-extern asection *_bfd_elf_get_reloc_section (asection *);
+extern asection *_bfd_elf_plt_get_reloc_section (bfd *, const char *);
 
 extern int bfd_elf_get_default_section_type (flagword);
 
@@ -2593,7 +2607,7 @@ extern bfd_boolean _bfd_elf_parse_gnu_properties
   (bfd *, Elf_Internal_Note *);
 extern elf_property * _bfd_elf_get_property
   (bfd *, unsigned int, unsigned int);
-extern void _bfd_elf_link_setup_gnu_properties
+extern bfd *_bfd_elf_link_setup_gnu_properties
   (struct bfd_link_info *);
 
 /* The linker may need to keep track of the number of relocs that it
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index 1743823..52ba9c6 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -326,9 +326,9 @@ size_of_output_cie_fde (struct eh_cie_fde *entry)
 /* Return the offset of the FDE or CIE after ENT.  */
 
 static unsigned int
-next_cie_fde_offset (struct eh_cie_fde *ent,
-		     struct eh_cie_fde *last,
-		     asection *sec)
+next_cie_fde_offset (const struct eh_cie_fde *ent,
+		     const struct eh_cie_fde *last,
+		     const asection *sec)
 {
   while (++ent < last)
     {
@@ -757,6 +757,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info,
 
 	  strcpy (cie->augmentation, (char *) buf);
 	  buf = (bfd_byte *) strchr ((char *) buf, '\0') + 1;
+	  this_inf->u.cie.aug_str_len = buf - start - 1;
 	  ENSURE_NO_RELOCS (buf);
 	  if (buf[0] == 'e' && buf[1] == 'h')
 	    {
@@ -845,6 +846,8 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info,
 		    goto free_no_table;
 		  }
 	    }
+	  this_inf->u.cie.aug_data_len
+	    = buf - start - 1 - this_inf->u.cie.aug_str_len;
 
 	  /* For shared libraries, try to get rid of as many RELATIVE relocs
 	     as possible.  */
@@ -1327,6 +1330,143 @@ find_merged_cie (bfd *abfd, struct bfd_link_info *info, asection *sec,
   return new_cie->cie_inf;
 }
 
+/* For a given OFFSET in SEC, return the delta to the new location
+   after .eh_frame editing.  */
+
+static bfd_signed_vma
+offset_adjust (bfd_vma offset, const asection *sec)
+{
+  struct eh_frame_sec_info *sec_info
+    = (struct eh_frame_sec_info *) elf_section_data (sec)->sec_info;
+  unsigned int lo, hi, mid;
+  struct eh_cie_fde *ent;
+  bfd_signed_vma delta;
+
+  lo = 0;
+  hi = sec_info->count;
+  if (hi == 0)
+    return 0;
+
+  while (lo < hi)
+    {
+      mid = (lo + hi) / 2;
+      ent = &sec_info->entry[mid];
+      if (offset < ent->offset)
+	hi = mid;
+      else if (mid + 1 >= hi)
+	break;
+      else if (offset >= ent[1].offset)
+	lo = mid + 1;
+      else
+	break;
+    }
+
+  if (!ent->removed)
+    delta = (bfd_vma) ent->new_offset - (bfd_vma) ent->offset;
+  else if (ent->cie && ent->u.cie.merged)
+    {
+      struct eh_cie_fde *cie = ent->u.cie.u.merged_with;
+      delta = ((bfd_vma) cie->new_offset + cie->u.cie.u.sec->output_offset
+	       - (bfd_vma) ent->offset - sec->output_offset);
+    }
+  else
+    {
+      /* Is putting the symbol on the next entry best for a deleted
+	 CIE/FDE?  */
+      struct eh_cie_fde *last = sec_info->entry + sec_info->count;
+      delta = ((bfd_vma) next_cie_fde_offset (ent, last, sec)
+	       - (bfd_vma) ent->offset);
+      return delta;
+    }
+
+  /* Account for editing within this CIE/FDE.  */
+  offset -= ent->offset;
+  if (ent->cie)
+    {
+      unsigned int extra
+	= ent->add_augmentation_size + ent->u.cie.add_fde_encoding;
+      if (extra == 0
+	  || offset <= 9u + ent->u.cie.aug_str_len)
+	return delta;
+      delta += extra;
+      if (offset <= 9u + ent->u.cie.aug_str_len + ent->u.cie.aug_data_len)
+	return delta;
+      delta += extra;
+    }
+  else
+    {
+      unsigned int ptr_size, width, extra = ent->add_augmentation_size;
+      if (offset <= 12 || extra == 0)
+	return delta;
+      ptr_size = (get_elf_backend_data (sec->owner)
+		  ->elf_backend_eh_frame_address_size (sec->owner, sec));
+      width = get_DW_EH_PE_width (ent->fde_encoding, ptr_size);
+      if (offset <= 8 + 2 * width)
+	return delta;
+      delta += extra;
+    }
+
+  return delta;
+}
+
+/* Adjust a global symbol defined in .eh_frame, so that it stays
+   relative to its original CIE/FDE.  It is assumed that a symbol
+   defined at the beginning of a CIE/FDE belongs to that CIE/FDE
+   rather than marking the end of the previous CIE/FDE.  This matters


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-24 20:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-24 20:35 [SCM] users/jkratoch/indexcxx-nameswrite: Merge branch 'indexcxx' into indexcxx-nameswrite jkratoch
  -- strict thread matches above, loose matches on Subject: below --
2017-05-24  7:20 jkratoch
2017-04-29 22:28 jkratoch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).