This is the mail archive of the archer-commits@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[SCM] archer-jankratochvil-vla: Merge remote-tracking branch 'origin/master' into archer-jankratochvil-vla


The branch, archer-jankratochvil-vla has been updated
       via  550380d0855fa27ef23713e49611865dc8668e28 (commit)
       via  5365590483584791f139a03dfe322d811803e3f7 (commit)
       via  fd0a6e5cd0e8adf7f6039f4709772d61bba7806c (commit)
       via  905080c1ebe4d889977112e418c8dd3c66f93254 (commit)
       via  fc5653543cf9d6800023398a309d7a9edc4c1a55 (commit)
       via  69a632512a601889721f443f0a92d40597b49cae (commit)
       via  7827cb22db6c46f1623e79f90a23276032fa05c9 (commit)
       via  fc9d9ebd90ee721ee59fb908412073512201a930 (commit)
       via  f6f082adf8b91a72791ea5e7fe4d90be421ba1c2 (commit)
       via  6b83bddbdcae08479989869bdfab44fc3f691f5e (commit)
       via  3a1969d1cf18ce680dffcd999ec9dc9e6b8d0960 (commit)
       via  6045d9eaa27e91cfe24c3f321292340bd6fdcb1e (commit)
       via  5e212c44d6325da43d6026913f4c0b6a6dac43ae (commit)
       via  132c0351d9688a0a361e80eac3db504c76459bfa (commit)
       via  8c24c70e57f78215911295bcd9a905dc5286ca7d (commit)
       via  0ef84ab916432891107ba0cf525f39f5a422bba1 (commit)
       via  3787b7ce869e8d8219b2d66e28a2e2e1dd3c6a29 (commit)
       via  9e9dd9b4a86a9a90cc13d23ac8a03f5f8e4db6a9 (commit)
       via  8c5a634bffb212fadf96c090f12551160fffca3f (commit)
       via  e57673b758c6937387e1dce600640f6975de33ca (commit)
       via  0cb36e4336dda3b02cb9b881b64936598d90058f (commit)
       via  5601f014a0cb2e092cff4b865c6a66aa4c0feb9a (commit)
       via  a9af4cee739709dd2d21ab76518eec7ad8da921e (commit)
       via  aea4b56e481ae0eaddf174da30dce08f51bf7e0c (commit)
       via  0c19f5d53b325bd11bffc0dc1c8d748e65eac0be (commit)
       via  f9a1163f6bb3e6e557c7de7b7bd5975bfed7453d (commit)
       via  4fe7108dc3d2413b7a1f18088bb909f530ac06ee (commit)
       via  0cf67719c439bdaca4dcaa96a3e184f0fb8f4808 (commit)
       via  39ef19987def7efa0d1c2da48f3a553e6d3e8d83 (commit)
       via  cca2d397a12fd20ff653b0e016512afcd2b11df8 (commit)
       via  611ad28e343701634e7ff4118a980ed0a7304ffa (commit)
       via  7063e23c0aeefac10042f21ec94750c9e4f2d027 (commit)
       via  7a27d4eb297de6fb128d645b842fb69fb8009b8a (commit)
       via  9d430682ffe0a5eac0d751f94a01eb549913f198 (commit)
       via  1f98ab0509f8a7472b5f479543925f1ac0fd3b94 (commit)
       via  c1c25ddf9a650b13e11d883b38fc66c92545e7c7 (commit)
       via  67d7dd4b43447ecec11f4435620b880a009125a7 (commit)
       via  7bf3df7c0d31b6d00cfac7a9d1b72f7501704762 (commit)
       via  4478eb9a48d1ff72cc11dc6139b41a61a0bf910a (commit)
       via  4f9ed92e82a1ab3acb6589bb509c5a127e333f7f (commit)
       via  b5e58f583c517a7fcc7838a74ab9430ca5fec48d (commit)
       via  1e4106754f1995cf0b210f331b091f7b751ba10f (commit)
       via  480bdd67482f4d50905c6ff31b74111d1108da56 (commit)
       via  2e8a2a5a628b55350602e8984159c4acee4559e3 (commit)
      from  e51fe7bc59a92a38870d62114a0023193cacb441 (commit)

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

- Log -----------------------------------------------------------------
commit 550380d0855fa27ef23713e49611865dc8668e28
Merge: e51fe7b 5365590
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Feb 13 19:06:57 2011 +0100

    Merge remote-tracking branch 'origin/master' into archer-jankratochvil-vla

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

