aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-alpha.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-04-09 20:08:14 +0000
committerRichard Henderson <rth@redhat.com>2003-04-09 20:08:14 +0000
commitec1659c846e09371b2de488becf1f8042d10cc5b (patch)
tree4d7aa41d91988007a6db61bf1a2aee8c6a8fab1a /bfd/elf64-alpha.c
parent90a6fffbda7b597c2ea29b81668218e10a174ff1 (diff)
downloadfsf-binutils-gdb-ec1659c846e09371b2de488becf1f8042d10cc5b.zip
fsf-binutils-gdb-ec1659c846e09371b2de488becf1f8042d10cc5b.tar.gz
fsf-binutils-gdb-ec1659c846e09371b2de488becf1f8042d10cc5b.tar.bz2
* elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
Ignore relocations against r_symndx == 0.
Diffstat (limited to 'bfd/elf64-alpha.c')
-rw-r--r--bfd/elf64-alpha.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index ddf7395..bf18e205 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -4579,8 +4579,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)
{