public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-jankratochvil-entryval: extend the testsuite, one fix.
@ 2011-07-14 19:03 jkratoch
  0 siblings, 0 replies; only message in thread
From: jkratoch @ 2011-07-14 19:03 UTC (permalink / raw)
  To: archer-commits

The branch, archer-jankratochvil-entryval has been updated
       via  8adc27eb7807830847ea94a5e21971f503fbaa89 (commit)
       via  0f18efc847ddad3ffdabecbb063d266ffa62671a (commit)
       via  ce622db5811762bf822ca889909d75bea334ab8a (commit)
       via  127a24b4a003471ea770e560174abcd15348d83a (commit)
       via  f141e066fb2f33bac31bb0bcab162bd59e238c69 (commit)
       via  a54a489bed22532ef3f83e79af21cb57321a5844 (commit)
       via  d7c98194c92e06e2d47d6698b47e84f30a026dae (commit)
       via  b2661971598f2874b670acf6a3efc246550aa2f3 (commit)
       via  71cdc39fa1270989b8ec7e38f010bc8ef8a6f265 (commit)
       via  4634fda269b6bc0edab4d35b6fa9afd06be98f78 (commit)
       via  879758acef31c12211e13ffe500c530f3784d6f8 (commit)
       via  98b2f4f602a5110f21798dd6f3bbb2e9901cbfa2 (commit)
       via  e8482913963b4b5bc69cb22c50c77b87c4f9784d (commit)
       via  83253b72931a0824c2936c2581eea2070f570be2 (commit)
       via  f7ebcc40737dec5573a330e153ca6f6a36ca930d (commit)
       via  46ab31d2e9edfa4f1ce9f559e5966b103b58e64a (commit)
       via  982bc97186860695df5c1979f0e0a6d7d4a6d3dd (commit)
      from  2b5e6833b8b56703332fea7955f6fd43ec5dfc11 (commit)

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

- Log -----------------------------------------------------------------
commit 8adc27eb7807830847ea94a5e21971f503fbaa89
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Jul 14 21:03:21 2011 +0200

    extend the testsuite, one fix.

commit 0f18efc847ddad3ffdabecbb063d266ffa62671a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Jul 14 20:44:06 2011 +0200

    Fix FSF GDB HEAD constification compatibility.

commit ce622db5811762bf822ca889909d75bea334ab8a
Merge: f141e06 127a24b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Jul 14 20:42:04 2011 +0200

    Merge branch 'pending' into archer-jankratochvil-entryval

commit 127a24b4a003471ea770e560174abcd15348d83a
Merge: 83bc367 d7c9819
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Jul 14 20:41:49 2011 +0200

    Merge remote-tracking branch 'gdb/master' into pending

commit f141e066fb2f33bac31bb0bcab162bd59e238c69
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Jul 14 20:40:44 2011 +0200

    Fix duplicate resolving.

commit a54a489bed22532ef3f83e79af21cb57321a5844
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Jul 14 19:50:17 2011 +0200

    entry_value references fixed/implemented.
    unconstify original_value

commit d7c98194c92e06e2d47d6698b47e84f30a026dae
Author: Paul Pluzhnikov <ppluzhnikov@google.com>
Date:   Thu Jul 14 16:41:56 2011 +0000

    Cleanup: kill trailing whitespace

commit b2661971598f2874b670acf6a3efc246550aa2f3
Author: Paul Pluzhnikov <ppluzhnikov@google.com>
Date:   Thu Jul 14 16:33:21 2011 +0000

    2011-07-14  Paul Pluzhnikov  <ppluzhnikov@google.com>
    
    	* gdb.cp/minsym-fallback.exp: Link in C++ mode.

commit 71cdc39fa1270989b8ec7e38f010bc8ef8a6f265
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Jul 14 15:00:15 2011 +0000

    gdb/
    	Code cleanup - constify struct lval_funcs.
    	* dwarf2loc.c (pieced_value_funcs): Make it const.
    	* infrun.c (siginfo_value_funcs): Likewise.
    	* opencl-lang.c (opencl_value_funcs): Likewise.
    	* valops.c (value_assign, value_ind): Make the funcs variable const.
    	* value.c (struct value): Make location.computed.funcs target const.
    	Rearrange the comments.
    	(allocate_computed_value): Make the funcs parameter target const.
    	(value_computed_funcs): Return the funcs target const.
    	(value_free, value_copy, set_value_component_location): Make the funcs
    	variable const.
    	* value.h (allocate_computed_value): Make the funcs parameter target
    	const.
    	(value_computed_funcs): Return the funcs target const.
    	* windows-tdep.c (tlb_value_funcs): Make it const.