Summary of changes:
 ChangeLog                                |   59 +
 MAINTAINERS                              |   10 +-
 Makefile.def                             |   10 +-
 Makefile.in                              |   55 +-
 Makefile.tpl                             |    2 +-
 bfd/ChangeLog                            |   18 +
 bfd/elf.c                                |   14 +-
 bfd/elf64-ppc.c                          |   93 +-
 bfd/version.h                            |    2 +-
 config/ChangeLog                         |   22 +-
 config/bootstrap-lto.mk                  |    5 +-
 config/cloog.m4                          |    4 +-
 configure                                |   37 +-
 configure.ac                             |   30 +-
 gdb/ChangeLog                            |  100 +-
 gdb/Makefile.in                          |   54 +-
 gdb/ada-valprint.c                       |   25 +-
 gdb/breakpoint.c                         |    7 +-
 gdb/c-typeprint.c                        |   31 +-
 gdb/c-valprint.c                         |   10 +-
 gdb/common/ChangeLog                     |   13 +
 gdb/common/Makefile.in                   |   93 +
 gdb/common/aclocal.m4                    |   68 +
 gdb/{gdbserver => common}/configure      | 3188 ++++++------------------------
 gdb/common/configure.ac                  |   74 +
 gdb/configure                            |    3 +
 gdb/configure.ac                         |    1 +
 gdb/dwarf2read.c                         |    7 +-
 gdb/f-valprint.c                         |    9 +-
 gdb/gdbserver/ChangeLog                  |   14 +
 gdb/gdbserver/Makefile.in                |   41 +-
 gdb/gdbserver/configure                  |   93 +
 gdb/gdbserver/configure.ac               |    1 +
 gdb/gdbserver/server.c                   |   43 +-
 gdb/gdbserver/tracepoint.c               |   15 +-
 gdb/i386-tdep.c                          |   22 +-
 gdb/infrun.c                             |   20 +-
 gdb/jv-valprint.c                        |    9 +-
 gdb/linux-nat.c                          |    2 +-
 gdb/m2-valprint.c                        |    9 +-
 gdb/p-valprint.c                         |   12 +-
 gdb/ppc-sysv-tdep.c                      |  481 ++++-
 gdb/spu-tdep.c                           |   18 +-
 gdb/symtab.c                             |    7 +-
 gdb/symtab.h                             |    3 +-
 gdb/testsuite/ChangeLog                  |   33 +
 gdb/testsuite/gdb.arch/altivec-abi.c     |    2 +-
 gdb/testsuite/gdb.arch/altivec-abi.exp   |    5 +-
 gdb/testsuite/gdb.base/break-interp.exp  |    2 +-
 gdb/testsuite/gdb.base/jit.exp           |    9 +-
 gdb/testsuite/gdb.base/pie-execl.exp     |    3 +-
 gdb/testsuite/gdb.base/solib-nodir.exp   |    2 +-
 gdb/testsuite/gdb.base/solib-overlap.exp |    9 +-
 gdb/testsuite/gdb.cp/overload-const.cc   |   28 +
 gdb/testsuite/gdb.cp/overload-const.exp  |   29 +
 gdb/testsuite/gdb.opencl/Makefile.in     |    2 +-
 gdb/testsuite/gdb.opencl/callfuncs.cl    |  218 ++
 gdb/testsuite/gdb.opencl/callfuncs.exp   |  102 +
 gdb/testsuite/gdb.trace/collection.c     |    8 +
 gdb/testsuite/gdb.trace/collection.exp   |   45 +
 gdb/valprint.c                           |   36 +-
 gdb/vec.h                                |    4 +-
 gdb/version.in                           |    2 +-
 include/ChangeLog                        |    4 +
 include/dwarf2.h                         |   10 +-
 include/opcode/ChangeLog                 |    9 +
 include/opcode/bfin.h                    |   30 +-
 move-if-change                           |   81 +-
 opcodes/ChangeLog                        |   30 +
 opcodes/bfin-dis.c                       |   53 +-
 opcodes/i386-dis.c                       |   10 +-
 71 files changed, 2606 insertions(+), 2994 deletions(-)
 create mode 100644 gdb/common/ChangeLog
 create mode 100644 gdb/common/Makefile.in
 create mode 100644 gdb/common/aclocal.m4
 copy gdb/{gdbserver => common}/configure (62%)
 create mode 100644 gdb/common/configure.ac
 create mode 100644 gdb/testsuite/gdb.cp/overload-const.cc
 create mode 100644 gdb/testsuite/gdb.cp/overload-const.exp
 create mode 100644 gdb/testsuite/gdb.opencl/callfuncs.cl
 create mode 100644 gdb/testsuite/gdb.opencl/callfuncs.exp

