From c006d697e48452ca44388354d7ce9ade74558039 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Fri, 25 Jan 2008 21:06:11 +0000 Subject: [PATCH] * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New. --- bfd/ChangeLog | 4 ++++ bfd/elf32-m32c.c | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 42d637cd6ca..bfdc20429e6 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2008-01-25 DJ Delorie + + * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New. + 2008-01-25 Kai Tietz * bfd-in.h: Add mingw I64 support. diff --git a/bfd/elf32-m32c.c b/bfd/elf32-m32c.c index 20dcf373610..dd4054118df 100644 --- a/bfd/elf32-m32c.c +++ b/bfd/elf32-m32c.c @@ -1984,6 +1984,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 @@ -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 -- 2.30.2