commit 4634fda269b6bc0edab4d35b6fa9afd06be98f78
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Thu Jul 14 06:22:56 2011 +0000

    	* linker.c (_bfd_generic_section_already_linked): Set l_flags.
    	* elf-bfd.h (struct already_linked): Forward declare.

commit 879758acef31c12211e13ffe500c530f3784d6f8
Author: Hui Zhu <teawater@gmail.com>
Date:   Thu Jul 14 04:46:42 2011 +0000

    2011-07-14  Hui Zhu  <teawater@gmail.com>
    
    	* remote.c (remote_get_trace_status): Initialize p.

commit 98b2f4f602a5110f21798dd6f3bbb2e9901cbfa2
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Thu Jul 14 04:02:32 2011 +0000

    whitespace regen

commit e8482913963b4b5bc69cb22c50c77b87c4f9784d
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Thu Jul 14 03:57:18 2011 +0000

    	* elflink.c (_bfd_elf_fix_symbol_flags): Loop on indirect syms.
    	(_bfd_elf_adjust_dynamic_symbol): Remove FIXME.

commit 83253b72931a0824c2936c2581eea2070f570be2
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Thu Jul 14 03:28:20 2011 +0000

    bfd/
    	* elf64-ppc.c (struct ppc_link_hash_table): Add plt_static_chain.
    	(build_plt_stub): Add plt_static_chain param, don't load r11 if false.
    	(build_tls_get_addr_stub): Likewise.
    	(ppc_build_one_stub): Update calls to above.
    	(ppc_size_one_stub): Adjust stub size.
    	(ppc64_elf_size_stubs): Add plt_static_chain param, save to htab.
    	* elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
    ld/
    	* emultempl/ppc64elf.em (plt_static_chain): New var.
    	(gld${EMULATION_NAME}_after_allocation): Pass to ppc64_elf_size_stubs.
    	(PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_LONGOPTS,
    	PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Handle
    	--plt-static-chain and --no-plt-static-chain.
    ld/testsuite/
    	* ld-powerpc/tlsexe.d, * ld-powerpc/tlsexe.g. *ld-powerpc/tlsexe.r,
    	* ld-powerpc/tlsexetoc.d, * ld-powerpc/tlsexetoc.g,
    	* ld-powerpc/tlsexetoc.r, * ld-powerpc/tlsso.d,
    	* ld-powerpc/tlstocso.d: Update for plt stub change.

commit f7ebcc40737dec5573a330e153ca6f6a36ca930d
Author: tmsriram <tmsriram>
Date:   Thu Jul 14 00:55:18 2011 +0000

    2011-07-13  Sriraman Tallam  <tmsriram@google.com>
    
    	* plugin-api.h
    	(ld_plugin_section): New struct.
    	(ld_plugin_get_section_count): New typedef.
    	(ld_plugin_get_section_type): New typedef.
    	(ld_plugin_get_section_name): New typedef.
    	(ld_plugin_get_section_contents): New typedef.
    	(ld_plugin_update_section_order): New typedef.
    	(ld_plugin_allow_section_ordering): New typedef.
    	(LDPT_GET_SECTION_COUNT): New enum value.
    	(LDPT_GET_SECTION_TYPE): New enum value.
    	(LDPT_GET_SECTION_NAME): New enum value.
    	(LDPT_GET_SECTION_CONTENTS): New enum value.
    	(LDPT_UPDATE_SECTION_ORDER): New enum value.
    	(LDPT_ALLOW_SECTION_ORDERING): New enum value.
    	(tv_get_section_count): New struct members.
    	(tv_get_section_type): New struct members.
    	(tv_get_section_name): New struct members.
    	(tv_get_section_contents): New struct members.
    	(tv_update_section_order): New struct members.
    	(tv_allow_section_ordering): New struct members.
    	* archive.cc (Archive::get_elf_object_for_member): Add extra parameter
    	to claim_file call.
    	* layout.cc (Layout::Layout): Initialize section_ordering_specified_,
    	input_section_position_, and input_section_glob_.
    	(read_layout_from_file): Call function section_ordering_specified.
    	* layout.h (is_section_ordering_specified): New function.
    	(section_ordering_specified): New function.
    	(section_ordering_specified_): New boolean member.
    	* main.cc(main): Call load_plugins after layout object is defined.
    	* output.cc (Output_section::add_input_section): Use
    	function section_ordering_specified to check if section ordering is
    	needed.
    	* output.cc (Output_section::add_relaxed_input_section): Use
    	function section_ordering_specified to check if section ordering is
    	needed.
    	(Output_section::update_section_layout): New function.
    	(Output_section::sort_attached_input_sections): Check if input section
    	must be reordered.
    	* output.h (Output_section::update_section_layout): New function.
    	* plugin.cc (get_section_count): New function.
    	(get_section_type): New function.
    	(get_section_name): New function.
    	(get_section_contents): New function.
    	(update_section_order): New function.
    	(allow_section_ordering): New function.
    	(Plugin::load): Add the new interfaces to the transfer vector.
    	(Plugin_manager::load_plugins): New parameter.
    	(Plugin_manager::all_symbols_read): New parameter.
    	(Plugin_manager::claim_file): New parameter. Save the elf object for
    	unclaimed objects.
    	(Plugin_manager::get_elf_object): New function.
    	(Plugin_manager::get_view): Change to directly use the bool to check
    	if get_view is called from claim_file_hook.
    	* plugin.h (input_objects): New function
    	(Plugin__manager::load_plugins): New parameter.
    	(Plugin_manager::claim_file): New parameter.
    	(Plugin_manager::get_elf_object): New function.
    	(Plugin_manager::in_claim_file_handler): New function.
    	(Plugin_manager::in_claim_file_handler_): New member.
    	(layout): New function.
    	* readsyms.cc (Read_symbols::do_read_symbols): Call the claim_file
    	handler with an extra parameter. Make the elf object before calling
    	claim_file handler.
    	* testsuite/plugin_test.c (get_section_count): New function pointer.
    	(get_section_type): New function pointer.
    	(get_section_name): New function pointer.
    	(get_section_contents): New function pointer.
    	(update_section_order): New function pointer.
    	(allow_section_ordering): New function pointer.
    	(onload): Check if the new interfaces exist.

commit 46ab31d2e9edfa4f1ce9f559e5966b103b58e64a
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Thu Jul 14 00:00:33 2011 +0000

    *** empty log message ***

commit 982bc97186860695df5c1979f0e0a6d7d4a6d3dd
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Thu Jul 14 00:00:05 2011 +0000

    daily update

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

Summary of changes:
 bfd/ChangeLog                                |   20 ++++
 bfd/elf-bfd.h                                |    1 +
 bfd/elf64-ppc.c                              |   32 ++++--
 bfd/elf64-ppc.h                              |    4 +-
 bfd/elflink.c                                |   10 +-
 bfd/libbfd.h                                 |    2 +-
 bfd/linker.c                                 |    1 +
 bfd/version.h                                |    2 +-
 gdb/ChangeLog                                |   22 ++++
 gdb/ada-lang.h                               |    3 +-
 gdb/ada-valprint.c                           |   49 +++++----
 gdb/c-lang.h                                 |    9 +-
 gdb/c-valprint.c                             |   30 ++++-
 gdb/cp-valprint.c                            |   10 +-
 gdb/d-lang.h                                 |    3 +-
 gdb/d-valprint.c                             |    3 +-
 gdb/dwarf2loc.c                              |  146 +++++++++++++++++---------
 gdb/dwarf2read.c                             |   32 ++----
 gdb/f-lang.h                                 |    3 +-
 gdb/f-valprint.c                             |   35 +++++--
 gdb/gdbtypes.h                               |    6 +-
 gdb/infrun.c                                 |    2 +-
 gdb/jv-lang.h                                |    3 +-
 gdb/jv-valprint.c                            |    6 +-
 gdb/language.c                               |    2 +-
 gdb/language.h                               |    2 +-
 gdb/m2-lang.h                                |    3 +-
 gdb/m2-valprint.c                            |    6 +-
 gdb/opencl-lang.c                            |    2 +-
 gdb/p-lang.h                                 |    5 +-
 gdb/p-valprint.c                             |   37 +++++--
 gdb/printcmd.c                               |   39 +++++++-
 gdb/remote.c                                 |    2 +-
 gdb/stack.c                                  |    8 +-
 gdb/testsuite/ChangeLog                      |   10 ++-
 gdb/testsuite/gdb.arch/amd64-entry-value.exp |   47 +++++++--
 gdb/testsuite/gdb.cp/minsym-fallback.exp     |    2 +-
 gdb/valops.c                                 |   15 ++-
 gdb/valprint.c                               |    7 +-
 gdb/valprint.h                               |    5 +-
 gdb/value.c                                  |   30 ++++--
 gdb/value.h                                  |   22 +++--
 gdb/version.in                               |    2 +-
 gdb/windows-tdep.c                           |    2 +-
 include/ChangeLog                            |   23 ++++
 include/plugin-api.h                         |   81 ++++++++++++++-
 46 files changed, 565 insertions(+), 221 deletions(-)

First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index be2cea2..cec63cd 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,23 @@
+2011-07-14  Alan Modra  <amodra@gmail.com>
+
+	* linker.c (_bfd_generic_section_already_linked): Set l_flags.
+	* elf-bfd.h (struct already_linked): Forward declare.
+
+2011-07-14  Alan Modra  <amodra@gmail.com>
+
+	* elflink.c (_bfd_elf_fix_symbol_flags): Loop on indirect syms.
+	(_bfd_elf_adjust_dynamic_symbol): Remove FIXME.
+
+2011-07-14  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (struct ppc_link_hash_table): Add plt_static_chain.
+	(build_plt_stub): Add plt_static_chain param, don't load r11 if false.
+	(build_tls_get_addr_stub): Likewise.
+	(ppc_build_one_stub): Update calls to above.
+	(ppc_size_one_stub): Adjust stub size.
+	(ppc64_elf_size_stubs): Add plt_static_chain param, save to htab.
+	* elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
+
 2011-07-12  Nick Clifton  <nickc@redhat.com>
 
 	* elf32-arm.c (elf32_arm_section_flags): Delete.
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 08da2ae..bf63ee8 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1797,6 +1797,7 @@ extern bfd_boolean _bfd_elf_match_sections_by_type
   (bfd *, const asection *, bfd *, const asection *);
 extern bfd_boolean bfd_elf_is_group_section
   (bfd *, const struct bfd_section *);
+struct already_linked;
 extern void _bfd_elf_section_already_linked
   (bfd *, struct already_linked *, struct bfd_link_info *);
 extern void bfd_elf_set_group_contents
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index a49ef60..bd73b5e 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -3734,6 +3734,9 @@ struct ppc_link_hash_table
   /* Number of stubs against global syms.  */
   unsigned long stub_globals;
 
+  /* Set if PLT call stubs should load r11.  */
+  unsigned int plt_static_chain:1;
+
   /* Set if we should emit symbols for stubs.  */
   unsigned int emit_stub_syms:1;
 
@@ -9253,7 +9256,8 @@ ppc_type_of_stub (asection *input_sec,
 /* Build a .plt call stub.  */
 
 static inline bfd_byte *
-build_plt_stub (bfd *obfd, bfd_byte *p, int offset, Elf_Internal_Rela *r)
+build_plt_stub (bfd *obfd, bfd_byte *p, int offset, Elf_Internal_Rela *r,
+		bfd_boolean plt_static_chain)
 {
 #define PPC_LO(v) ((v) & 0xffff)
 #define PPC_HI(v) (((v) >> 16) & 0xffff)
@@ -9286,14 +9290,15 @@ build_plt_stub (bfd *obfd, bfd_byte *p, int offset, Elf_Internal_Rela *r)
       bfd_put_32 (obfd, ADDIS_R12_R2 | PPC_HA (offset), p),	p += 4;
       bfd_put_32 (obfd, STD_R2_40R1, p),			p += 4;
       bfd_put_32 (obfd, LD_R11_0R12 | PPC_LO (offset), p),	p += 4;
-      if (PPC_HA (offset + 16) != PPC_HA (offset))
+      if (PPC_HA (offset + 8 + 8 * plt_static_chain) != PPC_HA (offset))
 	{
 	  bfd_put_32 (obfd, ADDI_R12_R12 | PPC_LO (offset), p),	p += 4;
 	  offset = 0;
 	}
       bfd_put_32 (obfd, MTCTR_R11, p),				p += 4;
       bfd_put_32 (obfd, LD_R2_0R12 | PPC_LO (offset + 8), p),	p += 4;
-      bfd_put_32 (obfd, LD_R11_0R12 | PPC_LO (offset + 16), p),	p += 4;
+      if (plt_static_chain)
+	bfd_put_32 (obfd, LD_R11_0R12 | PPC_LO (offset + 16), p), p += 4;
       bfd_put_32 (obfd, BCTR, p),				p += 4;
     }
   else
@@ -9320,13 +9325,14 @@ build_plt_stub (bfd *obfd, bfd_byte *p, int offset, Elf_Internal_Rela *r)
 	}
       bfd_put_32 (obfd, STD_R2_40R1, p),			p += 4;
       bfd_put_32 (obfd, LD_R11_0R2 | PPC_LO (offset), p),	p += 4;
-      if (PPC_HA (offset + 16) != PPC_HA (offset))
+      if (PPC_HA (offset + 8 + 8 * plt_static_chain) != PPC_HA (offset))
 	{
 	  bfd_put_32 (obfd, ADDI_R2_R2 | PPC_LO (offset), p),	p += 4;
 	  offset = 0;
 	}
       bfd_put_32 (obfd, MTCTR_R11, p),				p += 4;
-      bfd_put_32 (obfd, LD_R11_0R2 | PPC_LO (offset + 16), p),	p += 4;
+      if (plt_static_chain)
+	bfd_put_32 (obfd, LD_R11_0R2 | PPC_LO (offset + 16), p), p += 4;
       bfd_put_32 (obfd, LD_R2_0R2 | PPC_LO (offset + 8), p),	p += 4;
       bfd_put_32 (obfd, BCTR, p),				p += 4;
     }
