summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2003-05-28 03:32:33 +0000
committerobrien <obrien@FreeBSD.org>2003-05-28 03:32:33 +0000
commit12178a6e04f2bbfbb89740b5e76d20ba1855e157 (patch)
tree46eb0df80f13c871226ec21310bac2bb2410e4c2
parentb09db08f24802a7064b4bc3073d6dd77af6e6424 (diff)
downloadFreeBSD-src-12178a6e04f2bbfbb89740b5e76d20ba1855e157.zip
FreeBSD-src-12178a6e04f2bbfbb89740b5e76d20ba1855e157.tar.gz
From FSF Binutils CVS repo:
2003-04-09 Richard Henderson <rth@redhat.com> * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>: Ignore relocations against r_symndx == 0. Requested by: kris,re(scottl)
-rw-r--r--contrib/binutils/bfd/elf64-alpha.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/contrib/binutils/bfd/elf64-alpha.c b/contrib/binutils/bfd/elf64-alpha.c
index 7397ed1..fc0aedd 100644
--- a/contrib/binutils/bfd/elf64-alpha.c
+++ b/contrib/binutils/bfd/elf64-alpha.c
@@ -19,6 +19,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+/* $FreeBSD$ */
+
/* We need a published ABI spec for this. Until one comes out, don't
assume this'll remain unchanged forever. */
@@ -4490,8 +4492,20 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
value -= gp;
goto default_reloc;
- case R_ALPHA_GPREL16:
case R_ALPHA_GPREL32:
+ /* If the target section was a removed linkonce section,
+ r_symndx will be zero. In this case, assume that the
+ switch will not be used, so don't fill it in. If we
+ do nothing here, we'll get relocation truncated messages,
+ due to the placement of the application above 4GB. */
+ if (r_symndx == 0)
+ {
+ r = bfd_reloc_ok;
+ break;
+ }
+ /* FALLTHRU */
+
+ case R_ALPHA_GPREL16:
case R_ALPHA_GPRELLOW:
if (dynamic_symbol_p)
{
OpenPOWER on IntegriCloud