[Patch bfd/mach-o] implement bfd_get_arch_size for mach-o.

Tristan Gingold gingold@adacore.com
Mon Feb 20 16:41:00 GMT 2012


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;
> }
> 



More information about the Binutils mailing list