SHA256
1
0
forked from pool/binutils
binutils/binutils-2.24-branch.diff

302 lines
9.5 KiB
Diff
Raw Normal View History

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 2c4719c..30543c2 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,26 @@
+2013-12-08 Alan Modra <amodra@gmail.com>
+
+ * elflink.c (_bfd_elf_add_default_symbol): Set dynamic_def
+ and ref_dynamic_nonweak when chaining together indirect
+ symbols.
+
+2013-12-05 Alan Modra <amodra@gmail.com>
+
+ * elf64-ppc.c (ppc_build_one_stub <ppc_stub_plt_branch_r2off>):
+ Don't omit saving of r2 for ELFv2. Don't addi 2,2,0.
+ (ppc_size_one_stub <ppc_stub_plt_branch_r2off>): Adjust to suit.
+
+2013-12-05 Alan Modra <amodra@gmail.com>
+
+ * elf64-ppc.c (ppc64_elf_link_just_syms): Remove .got check.
+ Handle ELFv2.
+
+2013-12-02 Tristan Gingold <gingold@adacore.com>
+
+ * configure.in: Bump version to 2.24.0
+ * Makefile.am (RELEASE): Unset.
+ * configure, Makefile.in: Regenerate.
+
2013-12-02 Tristan Gingold <gingold@adacore.com>
* configure.in: Bump version to 2.24
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index c645563..6f0e477 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -21,7 +21,7 @@ AUTOMAKE_OPTIONS = 1.11 no-dist foreign
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
# Uncomment the following line when doing a release.
-RELEASE=y
+# RELEASE=y
INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 78d2d2c..8a38a76 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -339,7 +339,7 @@ AUTOMAKE_OPTIONS = 1.11 no-dist foreign
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
# Uncomment the following line when doing a release.
-RELEASE = y
+# RELEASE=y
INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
SUBDIRS = doc po
diff --git a/bfd/configure b/bfd/configure
index 90cd397..7facd8a 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for bfd 2.24.
+# Generated by GNU Autoconf 2.64 for bfd 2.24.0.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='bfd'
PACKAGE_TARNAME='bfd'
-PACKAGE_VERSION='2.24'
-PACKAGE_STRING='bfd 2.24'
+PACKAGE_VERSION='2.24.0'
+PACKAGE_STRING='bfd 2.24.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1349,7 +1349,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures bfd 2.24 to adapt to many kinds of systems.
+\`configure' configures bfd 2.24.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1420,7 +1420,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of bfd 2.24:";;
+ short | recursive ) echo "Configuration of bfd 2.24.0:";;
esac
cat <<\_ACEOF
@@ -1541,7 +1541,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-bfd configure 2.24
+bfd configure 2.24.0
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2183,7 +2183,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by bfd $as_me 2.24, which was
+It was created by bfd $as_me 2.24.0, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
@@ -3991,7 +3991,7 @@ fi
# Define the identity of the package.
PACKAGE='bfd'
- VERSION='2.24'
+ VERSION='2.24.0'
cat >>confdefs.h <<_ACEOF
@@ -16481,7 +16481,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by bfd $as_me 2.24, which was
+This file was extended by bfd $as_me 2.24.0, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16545,7 +16545,7 @@ Report bugs to the package provider."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-bfd config.status 2.24
+bfd config.status 2.24.0
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/bfd/configure.in b/bfd/configure.in
index 0e88d78..24ca63a 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -18,7 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
dnl
AC_PREREQ(2.59)
-AC_INIT([bfd], [2.24])
+AC_INIT([bfd], [2.24.0])
AC_CONFIG_SRCDIR([libbfd.c])
AC_CANONICAL_TARGET
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index bf13a5d..96719a9 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -5001,10 +5001,8 @@ ppc64_elf_link_just_syms (asection *sec, struct bfd_link_info *info)
&& (sec->owner->flags & (EXEC_P | DYNAMIC)) != 0
&& is_ppc64_elf (sec->owner))
{
- asection *got = bfd_get_section_by_name (sec->owner, ".got");
- if (got != NULL
- && got->size >= elf_backend_got_header_size
- && bfd_get_section_by_name (sec->owner, ".opd") != NULL)
+ if (abiversion (sec->owner) >= 2
+ || bfd_get_section_by_name (sec->owner, ".opd") != NULL)
sec->has_toc_reloc = 1;
}
_bfd_elf_link_just_syms (sec, info);
@@ -10599,8 +10597,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
r[0].r_offset = loc - stub_entry->stub_sec->contents;
if (bfd_big_endian (info->output_bfd))
r[0].r_offset += 2;
- if (stub_entry->stub_type == ppc_stub_plt_branch_r2off
- && htab->opd_abi)
+ if (stub_entry->stub_type == ppc_stub_plt_branch_r2off)
r[0].r_offset += 4;
r[0].r_info = ELF64_R_INFO (0, R_PPC64_TOC16_DS);
r[0].r_addend = dest;
@@ -10613,8 +10610,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
}
}
- if (stub_entry->stub_type != ppc_stub_plt_branch_r2off
- || !htab->opd_abi)
+ if (stub_entry->stub_type != ppc_stub_plt_branch_r2off)
{
if (PPC_HA (off) != 0)
{
@@ -10633,7 +10629,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
{
bfd_vma r2off = get_r2off (info, stub_entry);
- if (r2off == 0)
+ if (r2off == 0 && htab->opd_abi)
{
htab->stub_error = TRUE;
return FALSE;
@@ -10641,28 +10637,29 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
bfd_put_32 (htab->stub_bfd, STD_R2_0R1 + STK_TOC (htab), loc);
loc += 4;
- size = 20;
+ size = 16;
if (PPC_HA (off) != 0)
{
size += 4;
bfd_put_32 (htab->stub_bfd, ADDIS_R11_R2 | PPC_HA (off), loc);
loc += 4;
bfd_put_32 (htab->stub_bfd, LD_R12_0R11 | PPC_LO (off), loc);
- loc += 4;
}
else
- {
- bfd_put_32 (htab->stub_bfd, LD_R12_0R2 | PPC_LO (off), loc);
- loc += 4;
- }
+ bfd_put_32 (htab->stub_bfd, LD_R12_0R2 | PPC_LO (off), loc);
if (PPC_HA (r2off) != 0)
{
size += 4;
+ loc += 4;
bfd_put_32 (htab->stub_bfd, ADDIS_R2_R2 | PPC_HA (r2off), loc);
+ }
+ if (PPC_LO (r2off) != 0)
+ {
+ size += 4;
loc += 4;
+ bfd_put_32 (htab->stub_bfd, ADDI_R2_R2 | PPC_LO (r2off), loc);
}
- bfd_put_32 (htab->stub_bfd, ADDI_R2_R2 | PPC_LO (r2off), loc);
}
loc += 4;
bfd_put_32 (htab->stub_bfd, MTCTR_R12, loc);
@@ -10956,8 +10953,7 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
stub_entry->stub_sec->flags |= SEC_RELOC;
}
- if (stub_entry->stub_type != ppc_stub_plt_branch_r2off
- || !htab->opd_abi)
+ if (stub_entry->stub_type != ppc_stub_plt_branch_r2off)
{
size = 12;
if (PPC_HA (off) != 0)
@@ -10965,12 +10961,14 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
}
else
{
- size = 20;
+ size = 16;
if (PPC_HA (off) != 0)
size += 4;
if (PPC_HA (r2off) != 0)
size += 4;
+ if (PPC_LO (r2off) != 0)
+ size += 4;
}
}
else if (info->emitrelocations)
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 99b7ca1..78eb67b 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -1702,6 +1702,12 @@ _bfd_elf_add_default_symbol (bfd *abfd,
ht = (struct elf_link_hash_entry *) hi->root.u.i.link;
(*bed->elf_backend_copy_indirect_symbol) (info, ht, hi);
+ /* A reference to the SHORTNAME symbol from a dynamic library
+ will be satisfied by the versioned symbol at runtime. In
+ effect, we have a reference to the versioned symbol. */
+ ht->ref_dynamic_nonweak |= hi->ref_dynamic_nonweak;
+ hi->dynamic_def |= ht->dynamic_def;
+
/* See if the new flags lead us to realize that the symbol must
be dynamic. */
if (! *dynsym)
@@ -1771,6 +1777,8 @@ nondefault:
if (hi->root.type == bfd_link_hash_indirect)
{
(*bed->elf_backend_copy_indirect_symbol) (info, h, hi);
+ h->ref_dynamic_nonweak |= hi->ref_dynamic_nonweak;
+ hi->dynamic_def |= h->dynamic_def;
/* See if the new flags lead us to realize that the symbol
must be dynamic. */
diff --git a/bfd/version.h b/bfd/version.h
index dec6798..8916db3 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20131202
+#define BFD_VERSION_DATE 20131209
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
#define REPORT_BUGS_TO @report_bugs_to@