This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[bfd,m32c] indicate EH frame address size.


For pre-4.3 versions of gcc (gcc 4.3+ makes the size explicit).

2008-01-25  DJ Delorie  <dj@redhat.com>

	* elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New.

Index: elf32-m32c.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m32c.c,v
retrieving revision 1.15
diff -p -U3 -r1.15  elf32-m32c.c
--- elf32-m32c.c	28 Sep 2007 08:43:45 -0000	1.15
+++ elf32-m32c.c	25 Jan 2008 21:04:50 -0000
@@ -1985,6 +1985,16 @@ m32c_elf_relax_delete_bytes
   return TRUE;
 }
 
+/* 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;
+}
+
+
 
 #define ELF_ARCH		bfd_arch_m32c
 #define ELF_MACHINE_CODE	EM_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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]