@@ -9351,7 +9357,7 @@ build_plt_stub (bfd *obfd, bfd_byte *p, int offset, Elf_Internal_Rela *r)
 
 static inline bfd_byte *
 build_tls_get_addr_stub (bfd *obfd, bfd_byte *p, int offset,
-			 Elf_Internal_Rela *r)
+			 Elf_Internal_Rela *r, bfd_boolean plt_static_chain)
 {
   bfd_put_32 (obfd, LD_R11_0R3 + 0, p),		p += 4;
   bfd_put_32 (obfd, LD_R12_0R3 + 8, p),		p += 4;
@@ -9365,7 +9371,7 @@ build_tls_get_addr_stub (bfd *obfd, bfd_byte *p, int offset,
 
   if (r != NULL)
     r[0].r_offset += 9 * 4;
-  p = build_plt_stub (obfd, p, offset, r);
+  p = build_plt_stub (obfd, p, offset, r, plt_static_chain);
   bfd_put_32 (obfd, BCTRL, p - 4);
 
   bfd_put_32 (obfd, LD_R11_0R1 + 32, p),	p += 4;
@@ -9795,9 +9801,11 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
 	  && (stub_entry->h == htab->tls_get_addr_fd
 	      || stub_entry->h == htab->tls_get_addr)
 	  && !htab->no_tls_get_addr_opt)
-	p = build_tls_get_addr_stub (htab->stub_bfd, loc, off, r);
+	p = build_tls_get_addr_stub (htab->stub_bfd, loc, off, r,
+				     htab->plt_static_chain);
       else
-	p = build_plt_stub (htab->stub_bfd, loc, off, r);
+	p = build_plt_stub (htab->stub_bfd, loc, off, r,
+			    htab->plt_static_chain);
       size = p - loc;
       break;
 
@@ -9884,6 +9892,8 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
 	      - htab->stub_group[stub_entry->id_sec->id].toc_off);
 
       size = PLT_CALL_STUB_SIZE;
