Compiling with xcode and --enable-amd64-51-30k has invalid .section in consts.S
Closed this issue · 13 comments
Hi,
I think that there should be some ifdef for compiling with xcode and ./configure --enable-amd64-51-30k, as it gives:
ed25519/amd64-51-30k/consts.S:1:17: error: unexpected token in '.section' directive
.section .rodata
make: *** [ed25519/amd64-51-30k/consts.S.o] Error 1
I fixed it on my end with:
.text
.global .rodata
.globl CRYPTO_NAMESPACE(batch_REDMASK51)
...
Instead of the .section that's there.
Thanks.
have you tried substituting .section .rodata
with .const
or .data
instead?
it seems that it changed when i ported this to new SUPERCOP, at f374555
used to be .data
, i can't really find whether linux supports this but .const
seems like it would be MacOS equivalent to what .section .rodata
should do on linux.
i guess i could either do conditional compile to use .const
for macos, or .data
for all targets.
i don't have a mac to test with
Let me check.
That gives me:
ed25519/amd64-51-30k/consts.S:1:8: error: unexpected token in section switching directive
.const .rodata
^
make: *** [ed25519/amd64-51-30k/consts.S.o] Error 1
Did I get you right on .const .rodata
?
no, just .const
, not .const .rodata
That works (with just .const).
could you try replacing it with
#ifndef __APPLE__
.section .rodata
#else
.const
#endif
and tell if that works
Works well. Thank you.
Guess this should be applied to amd64-64-24k etc., as well.
yeah.
I'll re-clone and compile, just for good measure.
Compiled with four different flags on latest and all pass. Thank you!