• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to switch GDB disassembly from Thumb to ARM?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to switch GDB disassembly from Thumb to ARM?


  • Subject: Re: How to switch GDB disassembly from Thumb to ARM?
  • From: Don Quixote de la Mancha <email@hidden>
  • Date: Wed, 09 Nov 2011 09:49:52 -0800

On Wed, Nov 9, 2011 at 9:39 AM, Don Quixote de la Mancha
<email@hidden> wrote:
> .globl _IntNoArgs
> .align 2
> .code 16

That should actually be ".align 1".  The parameter to .align is the
power to which two is raised to yield the alignment.  ".code 16"
generates Thumb code, which wants 2-byte alignment.

> .align 4
> .code 32

That should be ".align 2" to yield 4-byte alignment for 32-bit ARM code.

Having a larger alignment than called for doesn't introduce any bugs,
but it does waste space in my object code.  Before I fixed this, I was
seeing mysterious nop instructions whenever I would switch from Thumb
to ARM, which the assembler inserted to satisfy the alignment.  It
really should have generated a warning as well.


--
Don Quixote de la Mancha
Dulcinea Technologies Corporation
Software of Elegance and Beauty
http://www.dulcineatech.com
email@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >How to switch GDB disassembly from Thumb to ARM? (From: Don Quixote de la Mancha <email@hidden>)

  • Prev by Date: How to switch GDB disassembly from Thumb to ARM?
  • Next by Date: Re: How to switch GDB disassembly from Thumb to ARM?
  • Previous by thread: How to switch GDB disassembly from Thumb to ARM?
  • Next by thread: Re: How to switch GDB disassembly from Thumb to ARM?
  • Index(es):
    • Date
    • Thread