summaryrefslogtreecommitdiff
path: root/bfd/elf64-alpha.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-05-02 17:46:59 +0000
committerRichard Henderson <rth@redhat.com>2002-05-02 17:46:59 +0000
commit0087853594351697bd52f4b4cbc4065c7ecc22aa (patch)
tree2d0e1f7a5103cd57f5886944e9a7387530c6e0a1 /bfd/elf64-alpha.c
parentfba8a20b041b2c724f26c1ef93f409f4d894c616 (diff)
downloadbinutils-redhat-0087853594351697bd52f4b4cbc4065c7ecc22aa.tar.gz
* elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
vs SHN_UNDEF to zero.
Diffstat (limited to 'bfd/elf64-alpha.c')
-rw-r--r--bfd/elf64-alpha.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 7151f0677d..94b4ebe056 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -3695,6 +3695,16 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
}
goto default_reloc;
+ case R_ALPHA_SREL32:
+ case R_ALPHA_SREL64:
+ /* ??? .eh_frame references to discarded sections will be smashed
+ to relocations against SHN_UNDEF. The .eh_frame format allows
+ NULL to be encoded as 0 in any format, so this works here. */
+ if (r_symndx == 0)
+ howto = (elf64_alpha_howto_table
+ + (r_type - R_ALPHA_SREL32 + R_ALPHA_REFLONG));
+ goto default_reloc;
+
default:
default_reloc:
r = _bfd_final_link_relocate (howto, input_bfd, input_section,