First 500 lines of diff:
diff --git a/ChangeLog b/ChangeLog
index 7711c87..930f70d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,62 @@
+2011-02-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	PR binutils/12283
+	* MAINTAINERS (mkinstalldirs): Comes from Automake.
+	(move-if-change): Comes from gnulib.
+	* move-if-change: Import version from gnulib.
+
+2011-02-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Sync from GCC:
+
+	2011-02-12  Alexandre Oliva  <aoliva@redhat.com>
+
+	PR lto/47225
+	* Makefile.def (lto-plugin): Double dash for enable-shared.
+	(configure-gcc): Depend on all-lto-plugin.
+	* Makefile.in: Rebuilt.
+
+	2011-02-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	* configure.ac: Remove extra bracket.
+	* configure: Regenerate.
+
+	2011-02-06  Kai Tietz  <kai.tietz@onevision.com>
+
+	PR lto/47225
+	* Makefile.def: Add dependency for install-gcc
+	on install-lto-plugin.
+	* Makfile.in: Regenerated
+
+	2011-01-25  Jakub Jelinek  <jakub@redhat.com>
+
+	* configure.ac: If with_ppl is no, move setting with_cloog=no
+	after CLOOG_REQUESTED check.
+	* configure: Regenerated.
+
+	2011-01-25  Sebastian Pop  <sebastian.pop@amd.com>
+
+	* configure.ac: Call AC_MSG_ERROR when PPL 0.11 is not present and
+	CLooG has been requested.
+	* configure: Regenerated.
+
+	2011-01-25  Sebastian Pop  <sebastian.pop@amd.com>
+
+	* configure: Regenerated.
+	* configure.ac: Check for version 0.11 (or later revision) of PPL.
+
+	2011-01-25  Tobias Grosser  <grosser@fim.uni-passau.de>
+
+	* configure: Regenerated.
+	* configure.ac: Use CLOOG_CHECK_VERSION(0,16,1).
+
+	2011-01-07  Jan Hubicka  <jh@suse.cz>
+
+	PR lto/47225
+	* Makefile.in: Regenerate.
+	* Makefile.def (lto-plugin): Always pass enable-shared to the plugin
+	configure.
+
 2011-01-31  Alexandre Oliva  <aoliva@redhat.com>
 
 	PR libgcj/44341
diff --git a/MAINTAINERS b/MAINTAINERS
index a471c90..046c5ea 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -38,7 +38,7 @@ config.guess; config.sub; readline/support/config.{sub,guess}
 		binutils@sourceware.org
 		gdb-patches@sourceware.org
 
-depcomp
+depcomp; mkinstalldirs
         Send bug reports and patches to bug-automake@gnu.org.
 
 gdb/; readline/; sim/; GDB's part of include/
@@ -69,12 +69,8 @@ ltconfig; ltmain.sh; ltcf-*.sh
 	sources or submitted to the master file maintainer and brought
 	in via a merge.
 
-mkinstalldirs; move-if-change
-	autoconf: http://gnu.org
-	Patches to autoconf-patches@gnu.org.
-	Changes need to be done in tandem with the official AUTOCONF
-	sources or submitted to the master file maintainer and brought
-	in via a merge.
+move-if-change
+	Send bug reports and patches to bug-gnulib@gnu.org.
 
 symlink-tree
 	gcc: http://gcc.gnu.org
diff --git a/Makefile.def b/Makefile.def
index 8eb5b03..85b582c 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -4,7 +4,7 @@ AutoGen definitions Makefile.tpl;
 // Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.
 // This file was originally written by Nathanael Nerode.
 //
-//   Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+//   Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 //   Free Software Foundation
 //
 // This file is free software; you can redistribute it and/or modify
@@ -145,7 +145,8 @@ host_modules= { module= libtermcap; no_check=true;
                 missing=maintainer-clean; };
 host_modules= { module= utils; no_check=true; };
 host_modules= { module= gnattools; };
