]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
authorRichard Henderson <rth@redhat.com>
Thu, 2 May 2002 17:48:14 +0000 (17:48 +0000)
committerRichard Henderson <rth@redhat.com>
Thu, 2 May 2002 17:48:14 +0000 (17:48 +0000)
        vs SHN_UNDEF to zero.

bfd/ChangeLog
bfd/elf64-alpha.c

index 98c19e57faba06a371777959e1180906f36dbff3..b6e2fc3b6699fcd87c7702a799649a7957dac646 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-02  Richard Henderson  <rth@redhat.com>
+
+       * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
+       vs SHN_UNDEF to zero.
+
 2002-04-27  Alan Modra  <amodra@bigpond.net.au>
 
        Merge from mainline
index 550de530fbb38b5710f9d0fb59221de92efc72dc..faf9944d2bc76867ec67724ab219fc7c9916c3c9 100644 (file)
@@ -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,