root@zedboard-zynq7:~# /usr/xenomai/demo/altency /usr/xenomai/demo/altency: /lib/libgcc_s.so.1: version `GCC_3.5' not found (required by /usr/xenomai/demo/altency) /usr/xenomai/demo/altency: /lib/libgcc_s.so.1: version `GCC_3.5' not found (required by /usr/xenomai/lib/libalchemy.so.0) /usr/xenomai/demo/altency: /lib/libgcc_s.so.1: version `GCC_3.5' not found (required by /usr/xenomai/lib/libcopperplate.so.0) /usr/xenomai/demo/altency: /lib/libgcc_s.so.1: version `GCC_3.5' not found (required by /usr/xenomai/lib/libcobalt.so.2) /usr/xenomai/demo/altency: /lib/libgcc_s.so.1: version `GCC_3.5' not found (required by /usr/xenomai/lib/libmodechk.so.0)
从交叉编译工具链拷贝 scp /usr/arm-linux-gnueabihf/lib/libgcc_s.so.1 root@10.11.11.83:~
root@zedboard-zynq7:~# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 0e:b0:ba:5e:ba:12 brd ff:ff:ff:ff:ff:ff inet 10.11.11.83/24 scope global eth0 valid_lft forever preferred_lft forever 3: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1 link/ipip 0.0.0.0 brd 0.0.0.0 root@zedboard-zynq7:~# ls libgcc_s.so.1 root@zedboard-zynq7:~#
root@zedboard-zynq7:~# cp libgcc_s.so.1 /lib/ root@zedboard-zynq7:~# /usr/xenomai/demo/altency 0"000.000| BUG in __xenomai_init(): [main] running non-SMP libraries on SMP kernel? build with --enable-smp or disable check with --no-sanity
libgcc是什么
这是gcc官方的解释,https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html ,这里有个中文版http://gccint.cding.org/Libgcc.html,最明显的看到了整型和浮点数的转换,而产品平台正好是软浮点。
libgcc的静态库是libgcc.a,动态库是libgcc_s.so.1(libgcc_s.so指向libgcc_s.so.1)。
libgcc是GCC提供的一个低层运行时库,当一些操作/运算在特定平台上不支持时,GCC会自动生成对这些库函数的调用,使用这些库函数来模拟实现。从概念上和源码实现中,又可以分为libgcc1和libgcc2,虽然它们最终会被编译合并为libgcc.a。
From《libgcc1和libgcc2的区别》
是否需要libgcc_s.so.1
搜索到下面一个信息 https://wiki.osdev.org/Libgcc
When do I need to link with libgcc?
All code compiled with GCC must be linked with libgcc.
[root@centos7 glibc]# rpm -qlp libgcc-12.0.1-0.14.fc36.armv7hl.rpm warning: libgcc-12.0.1-0.14.fc36.armv7hl.rpm: Header V4 RSA/SHA256 Signature, key ID 38ab71f4: NOKEY /lib/libgcc_s-12-20220401.so.1 /lib/libgcc_s.so.1 /usr/lib/.build-id /usr/lib/.build-id/b7 /usr/lib/.build-id/b7/db0eb9e1ff45a0d769b266513dc956eaf1c0d9 /usr/share/licenses/libgcc /usr/share/licenses/libgcc/COPYING /usr/share/licenses/libgcc/COPYING.LIB /usr/share/licenses/libgcc/COPYING.RUNTIME /usr/share/licenses/libgcc/COPYING3 /usr/share/licenses/libgcc/COPYING3.LIB [root@centos7 glibc]#