This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Patch bfd/mach-o] implement bfd_get_arch_size for mach-o.
- From: Iain Sandoe <developer at sandoe-acoustics dot co dot uk>
- To: binutils Development <binutils at sourceware dot org>
- Cc: Tristan Gingold <gingold at adacore dot com>
- Date: Fri, 17 Feb 2012 21:09:45 +0000
- Subject: [Patch bfd/mach-o] implement bfd_get_arch_size for mach-o.
without this we (eventually, several patches away) end up with
nonsense when processing cfi directives.
OK?
Iain
bfd:
* bfd.c (bfd_get_arch_size): Implement for mach-o.
bfd/bfd.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 7c14c7a..1a9cc79 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -985,6 +985,8 @@ bfd_get_arch_size (bfd *abfd)
{
if (abfd->xvec->flavour == bfd_target_elf_flavour)
return get_elf_backend_data (abfd)->s->arch_size;
+ else if (abfd->xvec->flavour == bfd_target_mach_o_flavour)
+ return (abfd)->arch_info->bits_per_address;
return -1;
}