public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: kseitz@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  archer-keiths-linespec-rewrite: Merge remote-tracking branch 'gdb/master' into archer-keiths-linespec-rewrite
Date: Fri, 30 Mar 2012 20:55:00 -0000	[thread overview]
Message-ID: <20120330205533.9769.qmail@sourceware.org> (raw)

The branch, archer-keiths-linespec-rewrite has been updated
       via  7ecbc682e5e87b9b3050f080e0bbaef735373c0a (commit)
       via  06d550a95b64991c0bc16306107e029146d72444 (commit)
       via  1f77461ac7709d026de460dc0ab0d2910c90eed3 (commit)
       via  aa4149e524e3107bb10fdc62d433aec5914ca581 (commit)
       via  63ba485ec16b1eaa3f6608468f59df5027cd5834 (commit)
       via  e9dfdcd982542382219633d65c35e18957313cd1 (commit)
       via  5b409cbf08f7ba2f03eccdcaea1a592d9e69639c (commit)
       via  0d078fd58e0a0e1991f3fa59764d3880e2609c9d (commit)
       via  ecf3b10c2c47a04410adc90d6be5f6f26ee81d92 (commit)
       via  1eb23047aca59893799f82b0b4f881076ec2c2d2 (commit)
       via  8a84116d40cfbd737e40121497349bfb2e11ca06 (commit)
       via  c2fe8b175fb0ac61280a6bc3a50d8959247fc72c (commit)
       via  56afba236e344625b16c1488686df253c81b5439 (commit)
       via  4643799535d50ec03c6f204f493e0b8f84033d28 (commit)
       via  163b023b01b01b6e6a2142f6f0827c6ad12f6c9d (commit)
       via  4bd99b035e2894d769d9ab120c45c7b0fad57cf9 (commit)
       via  5b36f78d860593cdc228e425b2b4cd5c3c59f233 (commit)
       via  73e7ee4e16dd314cf92b2479c6daa71cb78ac50c (commit)
       via  d87ba317232961fe0e6d30858220c930a11a53b0 (commit)
       via  8f389cfa3c9c83ee6cad4c2dd2daf63f5c9951c4 (commit)
       via  8fbe13573758f2599c6387ebd01cf67be7b50990 (commit)
       via  a5f03e33295582aa7ad0c88fae45124c4fdf3ea9 (commit)
       via  b24a2c30426d9d41eca48e618c425ae5ca70a1c9 (commit)
       via  57b97e957b7741a6c9485e538746a0986cc030e6 (commit)
       via  6a649ab13c0db352922c7cbbacd5c60a4c6c9b43 (commit)
       via  d084403b007aafeb88eb28f81ae0e441b9a1de8a (commit)
       via  ff905874cd2c7903416f20d06e7da23883833d9a (commit)
       via  6825a12de5348c4f25ccc69a81d7459b98fe2ae1 (commit)
       via  843c3d4f1b1cfb512cf636dac7a7c8922cea1f75 (commit)
       via  86f222feb8ce47aad73750e6a1e75d27d787c3d3 (commit)
       via  b08a0c3476ee1a2dfa35893f3a5955a7b8e0ca28 (commit)
       via  3f7abee6f972f8fb37cf0ded16ef4ac5956d7f32 (commit)
       via  810fc7bf06e766f762bfafe71ae566395a54fcf4 (commit)
       via  7f0e7e8581446c677a376fecd11540533760a05e (commit)
       via  e7a153ccfdac0bb45958b19293fa3fb509b9a9e5 (commit)
       via  3eec4be3d4f50a8ccfa2cfb26efd673b105008a4 (commit)
       via  a7916980e89510b79f52f0bc9c58015318d81478 (commit)
       via  2d0291bf2118f556e2efda26662f23559eddd4ab (commit)
       via  6d7e224c93a0abf474b3a3a85cd0e8c68fec546d (commit)
       via  52c93ee1151eb1bdc576b9e100fae548d78433c4 (commit)
       via  655e820cf9a039ee55325d9e1f8423796d592b4b (commit)
       via  5eadef623d0ca84c44370864186ae85ac29f433d (commit)
       via  a012ecd57f4c62e42a6fcd1454541ea209df03e0 (commit)
       via  2d3bed914eb219769399d4be7c95885b9f0956a3 (commit)
       via  33c618f861d9ad56df661bd5759e03d16114682a (commit)
       via  109e341ea4ed4259a4cc49d16c8b9e7cb70e5f47 (commit)
      from  94b015b421d5a7b29d82bd9ed322b8e7acabc42e (commit)

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