+      if (!htab->plt_static_chain)
+	size -= 4;
       if (PPC_HA (off) == 0)
 	size -= 4;
       if (PPC_HA (off + 16) != PPC_HA (off))
@@ -10823,7 +10833,8 @@ group_sections (struct ppc_link_hash_table *htab,
    instruction.  */
 
 bfd_boolean
-ppc64_elf_size_stubs (struct bfd_link_info *info, bfd_signed_vma group_size)
+ppc64_elf_size_stubs (struct bfd_link_info *info, bfd_signed_vma group_size,
+		      bfd_boolean plt_static_chain)
 {
   bfd_size_type stub_group_size;
   bfd_boolean stubs_always_before_branch;
@@ -10832,6 +10843,7 @@ ppc64_elf_size_stubs (struct bfd_link_info *info, bfd_signed_vma group_size)
   if (htab == NULL)
     return FALSE;
 
+  htab->plt_static_chain = plt_static_chain;
   stubs_always_before_branch = group_size < 0;
   if (group_size < 0)
     stub_group_size = -group_size;
diff --git a/bfd/elf64-ppc.h b/bfd/elf64-ppc.h
index c905d30..9026c56 100644
--- a/bfd/elf64-ppc.h
+++ b/bfd/elf64-ppc.h
@@ -1,5 +1,5 @@
 /* PowerPC64-specific support for 64-bit ELF.
-   Copyright 2002, 2003, 2004, 2005, 2007, 2008, 2010
+   Copyright 2002, 2003, 2004, 2005, 2007, 2008, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -49,7 +49,7 @@ bfd_boolean ppc64_elf_check_init_fini
 bfd_boolean ppc64_elf_next_input_section
   (struct bfd_link_info *, asection *);
 bfd_boolean ppc64_elf_size_stubs
-  (struct bfd_link_info *, bfd_signed_vma);
+  (struct bfd_link_info *, bfd_signed_vma, bfd_boolean);
 bfd_boolean ppc64_elf_build_stubs
   (bfd_boolean, struct bfd_link_info *, char **);
 void ppc64_elf_restore_symbols
diff --git a/bfd/elflink.c b/bfd/elflink.c
index dc3840e..2e592f5 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -2517,7 +2517,7 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h,
       struct elf_link_hash_entry *weakdef;
 
       weakdef = h->u.weakdef;
-      if (h->root.type == bfd_link_hash_indirect)
+      while (h->root.type == bfd_link_hash_indirect)
 	h = (struct elf_link_hash_entry *) h->root.u.i.link;
 
       BFD_ASSERT (h->root.type == bfd_link_hash_defined
@@ -2621,12 +2621,12 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data)
 
   if (h->u.weakdef != NULL)
     {
-      /* If we get to this point, we know there is an implicit
-	 reference by a regular object file via the weak symbol H.
-	 FIXME: Is this really true?  What if the traversal finds
-	 H->U.WEAKDEF before it finds H?  */
+      /* If we get to this point, there is an implicit reference to
+	 H->U.WEAKDEF by a regular object file via the weak symbol H.  */
       h->u.weakdef->ref_regular = 1;
 
+      /* Ensure that the backend adjust_dynamic_symbol function sees
+	 H->U.WEAKDEF before H by recursively calling ourselves.  */
       if (! _bfd_elf_adjust_dynamic_symbol (h->u.weakdef, eif))
 	return FALSE;
     }
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 25eba0f..67df096 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -487,7 +487,7 @@ extern bfd_boolean _bfd_generic_set_section_contents
   ((bfd_boolean (*) (bfd *, struct bfd_section *)) bfd_false)
 #define _bfd_nolink_section_already_linked \
   ((void (*) (bfd *, struct already_linked*, \
-		struct bfd_link_info *)) bfd_void)
+	      struct bfd_link_info *)) bfd_void)
 #define _bfd_nolink_bfd_define_common_symbol \
   ((bfd_boolean (*) (bfd *, struct bfd_link_info *, \
 		     struct bfd_link_hash_entry *)) bfd_false)
