This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch bfd/mach-o] implement bfd_get_arch_size for mach-o.
- From: Tristan Gingold <gingold at adacore dot com>
- To: Iain Sandoe <developer at sandoe-acoustics dot co dot uk>
- Cc: binutils Development <binutils at sourceware dot org>
- Date: Mon, 20 Feb 2012 17:41:23 +0100
- Subject: Re: [Patch bfd/mach-o] implement bfd_get_arch_size for mach-o.
- References: <88E88002-F09C-478B-860F-52491B2B3C77@sandoe-acoustics.co.uk>
On Feb 17, 2012, at 10:09 PM, Iain Sandoe wrote:
> without this we (eventually, several patches away) end up with nonsense when processing cfi directives.
Ok from a Mach-O point of view. I wonder why we cannot use this generic code for all flavors.
Just remove the parenthesis around abfd.
Tristan.
>
> 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;
> }
>