public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [Patch bfd/mach-o] implement bfd_get_arch_size for mach-o.
@ 2012-02-17 21:10 Iain Sandoe
  2012-02-20 16:41 ` Tristan Gingold
  0 siblings, 1 reply; 3+ messages in thread
From: Iain Sandoe @ 2012-02-17 21:10 UTC (permalink / raw)
  To: binutils Development; +Cc: Tristan Gingold

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-21  1:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-17 21:10 [Patch bfd/mach-o] implement bfd_get_arch_size for mach-o Iain Sandoe
2012-02-20 16:41 ` Tristan Gingold
2012-02-21  1:02   ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).