bfd/
authorRichard Sandiford <rdsandiford@googlemail.com>
Fri, 30 Nov 2007 09:01:35 +0000 (09:01 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Fri, 30 Nov 2007 09:01:35 +0000 (09:01 +0000)
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use the
ELF header to choose between 32-bit and 64-bit relocation structures.

bfd/ChangeLog
bfd/elf-eh-frame.c

index 87fc6351dc3382a7a21b63c3a1228ab764d0cef0..c10e1a551e33e9c9f00cfa04b759e3925ca2695f 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-30  Richard Sandiford  <rsandifo@nildram.co.uk>
+
+       * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use the
+       ELF header to choose between 32-bit and 64-bit relocation structures.
+
 2007-11-29  Mark Shinwell  <shinwell@codesourcery.com>
 
        * archures.c (bfd_mach_mips_loongson_2e): New.
index 473e890663f450eb4355417bc1d6cf04ca2454db..db1b9ea5fb1895bccc6411c7e220b9796cc2336c 100644 (file)
@@ -683,7 +683,8 @@ _bfd_elf_discard_section_eh_frame
                          unsigned long r_symndx;
 
 #ifdef BFD64
-                         if (ptr_size == 8)
+                         if (elf_elfheader (abfd)->e_ident[EI_CLASS]
+                             == ELFCLASS64)
                            r_symndx = ELF64_R_SYM (cookie->rel->r_info);
                          else
 #endif