-host_modules= { module= lto-plugin; bootstrap=true; };
+host_modules= { module= lto-plugin; bootstrap=true;
+		extra_configure_flags=--enable-shared; };
 
 target_modules = { module= libstdc++-v3;
 		   bootstrap=true;
@@ -321,6 +322,7 @@ dependencies = { module=all-build-fixincludes; on=all-build-libiberty; };
 
 // Host modules specific to gcc.
 dependencies = { module=configure-gcc; on=configure-intl; };
+dependencies = { module=configure-gcc; on=all-lto-plugin; };
 dependencies = { module=configure-gcc; on=all-binutils; };
 dependencies = { module=configure-gcc; on=all-gas; };
 dependencies = { module=configure-gcc; on=all-ld; };
@@ -344,11 +346,13 @@ dependencies = { module=all-gcc; on=all-libcpp; hard=true; };
 dependencies = { module=all-gcc; on=all-libdecnumber; hard=true; };
 dependencies = { module=all-gcc; on=all-libiberty; };
 dependencies = { module=all-gcc; on=all-fixincludes; };
+dependencies = { module=all-gcc; on=all-lto-plugin; };
 dependencies = { module=info-gcc; on=all-build-libiberty; };
 dependencies = { module=dvi-gcc; on=all-build-libiberty; };
 dependencies = { module=pdf-gcc; on=all-build-libiberty; };
 dependencies = { module=html-gcc; on=all-build-libiberty; };
 dependencies = { module=install-gcc ; on=install-fixincludes; };
+dependencies = { module=install-gcc ; on=install-lto-plugin; };
 dependencies = { module=install-strip-gcc ; on=install-strip-fixincludes; };
 
 dependencies = { module=configure-libcpp; on=configure-libiberty; hard=true; };
@@ -360,7 +364,7 @@ dependencies = { module=all-fixincludes; on=all-libiberty; };
 
 dependencies = { module=all-gnattools; on=all-target-libada; };
 
-dependencies = { module=all-lto-plugin; on=all-gcc; };
+dependencies = { module=all-lto-plugin; on=all-libiberty; };
 
 dependencies = { module=configure-mpfr; on=all-gmp; };
 dependencies = { module=configure-mpc; on=all-mpfr; };
diff --git a/Makefile.in b/Makefile.in
index 945fc5d..660f813 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -3,7 +3,7 @@
 #
 # Makefile for directory with subdirs to build.
 #   Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-#   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation
 #
 # This file is free software; you can redistribute it and/or modify
@@ -45248,7 +45248,7 @@ configure-lto-plugin:
 	libsrcdir="$$s/lto-plugin"; \
 	$(SHELL) $${libsrcdir}/configure \
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
+	  --target=${target_alias} $${srcdiroption} --enable-shared \
 	  || exit 1
 @endif lto-plugin
 
@@ -45282,7 +45282,8 @@ configure-stage1-lto-plugin:
 	$(SHELL) $${libsrcdir}/configure \
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
 	  --target=${target_alias} $${srcdiroption} \
-	  $(STAGE1_CONFIGURE_FLAGS)
+	  $(STAGE1_CONFIGURE_FLAGS) \
+	  --enable-shared
 @endif lto-plugin-bootstrap
 
 .PHONY: configure-stage2-lto-plugin maybe-configure-stage2-lto-plugin
@@ -45315,7 +45316,8 @@ configure-stage2-lto-plugin:
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
 	  --target=${target_alias} $${srcdiroption} \
 	  --with-build-libsubdir=$(HOST_SUBDIR) \
-	  $(STAGE2_CONFIGURE_FLAGS)
+	  $(STAGE2_CONFIGURE_FLAGS) \
+	  --enable-shared
 @endif lto-plugin-bootstrap
 
 .PHONY: configure-stage3-lto-plugin maybe-configure-stage3-lto-plugin
@@ -45348,7 +45350,8 @@ configure-stage3-lto-plugin:
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
 	  --target=${target_alias} $${srcdiroption} \
 	  --with-build-libsubdir=$(HOST_SUBDIR) \
-	  $(STAGE3_CONFIGURE_FLAGS)
+	  $(STAGE3_CONFIGURE_FLAGS) \
+	  --enable-shared
 @endif lto-plugin-bootstrap
 
 .PHONY: configure-stage4-lto-plugin maybe-configure-stage4-lto-plugin
@@ -45381,7 +45384,8 @@ configure-stage4-lto-plugin:
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
 	  --target=${target_alias} $${srcdiroption} \
 	  --with-build-libsubdir=$(HOST_SUBDIR) \
-	  $(STAGE4_CONFIGURE_FLAGS)
+	  $(STAGE4_CONFIGURE_FLAGS) \
+	  --enable-shared
 @endif lto-plugin-bootstrap
 
 .PHONY: configure-stageprofile-lto-plugin maybe-configure-stageprofile-lto-plugin
@@ -45414,7 +45418,8 @@ configure-stageprofile-lto-plugin:
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
 	  --target=${target_alias} $${srcdiroption} \
 	  --with-build-libsubdir=$(HOST_SUBDIR) \
-	  $(STAGEprofile_CONFIGURE_FLAGS)
+	  $(STAGEprofile_CONFIGURE_FLAGS) \
+	  --enable-shared
 @endif lto-plugin-bootstrap
 
 .PHONY: configure-stagefeedback-lto-plugin maybe-configure-stagefeedback-lto-plugin
@@ -45447,7 +45452,8 @@ configure-stagefeedback-lto-plugin:
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
 	  --target=${target_alias} $${srcdiroption} \
 	  --with-build-libsubdir=$(HOST_SUBDIR) \
-	  $(STAGEfeedback_CONFIGURE_FLAGS)
+	  $(STAGEfeedback_CONFIGURE_FLAGS) \
+	  --enable-shared
 @endif lto-plugin-bootstrap
 
 
@@ -60260,6 +60266,14 @@ configure-stage3-gcc: maybe-configure-stage3-intl
 configure-stage4-gcc: maybe-configure-stage4-intl
 configure-stageprofile-gcc: maybe-configure-stageprofile-intl
 configure-stagefeedback-gcc: maybe-configure-stagefeedback-intl
+configure-gcc: maybe-all-lto-plugin
+
+configure-stage1-gcc: maybe-all-stage1-lto-plugin
+configure-stage2-gcc: maybe-all-stage2-lto-plugin
+configure-stage3-gcc: maybe-all-stage3-lto-plugin
+configure-stage4-gcc: maybe-all-stage4-lto-plugin
+configure-stageprofile-gcc: maybe-all-stageprofile-lto-plugin
+configure-stagefeedback-gcc: maybe-all-stagefeedback-lto-plugin
 configure-gcc: maybe-all-binutils
 
 configure-stage1-gcc: maybe-all-stage1-binutils
@@ -60437,6 +60451,14 @@ all-stage4-gcc: maybe-all-stage4-libiberty
 all-stageprofile-gcc: maybe-all-stageprofile-libiberty
 all-stagefeedback-gcc: maybe-all-stagefeedback-libiberty
 all-gcc: maybe-all-fixincludes
+all-gcc: maybe-all-lto-plugin
+
+all-stage1-gcc: maybe-all-stage1-lto-plugin
+all-stage2-gcc: maybe-all-stage2-lto-plugin
+all-stage3-gcc: maybe-all-stage3-lto-plugin
+all-stage4-gcc: maybe-all-stage4-lto-plugin
+all-stageprofile-gcc: maybe-all-stageprofile-lto-plugin
+all-stagefeedback-gcc: maybe-all-stagefeedback-lto-plugin
 info-gcc: maybe-all-build-libiberty
 
 info-stage1-gcc: maybe-all-build-libiberty
@@ -60470,6 +60492,7 @@ html-stage4-gcc: maybe-all-build-libiberty
 html-stageprofile-gcc: maybe-all-build-libiberty
 html-stagefeedback-gcc: maybe-all-build-libiberty
 install-gcc: maybe-install-fixincludes
+install-gcc: maybe-install-lto-plugin
 install-strip-gcc: maybe-install-strip-fixincludes
 configure-libcpp: configure-libiberty
 
@@ -60505,14 +60528,14 @@ all-stageprofile-libcpp: maybe-all-stageprofile-intl
 all-stagefeedback-libcpp: maybe-all-stagefeedback-intl
 all-fixincludes: maybe-all-libiberty
 all-gnattools: maybe-all-target-libada
-all-lto-plugin: maybe-all-gcc
-
-all-stage1-lto-plugin: maybe-all-stage1-gcc
-all-stage2-lto-plugin: maybe-all-stage2-gcc
-all-stage3-lto-plugin: maybe-all-stage3-gcc
-all-stage4-lto-plugin: maybe-all-stage4-gcc
-all-stageprofile-lto-plugin: maybe-all-stageprofile-gcc
-all-stagefeedback-lto-plugin: maybe-all-stagefeedback-gcc
+all-lto-plugin: maybe-all-libiberty
+
+all-stage1-lto-plugin: maybe-all-stage1-libiberty
+all-stage2-lto-plugin: maybe-all-stage2-libiberty
+all-stage3-lto-plugin: maybe-all-stage3-libiberty
+all-stage4-lto-plugin: maybe-all-stage4-libiberty
+all-stageprofile-lto-plugin: maybe-all-stageprofile-libiberty
+all-stagefeedback-lto-plugin: maybe-all-stagefeedback-libiberty
 configure-mpfr: maybe-all-gmp
 
 configure-stage1-mpfr: maybe-all-stage1-gmp
diff --git a/Makefile.tpl b/Makefile.tpl
index f9a2936..7ad0896 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -6,7 +6,7 @@ in
 #
 # Makefile for directory with subdirs to build.
 #   Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-#   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation
 #
 # This file is free software; you can redistribute it and/or modify
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 35d534f..64e1ccd 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,21 @@
+2011-02-09  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_edit_toc): Don't free toc relocs until
+	we are done.  When optimising large toc, check that a global
+	symbol on a toc reloc is defined in a kept section.
+
+2011-02-08  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/12467
+	* elf.c (assign_file_positions_for_load_sections): Set the program
+	header offset and entry size to zero if there are no program
+	headers.
+
+2011-02-08  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_edit_toc): Don't segfault on NULL
+	local_syms when looking for local symbols in .toc.
+
 2011-02-01  Alan Modra  <amodra@gmail.com>
 
 	* elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value
