Share

The Netwide Assembler

Tracker: Bugs

5 Macho alignment broken - ID: 2840300
Last Update: Comment added ( kkanios )

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


Nobody/Anonymous ( nobody ) - 2009-08-19 13:26

5

Closed

Fixed

Keith Kanios

Assembler

None

Public


Comment ( 1 )

Date: 2009-10-17 03:09
Sender: kkanios

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


Attached File

No Files Currently Attached

Changes ( 5 )

Field Old Value Date By
status_id Open 2009-10-17 03:09 kkanios
resolution_id None 2009-10-17 03:09 kkanios
assigned_to nobody 2009-10-17 03:09 kkanios
allow_comments 1 2009-10-17 03:09 kkanios
close_date - 2009-10-17 03:09 kkanios