【发布时间】:2014-05-10 09:04:29
【问题描述】:
我正在尝试将一些代码 (tweetnacl) 交叉编译到 arm-none-eabi (bare metal cortex-m3)
它具有执行 64 位旋转的功能:
static u64 R(u64 x,int c) { return (x >> c) | (x << (64 - c)); }
链接器抱怨找不到64位左移和右移的例程:
tweetnacl.c:487: undefined reference to `__aeabi_llsr'
tweetnacl.c:487: undefined reference to `__aeabi_llsl'
我找不到关于这些例程的太多信息。 auselen 提供了对定义这些函数的正确文档的参考。我正在使用的工具链版本:
arm-none-eabi-gcc (Sourcery G++ Lite 2010q1-188) 4.4.1
此工具链中是否存在实现?哪些可能的标志可能导致构建过程排除任何编译器提供的实现?
解决方案:原来我需要在 libgcc.a 中链接
【问题讨论】:
标签: arm 64-bit bit-manipulation bit-shift cortex-m3