diff --git a/bfd/elf.c b/bfd/elf.c
index 257cc8c..c77dced 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -4334,8 +4334,18 @@ assign_file_positions_for_load_sections (bfd *abfd,
 	header_pad = m->header_size;
     }
 
-  elf_elfheader (abfd)->e_phoff = bed->s->sizeof_ehdr;
-  elf_elfheader (abfd)->e_phentsize = bed->s->sizeof_phdr;
+  if (alloc)
+    {
+      elf_elfheader (abfd)->e_phoff = bed->s->sizeof_ehdr;
+      elf_elfheader (abfd)->e_phentsize = bed->s->sizeof_phdr;
+    }
+  else
+    {
+      /* PR binutils/12467.  */
+      elf_elfheader (abfd)->e_phoff = 0;
+      elf_elfheader (abfd)->e_phentsize = 0;
+    }
+  
   elf_elfheader (abfd)->e_phnum = alloc;
 
   if (elf_tdata (abfd)->program_header_size == (bfd_size_type) -1)
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index d020928..25d0d2e 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -1,6 +1,6 @@
 /* PowerPC64-specific support for 64-bit ELF.
    Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-   2009, 2010 Free Software Foundation, Inc.
+   2009, 2010, 2011 Free Software Foundation, Inc.
    Written by Linus Nordberg, Swox AB <info@swox.com>,
    based on elf32-ppc.c by Ian Lance Taylor.
    Largely rewritten by Alan Modra.
@@ -7907,7 +7907,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info)
       asection *toc, *sec;
       Elf_Internal_Shdr *symtab_hdr;
       Elf_Internal_Sym *local_syms;
-      Elf_Internal_Rela *relstart, *rel;
+      Elf_Internal_Rela *relstart, *rel, *toc_relocs;
       unsigned long *skip, *drop;
       unsigned char *used;
       unsigned char *keep, last, some_unused;
@@ -7922,6 +7922,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info)
 	  || elf_discarded_section (toc))
 	continue;
 
+      toc_relocs = NULL;
       local_syms = NULL;
       symtab_hdr = &elf_symtab_hdr (ibfd);
 
@@ -8017,12 +8018,12 @@ ppc64_elf_edit_toc (struct bfd_link_info *info)
 	  && toc->reloc_count != 0)
 	{
 	  /* Read toc relocs.  */
