Linking failure on aarch64

FX fxcoudert at gmail.com
Wed Jul 1 22:40:19 UTC 2020


>  Does it work better if you use the documented --disable-assembly instead?

Indeed it does, everything works fine then. Thanks!

> Apple uses the archaic convention of prepending an underscrore to glocal
> symbols.  GMP handles that for really ancient BSD systems as well as for
> Macos on Powerpc and x86.  But GMP does not handle that for Macos on
> Arm.

If I don’t disable assembly, the compiler’s not happy with the asm code:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_dcpi1_bdiv_q -O2 -pedantic -march=armv8-a -c dcpi1_bdiv_q.c -o dcpi1_bdiv_q.o >/dev/null 2>&1
tmp-bdiv_q_1.s:75:2: error: ADR/ADRP relocations must be GOT relative
 adrp x7, :got:__gmp_binvert_limb_table
 ^
tmp-bdiv_q_1.s:75:2: error: unknown AArch64 fixup kind!
 adrp x7, :got:__gmp_binvert_limb_table
 ^
tmp-bdiv_q_1.s:77:2: error: unknown AArch64 fixup kind!
 ldr x7, [x7, #:got_lo12:__gmp_binvert_limb_table]
 ^

which happens in both tmp-bdiv_q_1.s and tmp-invert_limb.s

FX


More information about the gmp-bugs mailing list