This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]