include/elf
[deliverable/binutils-gdb.git] / bfd / elf32-m32c.c
index 20dcf37361037fa18b534ad1b2b1d4946b410b67..5f45784f36828f240f43ec6136f0cc21adaaf6e2 100644 (file)
@@ -1,5 +1,5 @@
 /* M16C/M32C specific support for 32-bit ELF.
 /* M16C/M32C specific support for 32-bit ELF.
-   Copyright (C) 2005, 2006, 2007
+   Copyright (C) 2005, 2006, 2007, 2008
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -847,7 +847,7 @@ m32c_elf_print_private_bfd_data (bfd *abfd, PTR ptr)
   _bfd_elf_print_private_bfd_data (abfd, ptr);
 
   flags = elf_elfheader (abfd)->e_flags;
   _bfd_elf_print_private_bfd_data (abfd, ptr);
 
   flags = elf_elfheader (abfd)->e_flags;
-  fprintf (file, _("private flags = 0x%lx:"), (long)flags);
+  fprintf (file, _("private flags = 0x%lx:"), (unsigned long) flags);
 
   switch (flags & EF_M32C_CPU_MASK)
     {
 
   switch (flags & EF_M32C_CPU_MASK)
     {
@@ -1984,10 +1984,21 @@ m32c_elf_relax_delete_bytes
 
   return TRUE;
 }
 
   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
 #define ELF_MACHINE_CODE       EM_M32C
 \f
 
 #define ELF_ARCH               bfd_arch_m32c
 #define ELF_MACHINE_CODE       EM_M32C
+#define ELF_MACHINE_ALT1       EM_M32C_OLD
 #define ELF_MAXPAGESIZE                0x1000
 
 #if 0
 #define ELF_MAXPAGESIZE                0x1000
 
 #if 0
@@ -2011,6 +2022,7 @@ m32c_elf_relax_delete_bytes
   m32c_elf_finish_dynamic_sections
 
 #define elf_backend_can_gc_sections            1
   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
 
 #define bfd_elf32_bfd_reloc_type_lookup                m32c_reloc_type_lookup
 #define bfd_elf32_bfd_reloc_name_lookup        m32c_reloc_name_lookup
This page took 0.024441 seconds and 4 git commands to generate.