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: Alan Modra <amodra at gmail dot com>
- To: Tristan Gingold <gingold at adacore dot com>
- Cc: Iain Sandoe <developer at sandoe-acoustics dot co dot uk>, binutils Development <binutils at sourceware dot org>
- Date: Tue, 21 Feb 2012 11:32:08 +1030
- Subject: Re: [Patch bfd/mach-o] implement bfd_get_arch_size for mach-o.
- Authentication-results: mr.google.com; spf=pass (google.com: domain of amodra@gmail.com designates 10.68.242.39 as permitted sender) smtp.mail=amodra@gmail.com; dkim=pass header.i=amodra@gmail.com
- References: <88E88002-F09C-478B-860F-52491B2B3C77@sandoe-acoustics.co.uk> <83975989-DB49-491B-9FF3-8AD3FD35B49D@adacore.com>
On Mon, Feb 20, 2012 at 05:41:23PM +0100, Tristan Gingold wrote:
>
> 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.
You could do that if you check all uses of bfd_get_arch_size. I think
there is only one that might matter, in nm.c, and that could be fixed
to use:
static void
set_print_width (bfd *file)
{
print_width = bfd_get_arch_size (file);
if (print_width < 32)
print_width = 32;
}
--
Alan Modra
Australia Development Lab, IBM