- Log -----------------------------------------------------------------
commit 7ecbc682e5e87b9b3050f080e0bbaef735373c0a
Merge: 06d550a 1f77461
Author: Keith Seitz <keiths@redhat.com>
Date:   Fri Mar 30 13:50:17 2012 -0700

    Merge remote-tracking branch 'gdb/master' into archer-keiths-linespec-rewrite

commit 06d550a95b64991c0bc16306107e029146d72444
Author: Keith Seitz <keiths@redhat.com>
Date:   Fri Mar 30 13:46:55 2012 -0700

    	* linespec.c (enum ls_token_type): Add LSTOKEN_COMMA.
    	(find_parameter_list_end): New function.
    	(linespec_lexer_lex_string): Cope with commas.
    	(linespec_lexer_lex_one): Likewise.
    	(unexpected_linespec_error): Likewise.
    	(linespec_parse_basic): Use LSTOKEN_COMMA.
    	(parse_linespec): Likewise.
    
    testsuite/ChangeLog
    	* gdb.linespec/ls-errs.exp: "'main.c',21" should give invalid
    	function error.

commit 1f77461ac7709d026de460dc0ab0d2910c90eed3
Author: Thiago Jung Bauermann <bauerman@br.ibm.com>
Date:   Fri Mar 30 20:23:16 2012 +0000

    	* configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
    	are available.
    	* linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
    	[HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
    	* config.in: Regenerate.
    	* configure: Likewise.

commit aa4149e524e3107bb10fdc62d433aec5914ca581
Author: Tom Tromey <tromey@redhat.com>
Date:   Fri Mar 30 20:05:51 2012 +0000

    	* python/python.c (gdbpy_decode_line): Move cleanup creation out
    	of TRY_CATCH.  Fix error handling.
    	* python/py-value.c (convert_value_from_python): Move 'old'
    	declaration to innermost scope.

commit 63ba485ec16b1eaa3f6608468f59df5027cd5834
Merge: 94b015b 5b409cb
Author: Keith Seitz <keiths@redhat.com>
Date:   Fri Mar 30 12:21:31 2012 -0700

    Merge remote-tracking branch 'gdb/master' into archer-keiths-linespec-rewrite

commit e9dfdcd982542382219633d65c35e18957313cd1
Author: Keith Seitz <keiths@redhat.com>
Date:   Fri Mar 30 19:16:51 2012 +0000

    	* gdb.python: Add test for linespecs with commas.

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

Summary of changes:
 bfd/ChangeLog                          |   42 +
 bfd/bfd-in.h                           |   12 +-
 bfd/bfd-in2.h                          |   12 +-
 bfd/elf32-s390.c                       |  537 ++++----
 bfd/elf64-s390.c                       |  376 +++----
 bfd/elflink.c                          |    3 +-
 bfd/version.h                          |    2 +-
 gdb/.dir-locals.el                     |   24 +
 gdb/ChangeLog                          |  183 +++
 gdb/Makefile.in                        |    5 +-
 gdb/NEWS                               |    2 +
 gdb/ada-exp.y                          |   33 +-
 gdb/ada-lang.c                         |  128 ++-
 gdb/ada-lang.h                         |   20 +-
 gdb/ada-valprint.c                     |   67 +-
 gdb/ada-varobj.c                       |  889 ++++++++++++++
 gdb/ada-varobj.h                       |   56 +
 gdb/doc/ChangeLog                      |    6 +
 gdb/doc/gdb.texinfo                    |    6 +
 gdb/gdbserver/ChangeLog                |   41 +
 gdb/gdbserver/config.in                |    6 +
 gdb/gdbserver/configure                |   24 +
 gdb/gdbserver/configure.ac             |    4 +
 gdb/gdbserver/linux-arm-low.c          |    1 +
 gdb/gdbserver/linux-bfin-low.c         |    1 +
 gdb/gdbserver/linux-cris-low.c         |    1 +
 gdb/gdbserver/linux-crisv32-low.c      |    1 +
 gdb/gdbserver/linux-ia64-low.c         |   45 +-
 gdb/gdbserver/linux-low.c              |   42 +-
 gdb/gdbserver/linux-low.h              |    8 +
 gdb/gdbserver/linux-m32r-low.c         |    1 +
 gdb/gdbserver/linux-m68k-low.c         |    1 +
 gdb/gdbserver/linux-mips-low.c         |    1 +
 gdb/gdbserver/linux-ppc-low.c          |    1 +
 gdb/gdbserver/linux-s390-low.c         |    1 +
 gdb/gdbserver/linux-sh-low.c           |    1 +
 gdb/gdbserver/linux-sparc-low.c        |    1 +
 gdb/gdbserver/linux-tic6x-low.c        |    1 +
 gdb/gdbserver/linux-x86-low.c          |    1 +
 gdb/gdbserver/linux-xtensa-low.c       |    1 +
 gdb/ia64-linux-nat.c                   |   47 +-
 gdb/linespec.c                         |  109 ++-
 gdb/python/py-inferior.c               |   20 +-
 gdb/python/py-value.c                  |    3 +-
 gdb/python/python.c                    |   29 +-
 gdb/testsuite/ChangeLog                |   14 +
 gdb/testsuite/gdb.linespec/ls-errs.exp |    2 +-
 gdb/testsuite/gdb.python/python.exp    |    3 +
 gdb/v850-tdep.c                        |  139 +++-
 gdb/varobj.c                           |  282 ++++-
 gdb/version.in                         |    2 +-
 sim/common/ChangeLog                   |    7 +
 sim/common/sim-trace.c                 |   13 +-
 sim/common/sim-trace.h                 |   17 +
 sim/v850/ChangeLog                     |   55 +
 sim/v850/sim-main.h                    |  298 +++++-
 sim/v850/simops.c                      |  716 +++++++++++-
 sim/v850/simops.h                      |   47 +
 sim/v850/v850-dc                       |   29 +-
 sim/v850/v850.igen                     | 2081 +++++++++++++++++++++++++++++++-
 60 files changed, 5769 insertions(+), 731 deletions(-)
 create mode 100644 gdb/.dir-locals.el
 create mode 100644 gdb/ada-varobj.c
 create mode 100644 gdb/ada-varobj.h

First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 04c3b31..8bd12f2 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,45 @@
+2012-03-30  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* elf64-s390.c: Fix several comments regarding PLT entry
+	description.
+	* elf32-s390.c: Likewise.
+
+2012-03-30  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* elf64-s390.c: Use the section pointer shortcuts in
+	elf_link_hash_table and remove them from the target specific
+	variant.
+	* elf32-s390.c: Likewise.
+
+2012-03-30  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* elf64-s390.c (elf_s390x_plt_entry, elf_s390x_first_plt_entry):
+	New definitions.
+	(PLT_PIC_ENTRY_WORD*, PLT_PIC12_ENTRY_WORD*): Remove.
+	(elf_s390_finish_dynamic_symbol): Use memcpy instead of bfd_put_32.
+	(elf_s390_finish_dynamic_sections): Likewise.
+	* elf32-s390.c (elf_s390_plt_entry, elf_s390_plt_pic_entry)
+	(elf_s390_plt_pic12_entry, elf_s390_plt_pic16_entry)
+	(elf_s390_plt_first_entry, elf_s390_plt_pic_first_entry): New definitions.
+	(PLT_PIC16_ENTRY_WORD*, PLT_ENTRY_WORD*)
+	(PLT_PIC_FIRST_ENTRY_WORD*, PLT_FIRST_ENTRY_WORD*): Remove.
+
+2012-03-30  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* elf32-s390.c (struct elf_s390_dyn_relocs): Remove.
+	Rename all occurrences in the file to elf_dyn_relocs.
+	* elf64-s390.c: Likewise.
+
+2012-03-30  Alan Modra  <amodra@gmail.com>
+
+	* elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic
+	libraries.
+
+2012-03-29  Alan Modra  <amodra@gmail.com>
+
+	* bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete.
+	* bfd-in2.h: Regenerate.
+
 2012-03-23  Alan Modra  <amodra@gmail.com>
 
 	* elf.c (assign_file_positions_for_non_load_sections): Don't warn
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index c331f3b..d50f7e9 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -1,8 +1,8 @@
 /* Main header file for the bfd library -- portable access to object files.
 
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
+   2012 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.
 
@@ -694,14 +694,6 @@ extern bfd *bfd_elf_bfd_from_remote_memory
   (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
    int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len));
 
-/* Return the arch_size field of an elf bfd, or -1 if not elf.  */
-extern int bfd_get_arch_size
-  (bfd *);
-
-/* Return TRUE if address "naturally" sign extends, or -1 if not elf.  */
-extern int bfd_get_sign_extend_vma
-  (bfd *);
-
 extern struct bfd_section *_bfd_elf_tls_setup
   (bfd *, struct bfd_link_info *);
 
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 61513f2..07898be 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -8,8 +8,8 @@
 /* Main header file for the bfd library -- portable access to object files.
 
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
+   2012 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.
 
@@ -701,14 +701,6 @@ extern bfd *bfd_elf_bfd_from_remote_memory
   (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
    int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len));
 
-/* Return the arch_size field of an elf bfd, or -1 if not elf.  */
-extern int bfd_get_arch_size
-  (bfd *);
-
-/* Return TRUE if address "naturally" sign extends, or -1 if not elf.  */
-extern int bfd_get_sign_extend_vma
-  (bfd *);
-
 extern struct bfd_section *_bfd_elf_tls_setup
   (bfd *, struct bfd_link_info *);
 
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index fcced0f..7793d07 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -509,7 +509,7 @@ elf_s390_is_local_label_name (abfd, name)
    The GOT holds the address in the PLT to be executed.
    The loader then gets:
    24(15) =  Pointer to the structure describing the object.
-   28(15) =  Offset in symbol table
+   28(15) =  Offset into rela.plt
 
    The loader  must  then find the module where the function is
    and insert the address in the GOT.
@@ -527,7 +527,7 @@ RET1: BASR 1,0         # 2 bytes  Return from GOT 1st time
       BRC  15,-x       # 4 bytes  Jump to start of PLT
       .word 0          # 2 bytes filler
       .long ?          # 4 bytes  offset in GOT
-      .long ?          # 4 bytes  offset into symbol table
+      .long ?          # 4 bytes  offset into rela.plt
 
   This was the general case. There are two additional, optimizes PLT
   definitions. One for GOT offsets < 4096 and one for GOT offsets < 32768.
@@ -537,10 +537,10 @@ PLT1: L    1,<offset>(12) # 4 bytes  Load address from GOT in R1
       BCR  15,1           # 2 bytes  Jump to address
       .word 0,0,0         # 6 bytes  filler
 RET1: BASR 1,0            # 2 bytes  Return from GOT 1st time
-      L    1,14(1)        # 4 bytes  Load offset in symbol table in r1
+      L    1,14(1)        # 4 bytes  Load offset in rela.plt in r1
       BRC  15,-x          # 4 bytes  Jump to start of PLT
       .word 0,0,0         # 6 bytes  filler
-      .long ?             # 4 bytes  offset into symbol table
+      .long ?             # 4 bytes  offset into rela.plt
 
   Second the one for GOT offsets < 32768:
 
@@ -549,10 +549,10 @@ PLT1: LHI  1,<offset>     # 4 bytes  Load offset in GOT to r1
       BCR  15,1           # 2 bytes  Jump to address
       .word 0             # 2 bytes  filler
 RET1: BASR 1,0            # 2 bytes  Return from GOT 1st time
-      L    1,14(1)        # 4 bytes  Load offset in symbol table in r1
+      L    1,14(1)        # 4 bytes  Load offset in rela.plt in r1
       BRC  15,-x          # 4 bytes  Jump to start of PLT
       .word 0,0,0         # 6 bytes  filler
-      .long ?             # 4 bytes  offset into symbol table
+      .long ?             # 4 bytes  offset into rela.plt
 
 Total = 32 bytes per PLT entry
 
@@ -567,40 +567,76 @@ RET1: BASR 1,0         # 2 bytes  Return from GOT 1st time
       BRC  15,-x       # 4 bytes  Jump to start of PLT
       .word 0          # 2 bytes  filler
       .long ?          # 4 bytes  address of GOT entry
-      .long ?          # 4 bytes  offset into symbol table  */
-
-#define PLT_PIC_ENTRY_WORD0 0x0d105810
-#define PLT_PIC_ENTRY_WORD1 0x10165811
-#define PLT_PIC_ENTRY_WORD2 0xc00007f1
-#define PLT_PIC_ENTRY_WORD3 0x0d105810
-#define PLT_PIC_ENTRY_WORD4 0x100ea7f4
-
-#define PLT_PIC12_ENTRY_WORD0 0x5810c000
-#define PLT_PIC12_ENTRY_WORD1 0x07f10000
-#define PLT_PIC12_ENTRY_WORD2 0x00000000
-#define PLT_PIC12_ENTRY_WORD3 0x0d105810
-#define PLT_PIC12_ENTRY_WORD4 0x100ea7f4
-
-#define PLT_PIC16_ENTRY_WORD0 0xa7180000
-#define PLT_PIC16_ENTRY_WORD1 0x5811c000
-#define PLT_PIC16_ENTRY_WORD2 0x07f10000
-#define PLT_PIC16_ENTRY_WORD3 0x0d105810
-#define PLT_PIC16_ENTRY_WORD4 0x100ea7f4
-
-#define PLT_ENTRY_WORD0     0x0d105810
-#define PLT_ENTRY_WORD1     0x10165810
-#define PLT_ENTRY_WORD2     0x100007f1
-#define PLT_ENTRY_WORD3     0x0d105810
-#define PLT_ENTRY_WORD4     0x100ea7f4
-
-/* The first PLT entry pushes the offset into the symbol table
+      .long ?          # 4 bytes  offset into rela.plt  */
+
+static const bfd_byte elf_s390_plt_entry[PLT_ENTRY_SIZE] =
+  {
+    0x0d, 0x10,                             /* basr    %r1,%r0     */
+    0x58, 0x10, 0x10, 0x16,                 /* l       %r1,22(%r1) */
+    0x58, 0x10, 0x10, 0x00,                 /* l       %r1,0(%r1)  */
+    0x07, 0xf1,                             /* br      %r1         */
+    0x0d, 0x10,                             /* basr    %r1,%r0     */
+    0x58, 0x10, 0x10, 0x0e,                 /* l       %r1,14(%r1) */
+    0xa7, 0xf4, 0x00, 0x00,                 /* j       first plt   */
+    0x00, 0x00,                             /* padding             */
+    0x00, 0x00, 0x00, 0x00,                 /* GOT offset          */
+    0x00, 0x00, 0x00, 0x00                  /* rela.plt offset     */
+  };
+
+/* Generic PLT pic entry.  */
+static const bfd_byte elf_s390_plt_pic_entry[PLT_ENTRY_SIZE] =
+  {
+    0x0d, 0x10,                             /* basr    %r1,%r0         */
+    0x58, 0x10, 0x10, 0x16,                 /* l       %r1,22(%r1)     */
+    0x58, 0x11, 0xc0, 0x00,                 /* l       %r1,0(%r1,%r12) */
+    0x07, 0xf1,                             /* br      %r1             */
+    0x0d, 0x10,                             /* basr    %r1,%r0         */
+    0x58, 0x10, 0x10, 0x0e,                 /* l       %r1,14(%r1)     */
+    0xa7, 0xf4, 0x00, 0x00,                 /* j       first plt       */
+    0x00, 0x00,                             /* padding                 */
+    0x00, 0x00, 0x00, 0x00,                 /* GOT offset              */
+    0x00, 0x00, 0x00, 0x00                  /* rela.plt offset         */
+  };
+
+/* Optimized PLT pic entry for GOT offset < 4k.  xx will be replaced
+   when generating the PLT slot with the GOT offset.  */
+static const bfd_byte elf_s390_plt_pic12_entry[PLT_ENTRY_SIZE] =
+  {
+    0x58, 0x10, 0xc0, 0x00,                 /* l       %r1,xx(%r12) */
+    0x07, 0xf1,                             /* br      %r1          */
+    0x00, 0x00, 0x00, 0x00,                 /* padding              */
+    0x00, 0x00,
+    0x0d, 0x10,                             /* basr    %r1,%r0      */
+    0x58, 0x10, 0x10, 0x0e,                 /* l       %r1,14(%r1)  */
+    0xa7, 0xf4, 0x00, 0x00,                 /* j       first plt    */
+    0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00
+  };
+
+/* Optimized PLT pic entry for GOT offset < 32k.  xx will be replaced
+   when generating the PLT slot with the GOT offset.  */
+static const bfd_byte elf_s390_plt_pic16_entry[PLT_ENTRY_SIZE] =
+  {
+    0xa7, 0x18, 0x00, 0x00,                 /* lhi     %r1,xx          */
+    0x58, 0x11, 0xc0, 0x00,                 /* l       %r1,0(%r1,%r12) */
+    0x07, 0xf1,                             /* br      %r1             */
+    0x00, 0x00,
+    0x0d, 0x10,                             /* basr    %r1,%r0         */
+    0x58, 0x10, 0x10, 0x0e,                 /* l       %r1,14(%r1)     */
+    0xa7, 0xf4, 0x00, 0x00,                 /* j       first plt       */
+    0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00
+  };
+
+/* The first PLT entry pushes the offset into the rela.plt
    from R1 onto the stack at 8(15) and the loader object info
    at 12(15), loads the loader address in R1 and jumps to it.  */
 
 /* The first entry in the PLT for PIC code:
 
 PLT0:
-   ST   1,28(15)  # R1 has offset into symbol table
+   ST   1,28(15)  # R1 has offset into rela.plt
    L    1,4(12)   # Get loader ino(object struct address)
    ST   1,24(15)  # Store address
    L    1,8(12)   # Entry address of loader in R1
@@ -609,7 +645,7 @@ PLT0:
    The first entry in the PLT for static code:
 
 PLT0:
-   ST   1,28(15)      # R1 has offset into symbol table
+   ST   1,28(15)      # R1 has offset into rela.plt
    BASR 1,0
    L    1,18(0,1)     # Get address of GOT
    MVC  24(4,15),4(1) # Move loader ino to stack
@@ -618,38 +654,32 @@ PLT0:
    .word 0            # filler
    .long got          # address of GOT  */
 
-#define PLT_PIC_FIRST_ENTRY_WORD0 0x5010f01c
-#define PLT_PIC_FIRST_ENTRY_WORD1 0x5810c004
-#define PLT_PIC_FIRST_ENTRY_WORD2 0x5010f018
-#define PLT_PIC_FIRST_ENTRY_WORD3 0x5810c008
-#define PLT_PIC_FIRST_ENTRY_WORD4 0x07f10000
-
-#define PLT_FIRST_ENTRY_WORD0     0x5010f01c
-#define PLT_FIRST_ENTRY_WORD1     0x0d105810
-#define PLT_FIRST_ENTRY_WORD2     0x1012D203
-#define PLT_FIRST_ENTRY_WORD3     0xf0181004
-#define PLT_FIRST_ENTRY_WORD4     0x58101008
-#define PLT_FIRST_ENTRY_WORD5     0x07f10000
-
-/* The s390 linker needs to keep track of the number of relocs that it
-   decides to copy as dynamic relocs in check_relocs for each symbol.
-   This is so that it can later discard them if they are found to be
-   unnecessary.  We store the information in a field extending the
-   regular ELF linker hash table.  */
-
-struct elf_s390_dyn_relocs
-{
-  struct elf_s390_dyn_relocs *next;
-
-  /* The input section of the reloc.  */
-  asection *sec;
-
-  /* Total number of relocs copied for the input section.  */
-  bfd_size_type count;
+static const bfd_byte elf_s390_plt_first_entry[PLT_FIRST_ENTRY_SIZE] =
+  {
+    0x50, 0x10, 0xf0, 0x1c,                   /* st      %r1,28(%r15)      */
+    0x0d, 0x10,                               /* basr    %r1,%r0           */
+    0x58, 0x10, 0x10, 0x12,                   /* l       %r1,18(%r1)       */
+    0xd2, 0x03, 0xf0, 0x18, 0x10, 0x04,       /* mvc     24(4,%r15),4(%r1) */
+    0x58, 0x10, 0x10, 0x08,                   /* l       %r1,8(%r1)        */
+    0x07, 0xf1,                               /* br      %r1               */
+    0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00
+  };
+
+static const bfd_byte elf_s390_plt_pic_first_entry[PLT_FIRST_ENTRY_SIZE] =
+  {
+    0x50, 0x10, 0xf0, 0x1c,                     /* st      %r1,28(%r15)  */
+    0x58, 0x10, 0xc0, 0x04,                     /* l       %r1,4(%r12)   */
+    0x50, 0x10, 0xf0, 0x18,                     /* st      %r1,24(%r15)  */
+    0x58, 0x10, 0xc0, 0x08,                     /* l       %r1,8(%r12)   */
+    0x07, 0xf1,                                 /* br      %r1           */
+    0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00
+  };
 
-  /* Number of pc-relative relocs copied for the input section.  */
-  bfd_size_type pc_count;
-};
 
 /* s390 ELF linker hash entry.  */
 
@@ -658,7 +688,7 @@ struct elf_s390_link_hash_entry
   struct elf_link_hash_entry elf;
 
   /* Track dynamic relocs copied for this symbol.  */
-  struct elf_s390_dyn_relocs *dyn_relocs;
+  struct elf_dyn_relocs *dyn_relocs;
 
   /* Number of GOTPLT references for a function.  */
   bfd_signed_vma gotplt_refcount;
@@ -717,11 +747,6 @@ struct elf_s390_link_hash_table
   struct elf_link_hash_table elf;
 
   /* Short-cuts to get to dynamic linker sections.  */
-  asection *sgot;
-  asection *sgotplt;
-  asection *srelgot;
-  asection *splt;
-  asection *srelplt;
   asection *sdynbss;
   asection *srelbss;
 
@@ -794,11 +819,11 @@ elf_s390_link_hash_table_create (abfd)
       return NULL;
     }
 
