表达式:
printf("%d\n", position*100/len);
错误信息:
cmd/sf.c:313: undefined reference to `__aeabi_ldivmod'
arm-linux-gnueabihf-ld.bfd: BFD (GNU Binutils for Ubuntu) 2.24 assertion fail ../../bfd/elf32-arm.c:7696
arm-linux-gnueabihf-ld.bfd: error: required section '.rel.plt' not found in the linker script
arm-linux-gnueabihf-ld.bfd: final link failed: Invalid operation
make: *** [u-boot] Error 1
离线
离线
突然发现, 添加一个普通的算术除法没有错误:
printf("%d\n", 1/2);
那是不是这里有64位整数引起?
printf("%d\n", position*100/len);
离线