-	  relstart = _bfd_elf_link_read_relocs (ibfd, toc, NULL, NULL,
-						info->keep_memory);
-	  if (relstart == NULL)
+	  toc_relocs = _bfd_elf_link_read_relocs (ibfd, toc, NULL, NULL,
+						  info->keep_memory);
+	  if (toc_relocs == NULL)
 	    goto error_ret;
 
-	  for (rel = relstart; rel < relstart + toc->reloc_count; ++rel)
+	  for (rel = toc_relocs; rel < toc_relocs + toc->reloc_count; ++rel)
 	    {
 	      enum elf_ppc64_reloc_type r_type;
 	      unsigned long r_symndx;
@@ -8040,6 +8041,10 @@ ppc64_elf_edit_toc (struct bfd_link_info *info)
 			      r_symndx, ibfd))
 		goto error_ret;
 
+	      if (sym_sec == NULL
+		  || elf_discarded_section (sym_sec))
+		continue;
+
 	      if (!SYMBOL_CALLS_LOCAL (info, h))
 		continue;
 
@@ -8078,11 +8083,8 @@ ppc64_elf_edit_toc (struct bfd_link_info *info)
 		}
 
 	      skip[rel->r_offset >> 3]
-		|= can_optimize | ((rel - relstart) << 2);
+		|= can_optimize | ((rel - toc_relocs) << 2);
 	    }