diff --git a/bfd/linker.c b/bfd/linker.c
index 492e774..8700c05 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -3057,6 +3057,7 @@ _bfd_generic_section_already_linked (bfd *abfd,
 	{
 	  l_sec = l->linked.u.sec;
 	  l_owner = l_sec->owner;
+	  l_flags = l_sec->flags;
 	  l_comdat = bfd_coff_get_comdat_section (l_sec->owner, l_sec);
 	}
 
diff --git a/bfd/version.h b/bfd/version.h
index 80152ec..30138e0 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20110713
+#define BFD_VERSION_DATE 20110714
 #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/gdb/ChangeLog b/gdb/ChangeLog
index 6d2ee2c..f0cc501 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,25 @@
+2011-07-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Code cleanup - constify struct lval_funcs.
+	* dwarf2loc.c (pieced_value_funcs): Make it const.
+	* infrun.c (siginfo_value_funcs): Likewise.
+	* opencl-lang.c (opencl_value_funcs): Likewise.
+	* valops.c (value_assign, value_ind): Make the funcs variable const.
+	* value.c (struct value): Make location.computed.funcs target const.
+	Rearrange the comments.
+	(allocate_computed_value): Make the funcs parameter target const.
+	(value_computed_funcs): Return the funcs target const.
+	(value_free, value_copy, set_value_component_location): Make the funcs
+	variable const.
+	* value.h (allocate_computed_value): Make the funcs parameter target
+	const.
+	(value_computed_funcs): Return the funcs target const.
+	* windows-tdep.c (tlb_value_funcs): Make it const.
+
+2011-07-14  Hui Zhu  <teawater@gmail.com>
+
+	* remote.c (remote_get_trace_status): Initialize p.
+
 2011-07-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
 	Work around kgdb.
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index c363059..8c0a271 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -164,8 +164,7 @@ extern void ada_print_typedef (struct type *type, struct symbol *new_symbol,
 			       struct ui_file *stream);
 
 extern int ada_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
-                          struct ui_file *, int,
-			  const struct value *,
+                          struct ui_file *, int, struct value *,
 			  const struct value_print_options *);
 
 extern int ada_value_print (struct value *, struct ui_file *,
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index 7b9e3ee..50d6e0a 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -37,23 +37,18 @@
 #include "objfiles.h"
 
 static void print_record (struct type *, const gdb_byte *, int,
-			  struct ui_file *,
-			  int,
-			  const struct value *,
+			  struct ui_file *, int, struct value *,
 			  const struct value_print_options *);
 
 static int print_field_values (struct type *, const gdb_byte *,
-			       int,
-			       struct ui_file *, int,
-			       const struct value *,
+			       int, struct ui_file *, int, struct value *,
 			       const struct value_print_options *,
 			       int, struct type *, int);
 
 static void adjust_type_signedness (struct type *);
 
 static int ada_val_print_1 (struct type *, const gdb_byte *, int, CORE_ADDR,
-			    struct ui_file *, int,
-			    const struct value *,
+			    struct ui_file *, int, struct value *,
 			    const struct value_print_options *);
 \f
 
@@ -573,8 +568,7 @@ ada_printstr (struct ui_file *stream, struct type *type,
 int
 ada_val_print (struct type *type, const gdb_byte *valaddr,
 	       int embedded_offset, CORE_ADDR address,
-	       struct ui_file *stream, int recurse,
-	       const struct value *val,
+	       struct ui_file *stream, int recurse, struct value *val,
 	       const struct value_print_options *options)
 {
   volatile struct gdb_exception except;
@@ -601,8 +595,7 @@ ada_val_print (struct type *type, const gdb_byte *valaddr,
 static int
 ada_val_print_array (struct type *type, const gdb_byte *valaddr,
 		     int offset, CORE_ADDR address,
-		     struct ui_file *stream, int recurse,
-		     const struct value *val,
+		     struct ui_file *stream, int recurse, struct value *val,
 		     const struct value_print_options *options)
 {
   int result = 0;
@@ -670,7 +663,7 @@ static int
 ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
 		 int offset, CORE_ADDR address,
 		 struct ui_file *stream, int recurse,
-		 const struct value *original_value,
+		 struct value *original_value,
 		 const struct value_print_options *options)
 {
   unsigned int len;
@@ -898,9 +891,27 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
       
       if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
         {
-          CORE_ADDR deref_val_int
-	    = unpack_pointer (type, valaddr + offset_aligned);
+          CORE_ADDR deref_val_int;
 
+	  if (VALUE_LVAL (original_value) == lval_computed)
+	    {
+	      const struct lval_funcs *funcs;
+	      
+	      funcs = value_computed_funcs (original_value);
+	      if (funcs->indirect)
+	        {
+		  struct value *result = funcs->indirect (original_value);
+
+		  if (result)
+		    {
+		      common_val_print (result, stream, recurse,
+					options, current_language);
+		      return 0;
+		    }
+	        }
+	    }
+
+          deref_val_int = unpack_pointer (type, valaddr + offset_aligned);
           if (deref_val_int != 0)
             {
               struct value *deref_val =
@@ -929,8 +940,7 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
 static int
 print_variant_part (struct type *type, int field_num,
 		    const gdb_byte *valaddr, int offset,
-		    struct ui_file *stream, int recurse,
-		    const struct value *val,
+		    struct ui_file *stream, int recurse, struct value *val,
 		    const struct value_print_options *options,
 		    int comma_needed,
 		    struct type *outer_type, int outer_offset)
@@ -1004,8 +1014,7 @@ ada_value_print (struct value *val0, struct ui_file *stream,
 static void
 print_record (struct type *type, const gdb_byte *valaddr,
 	      int offset,
-	      struct ui_file *stream, int recurse,
-	      const struct value *val,
+	      struct ui_file *stream, int recurse, struct value *val,
 	      const struct value_print_options *options)
 {
   type = ada_check_typedef (type);
@@ -1041,7 +1050,7 @@ print_record (struct type *type, const gdb_byte *valaddr,
 static int
 print_field_values (struct type *type, const gdb_byte *valaddr,
 		    int offset, struct ui_file *stream, int recurse,
-		    const struct value *val,
+		    struct value *val,
 		    const struct value_print_options *options,
 		    int comma_needed,
 		    struct type *outer_type, int outer_offset)
diff --git a/gdb/c-lang.h b/gdb/c-lang.h
index 747d079..4e24961 100644
--- a/gdb/c-lang.h
+++ b/gdb/c-lang.h
@@ -73,8 +73,7 @@ extern void c_print_typedef (struct type *,
 
 extern int c_val_print (struct type *, const gdb_byte *,
 			int, CORE_ADDR,
-			struct ui_file *, int,
-			const struct value *,
+			struct ui_file *, int, struct value *,
 			const struct value_print_options *);
 
 extern int c_value_print (struct value *, struct ui_file *,
@@ -119,15 +118,13 @@ extern void cp_print_class_member (const gdb_byte *, struct type *,
 
 extern void cp_print_value_fields (struct type *, struct type *,
 				   const gdb_byte *, int, CORE_ADDR,
-				   struct ui_file *, int,
-				   const struct value *,
+				   struct ui_file *, int, struct value *,
 				   const struct value_print_options *,
 				   struct type **, int);
 
 extern void cp_print_value_fields_rtti (struct type *,
 					const gdb_byte *, int, CORE_ADDR,
-					struct ui_file *, int,
-					const struct value *,
+					struct ui_file *, int, struct value *,
 					const struct value_print_options *,
 					struct type **, int);
 
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 76579d2..2f5d962 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -149,8 +149,7 @@ c_textual_element_type (struct type *type, char format)
 int
 c_val_print (struct type *type, const gdb_byte *valaddr,
 	     int embedded_offset, CORE_ADDR address,
-	     struct ui_file *stream, int recurse,
-	     const struct value *original_value,
+	     struct ui_file *stream, int recurse, struct value *original_value,
 	     const struct value_print_options *options)
 {
   struct gdbarch *gdbarch = get_type_arch (type);
@@ -380,10 +379,29 @@ c_val_print (struct type *type, const gdb_byte *valaddr,
 	{
 	  if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
 	    {
-	      struct value *deref_val =
-		value_at
-		(TYPE_TARGET_TYPE (type),
-		 unpack_pointer (type, valaddr + embedded_offset));
+	      struct value *deref_val;
+
+	      if (VALUE_LVAL (original_value) == lval_computed)
+		{
+		  const struct lval_funcs *funcs;
+		  
+		  funcs = value_computed_funcs (original_value);
+		  if (funcs->indirect)
+		    {
+		      struct value *result = funcs->indirect (original_value);
+
+		      if (result)
+			{
+			  common_val_print (result, stream, recurse,
+					    options, current_language);
+			  return 0;
+			}
+		    }
+		}
+
+	      deref_val = value_at (TYPE_TARGET_TYPE (type),
+				    unpack_pointer (type,
+						    valaddr + embedded_offset));
 
 	      common_val_print (deref_val, stream, recurse, options,
 				current_language);
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index f8516d5..5a322e3 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -85,7 +85,7 @@ static void cp_print_static_field (struct type *, struct value *,
 static void cp_print_value (struct type *, struct type *,
 			    const gdb_byte *, int,
 			    CORE_ADDR, struct ui_file *,
-			    int, const struct value *,
+			    int, struct value *,
 			    const struct value_print_options *,
 			    struct type **);
 
@@ -159,7 +159,7 @@ void


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-14 19:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-14 19:03 [SCM] archer-jankratochvil-entryval: extend the testsuite, one fix 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).