-  ret->sgot = NULL;
-  ret->sgotplt = NULL;
-  ret->srelgot = NULL;
-  ret->splt = NULL;
-  ret->srelplt = NULL;
+  ret->elf.sgot = NULL;
+  ret->elf.sgotplt = NULL;
+  ret->elf.srelgot = NULL;
+  ret->elf.splt = NULL;
+  ret->elf.srelplt = NULL;
   ret->sdynbss = NULL;
   ret->srelbss = NULL;
   ret->tls_ldm_got.refcount = 0;
@@ -821,10 +846,10 @@ create_got_section (dynobj, info)
     return FALSE;
 
   htab = elf_s390_hash_table (info);
-  htab->sgot = bfd_get_section_by_name (dynobj, ".got");
-  htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
-  htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
-  if (!htab->sgot || !htab->sgotplt || !htab->srelgot)
+  htab->elf.sgot = bfd_get_section_by_name (dynobj, ".got");
+  htab->elf.sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
+  htab->elf.srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+  if (!htab->elf.sgot || !htab->elf.sgotplt || !htab->elf.srelgot)
     abort ();
 
   return TRUE;
@@ -842,19 +867,19 @@ elf_s390_create_dynamic_sections (dynobj, info)
   struct elf_s390_link_hash_table *htab;
 
   htab = elf_s390_hash_table (info);
