[Patch bfd/mach-o] implement bfd_get_arch_size for mach-o.
Iain Sandoe
developer@sandoe-acoustics.co.uk
Fri Feb 17 21:10:00 GMT 2012
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;
}
More information about the Binutils
mailing list