crystal build --no-debug --verbose --emit asm,obj hello.cr
But when i try
gcc hello.s
or
clang hello.s
i receive error i.e. the .asm is not understood ?
crystal build --no-debug --verbose --emit asm,obj hello.cr
But when i try
gcc hello.s
or
clang hello.s
i receive error i.e. the .asm is not understood ?
Try as hello.s
. Itβs been a while since Iβve used gcc
or clang
directly, but I donβt believe theyβre assemblers, but as
is.
Using as produces same errors i.e. assembly not understood.
Version : as -v
GNU assembler version 2.37 (x86_64-portbld-freebsd13.0) using BFD version (GNU Binutils) 2.37
Please share what the error message says.
as hello.s
hello.s: Assembler messages:
hello.s:3231: Error: unbalanced double quotes in operand 1.
hello.s:29335: Warning: stand-alone data16' prefix hello.s:29337: Warning: stand-alone
data16β prefix
hello.s:29338: Warning: stand-alone data16' prefix hello.s:39049: Error: junk
@PLTβ after expression
hello.s:138130: Error: unrecognized symbol type β.Lβ
hello.s:138130: Error: junk at end of line, first unrecognized character is '' hello.s:138136: Error: expected comma after name
.Lβ\"34,16
.type β in .size directive
hello.s:138910: Error: symbol `.Lβ\nββ is already defined
clang hello.s
hello.s:3231:14: error: unexpected token in argument list
leaq β.Lβ\ββ"(%rip), %rax
^
hello.s:138130:15: error: expected STT_<TYPE_IN_UPPER_CASE>, β#β, β@β, β%β or ββ
.type β.Lβ\ββ",@object
^
hello.s:138132:1: error: unknown directive
β.Lβ\ββ":
^
hello.s:138138:15: error: unexpected token in directive
.size β.Lβ\ββ", 16
^
hello.s:138914:1: error: invalid symbol redefinition
β.Lβ\nββ:
^