From 72c17e419f5b11a6a09b6db632b78905da55afd1 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 9 Apr 2003 20:08:14 +0000 Subject: [PATCH] * elf64-alpha.c (elf64_alpha_relocate_section) : Ignore relocations against r_symndx == 0. --- bfd/ChangeLog | 5 +++++ bfd/elf64-alpha.c | 14 +++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index eb9b28bc8..2396d5b72 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2003-04-09 Richard Henderson + + * elf64-alpha.c (elf64_alpha_relocate_section) : + Ignore relocations against r_symndx == 0. + 2003-04-09 H.J. Lu * elf64-alpha.c (elf64_alpha_relocate_section): Don't return diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index ddf739555..bf18e205c 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) { -- 2.11.4.GIT