From 888cab372296966d80fc5d77ec17e1ee226cf56d Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Fri, 30 Nov 2007 09:01:35 +0000 Subject: [PATCH] bfd/ * 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 | 5 +++++ bfd/elf-eh-frame.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 87fc635..c10e1a5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2007-11-30 Richard Sandiford + + * 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 * archures.c (bfd_mach_mips_loongson_2e): New. diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c index 473e890..db1b9ea 100644 --- a/bfd/elf-eh-frame.c +++ b/bfd/elf-eh-frame.c @@ -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 -- 2.7.4