Functions in assembly only get LSB set if .type precedes the label
While building libffi for purecap Morello I noticed that the functions written in assembly were not getting the LSB set so were entered without C64 and trapped immediately.
It turns out the assembly file has .type ffi_call_SYSV, #function
, but the directive is after the label declaration, and this results in an object file without the LSB set in the resulting symbol.
working:
.global foo
.type foo, @function
foo:
ret c30
.size foo, .-foo
broken:
.global foo
foo:
ret c30
.type foo, @function
.size foo, .-foo
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information