-
-	  if (elf_section_data (toc)->relocs != relstart)
-	    free (relstart);
 	}
 
       if (skip == NULL)
@@ -8099,6 +8101,9 @@ ppc64_elf_edit_toc (struct bfd_link_info *info)
 	      && relstart != NULL
 	      && elf_section_data (sec)->relocs != relstart)
 	    free (relstart);
+	  if (toc_relocs != NULL
+	      && elf_section_data (toc)->relocs != toc_relocs)
+	    free (toc_relocs);
 	  if (skip != NULL)
 	    free (skip);
 	  return FALSE;
@@ -8338,7 +8343,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info)
 		  else if ((skip[val >> 3] & can_optimize) != 0)
 		    {
 		      Elf_Internal_Rela *tocrel
-			= elf_section_data (toc)->relocs + (skip[val >> 3] >> 2);
+			= toc_relocs + (skip[val >> 3] >> 2);
 		      unsigned long tsym = ELF64_R_SYM (tocrel->r_info);
 
 		      switch (r_type)
@@ -8372,34 +8377,35 @@ ppc64_elf_edit_toc (struct bfd_link_info *info)
 
 	  /* We shouldn't have local or global symbols defined in the TOC,
 	     but handle them anyway.  */
-	  for (sym = local_syms;
-	       sym < local_syms + symtab_hdr->sh_info;
-	       ++sym)
-	    if (sym->st_value != 0
-		&& bfd_section_from_elf_index (ibfd, sym->st_shndx) == toc)
-	      {
-		unsigned long i;
+	  if (local_syms != NULL)
+	    for (sym = local_syms;
+		 sym < local_syms + symtab_hdr->sh_info;
+		 ++sym)
+	      if (sym->st_value != 0
+		  && bfd_section_from_elf_index (ibfd, sym->st_shndx) == toc)
+		{
+		  unsigned long i;
 
-		if (sym->st_value > toc->rawsize)
-		  i = toc->rawsize >> 3;
-		else
-		  i = sym->st_value >> 3;
+		  if (sym->st_value > toc->rawsize)
+		    i = toc->rawsize >> 3;
+		  else
+		    i = sym->st_value >> 3;
 
-		if ((skip[i] & (ref_from_discarded | can_optimize)) != 0)
-		  {
-		    if (local_toc_syms)
-		      (*_bfd_error_handler)
-			(_("%s defined on removed toc entry"),
-			 bfd_elf_sym_name (ibfd, symtab_hdr, sym, NULL));
-		    do
-		      ++i;
-		    while ((skip[i] & (ref_from_discarded | can_optimize)));
-		    sym->st_value = (bfd_vma) i << 3;
-		  }
+		  if ((skip[i] & (ref_from_discarded | can_optimize)) != 0)
+		    {
+		      if (local_toc_syms)
+			(*_bfd_error_handler)
+			  (_("%s defined on removed toc entry"),
+			   bfd_elf_sym_name (ibfd, symtab_hdr, sym, NULL));
+		      do
+			++i;
+		      while ((skip[i] & (ref_from_discarded | can_optimize)));
+		      sym->st_value = (bfd_vma) i << 3;
+		    }
 
-		sym->st_value -= skip[i];
-		symtab_hdr->contents = (unsigned char *) local_syms;
-	      }


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]