Menu

#466 Macho alignment broken

closed-fixed
Assembler (85)
5
2009-10-17
2009-08-19
Anonymous
No

Hi,

after switching to the latest NASM 2.07, my MacOSX program suddenly segfaulted all-over the place.

It turned out that 16-byte alignment doesn't work anymore in the latest NASM 2.07, breaking SSE instructions.

Here is the code snippet I use in the asm file (am I doing something wrong?):

section .data align=16
_ssg_step: dd 0,0,0,0
_ssg_cubelenm1vec: dd 0,0,0,0
_pme_gridbins: dd 0,0,0,0

After linking the NASM created Macho object code with GCC object code, the address of _ssg_step above was 16 byte aligned with my previous NASM version, but is 2 byte aligned with the latest NASM 2.07.

BTW, my previous nasm -v output was
NASM version 0.98.40 (Apple Computer, Inc. build 11) compiled on Jan 14 2007

I don't remember how or why I ended up with the version above, it could mean that I had the alignment problem already previously, and found that Apple provided a fixed/patched NASM version...?

How do others use SSE code in Macho objects?

Thanks for your help,
Elmar

Discussion

  • Anonymous

    Anonymous - 2009-10-17
    • assigned_to: nobody --> kkanios
    • status: open --> closed-fixed
     
  • Anonymous

    Anonymous - 2009-10-17

    I've isolated the issue and checked-in a fix. Look for it in NASM 2.08.

     

Log in to post a comment.