-  if (!htab->sgot && !create_got_section (dynobj, info))
+  if (!htab->elf.sgot && !create_got_section (dynobj, info))
     return FALSE;
 
   if (!_bfd_elf_create_dynamic_sections (dynobj, info))
     return FALSE;
 
-  htab->splt = bfd_get_section_by_name (dynobj, ".plt");
-  htab->srelplt = bfd_get_section_by_name (dynobj, ".rela.plt");
+  htab->elf.splt = bfd_get_section_by_name (dynobj, ".plt");
+  htab->elf.srelplt = bfd_get_section_by_name (dynobj, ".rela.plt");
   htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
   if (!info->shared)
     htab->srelbss = bfd_get_section_by_name (dynobj, ".rela.bss");
 
-  if (!htab->splt || !htab->srelplt || !htab->sdynbss
+  if (!htab->elf.splt || !htab->elf.srelplt || !htab->sdynbss
       || (!info->shared && !htab->srelbss))
     abort ();
 
@@ -877,14 +902,14 @@ elf_s390_copy_indirect_symbol (info, dir, ind)
     {
       if (edir->dyn_relocs != NULL)
 	{
-	  struct elf_s390_dyn_relocs **pp;
-	  struct elf_s390_dyn_relocs *p;
+	  struct elf_dyn_relocs **pp;
+	  struct elf_dyn_relocs *p;
 
 	  /* Add reloc counts against the indirect sym to the direct sym
 	     list.  Merge any entries against the same section.  */
 	  for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
 	    {
-	      struct elf_s390_dyn_relocs *q;
+	      struct elf_dyn_relocs *q;
 
 	      for (q = edir->dyn_relocs; q != NULL; q = q->next)
 		if (q->sec == p->sec)
@@ -1056,7 +1081,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
 	case R_390_GOTOFF32:
 	case R_390_GOTPC:
 	case R_390_GOTPCDBL:
-	  if (htab->sgot == NULL)
+	  if (htab->elf.sgot == NULL)
 	    {
 	      if (htab->elf.dynobj == NULL)
 		htab->elf.dynobj = abfd;
@@ -1265,8 +1290,8 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
 		  && (h->root.type == bfd_link_hash_defweak
 		      || !h->def_regular)))
 	    {
-	      struct elf_s390_dyn_relocs *p;
-	      struct elf_s390_dyn_relocs **head;
+	      struct elf_dyn_relocs *p;
+	      struct elf_dyn_relocs **head;
 
 	      /* We must copy these reloc types into the output file.
 		 Create a reloc section in dynobj and make room for
@@ -1308,7 +1333,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
 		    s = sec;
 
 		  vpp = &elf_section_data (s)->local_dynrel;
-		  head = (struct elf_s390_dyn_relocs **) vpp;
+		  head = (struct elf_dyn_relocs **) vpp;
 		}
 
 	      p = *head;
@@ -1316,7 +1341,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
 		{
 		  bfd_size_type amt = sizeof *p;
 
-		  p = ((struct elf_s390_dyn_relocs *)
+		  p = ((struct elf_dyn_relocs *)
 		       bfd_alloc (htab->elf.dynobj, amt));
 		  if (p == NULL)
 		    return FALSE;
@@ -1414,8 +1439,8 @@ elf_s390_gc_sweep_hook (bfd *abfd,
       if (r_symndx >= symtab_hdr->sh_info)
 	{
 	  struct elf_s390_link_hash_entry *eh;
-	  struct elf_s390_dyn_relocs **pp;
-	  struct elf_s390_dyn_relocs *p;
+	  struct elf_dyn_relocs **pp;
+	  struct elf_dyn_relocs *p;
 
 	  h = sym_hashes[r_symndx - symtab_hdr->sh_info];
 	  while (h->root.type == bfd_link_hash_indirect
@@ -1628,7 +1653,7 @@ elf_s390_adjust_dynamic_symbol (info, h)
   if (ELIMINATE_COPY_RELOCS)
     {
       struct elf_s390_link_hash_entry * eh;
-      struct elf_s390_dyn_relocs *p;
+      struct elf_dyn_relocs *p;
 
       eh = (struct elf_s390_link_hash_entry *) h;
       for (p = eh->dyn_relocs; p != NULL; p = p->next)
@@ -1684,7 +1709,7 @@ allocate_dynrelocs (h, inf)
   struct bfd_link_info *info;
   struct elf_s390_link_hash_table *htab;
   struct elf_s390_link_hash_entry *eh;
-  struct elf_s390_dyn_relocs *p;
+  struct elf_dyn_relocs *p;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
@@ -1707,7 +1732,7 @@ allocate_dynrelocs (h, inf)
       if (info->shared


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


             reply	other threads:[~2012-03-30 20:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-30 20:55 kseitz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-26 21:41 kseitz
2012-03-19 19:24 kseitz
2012-03-19 17:21 kseitz
2012-03-16 23:48 kseitz
2012-03-15 19:14 kseitz
2012-03-14 18:54 kseitz
2012-03-13 21:22 kseitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120330205533.9769.qmail@sourceware.org \
    --to=kseitz@sourceware.org \
    --cc=archer-commits@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).