Hi Alex,
equiv -> .set
align -> .space
string -> .ascii (check the syntax ...)
global -> .globl (in x86-64.linux.ext.s)
as -arch x86_64 x86-64.linux.base.s
x86-64.linux.base.s:1599:32-bit absolute addressing is not supported for x86-64
line 1599:
mov $Nil, %rbx
?? leaq Nil(%rip),%rbx
Alex, compare hello.s:
globl _a
.data
.align 2
_a:
.long 34
.cstring
LC0:
.ascii "Hello, World\0"
.text
globl _main
_main:
LFB3:
pushq %rbp
LCFI0:
movq %rsp, %rbp
LCFI1:
subq $16, %rsp
LCFI2:
movl %edi, -4(%rbp)
movq %rsi, -16(%rbp)
leaq LC0(%rip), %rdi
call _puts
leave
ret
Otherwise, I think it might assemble.
Info from http://en.wikipedia.org/wiki/X86-64#Mac_OS_X
Mac OS X
Mac OS X v10.5 supports 64-bit GUI applications using Cocoa, Quartz,
OpenGL and X11 on 64-bit Intel-based machines, as well as on 64-bit
PowerPC machines.[17] All non-GUI libraries and frameworks also
support 64-bit applications on those platforms. The kernel is 32-bit.
Mac OS X uses an extension of the Universal binary format to package
32- and 64-bit versions of application and library code into a single
file; the most appropriate version is automatically selected at load
time.
Future: Mac OS X v10.6 Snow Leopard will be the first Apple OS to be
able to run on a 64-bit kernel. Initial reports indicate that Snow
Leopard has a "32-bit compatibility mode" to deal with applications
that depend on a 32-bit kernel.[18]
Mac OS X v10.4.7 and higher versions of Mac OS X v10.4 run 64-bit
command-line tools using the POSIX and math libraries on 64-bit
Intel-based machines, just as all versions of Mac OS X v10.4 and
higher run them on 64-bit PowerPC machines. No other libraries or
frameworks work with 64-bit applications in Mac OS X v10.4.[19]
--
UNSUBSCRIBE: mailto:[email protected]?subject=unsubscribe