* elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New.
authorDJ Delorie <dj@redhat.com>
Fri, 25 Jan 2008 21:06:11 +0000 (21:06 +0000)
committerDJ Delorie <dj@redhat.com>
Fri, 25 Jan 2008 21:06:11 +0000 (21:06 +0000)
bfd/ChangeLog
bfd/elf32-m32c.c

index 42d637cd6ca254e7eab05681062ce1714c87c097..bfdc20429e66b1f5891bfe87cf648a374401d98b 100644 (file)
@@ -1,3 +1,7 @@
+2008-01-25  DJ Delorie  <dj@redhat.com>
+
+       * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New.
+
 2008-01-25  Kai Tietz  <kai.tietz@onevision.com>
 
        * bfd-in.h: Add mingw I64 support.
index 20dcf37361037fa18b534ad1b2b1d4946b410b67..dd4054118dfe1ee55d84c93ec4810df52083daf2 100644 (file)
@@ -1984,6 +1984,16 @@ m32c_elf_relax_delete_bytes
 
   return TRUE;
 }
+\f
+/* This is for versions of gcc prior to 4.3.  */
+static unsigned int
+_bfd_m32c_elf_eh_frame_address_size (bfd *abfd, asection *sec ATTRIBUTE_UNUSED)
+{
+  if ((elf_elfheader (abfd)->e_flags & EF_M32C_CPU_MASK) == EF_M32C_CPU_M16C)
+    return 2;
+  return 4;
+}
+
 \f
 
 #define ELF_ARCH               bfd_arch_m32c
@@ -2011,6 +2021,7 @@ m32c_elf_relax_delete_bytes
   m32c_elf_finish_dynamic_sections
 
 #define elf_backend_can_gc_sections            1
+#define elf_backend_eh_frame_address_size _bfd_m32c_elf_eh_frame_address_size
 
 #define bfd_elf32_bfd_reloc_type_lookup                m32c_reloc_type_lookup
 #define bfd_elf32_bfd_reloc_name_lookup        m32c_reloc_name_lookup