Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
linker链接报错
C库_LIBC
.fini
5
和C库有关的link 错误
发布于 2023-02-08 10:59:28 浏览:482
订阅该版
链接错误: ``` fini.c:(.text.__libc_fini_array+0x1c): undefined reference to `_fini' ``` 编译成功,链接的时候C库出错。完整的链接命令行如下: ``` 09:45:40 **** Incremental Build of configuration Debug for project work_vehicle **** make -j8 all linking... arm-none-eabi-gcc -T "E:\RT-ThreadStudio\workspace\work_vehicle\board\linker_scripts\link.lds" -nostartfiles -Xlinker --gc-sections -L"E:\RT-ThreadStudio\workspace\work_vehicle\packages\microros\build" -Wl,-Map,"rtthread.map" -Xlinker --cref -mcpu=cortex-m7 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -lm -lgcc -lc -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -o "rtthread.elf" ./xip/fire_imxrt1052_sdram_ini_dcd.o ./xip/fire_imxrt1052_spiflash_config.o ./xip/fsl_flexspi_nor_boot.o ./rt-thread/src/clock.o ./rt-thread/src/components.o ./rt-thread/src/device.o ./rt-thread/src/idle.o ./rt-thread/src/ipc.o ./rt-thread/src/irq.o ./rt-thread/src/kservice.o ./rt-thread/src/memheap.o ./rt-thread/src/mempool.o ./rt-thread/src/object.o ./rt-thread/src/scheduler.o ./rt-thread/src/thread.o ./rt-thread/src/timer.o ./rt-thread/libcpu/arm/cortex-m7/context_gcc.o ./rt-thread/libcpu/arm/cortex-m7/cpu_cache.o ./rt-thread/libcpu/arm/cortex-m7/cpuport.o ./rt-thread/libcpu/arm/common/backtrace.o ./rt-thread/libcpu/arm/common/div0.o ./rt-thread/libcpu/arm/common/showmem.o ./rt-thread/components/utilities/ulog/backend/console_be.o ./rt-thread/components/utilities/ulog/ulog.o ./rt-thread/components/net/sal/src/sal_socket.o ./rt-thread/components/net/sal/socket/net_netdb.o ./rt-thread/components/net/sal/socket/net_sockets.o ./rt-thread/components/net/sal/impl/af_inet_lwip.o ./rt-thread/components/net/sal/dfs_net/dfs_net.o ./rt-thread/components/net/netdev/src/netdev.o ./rt-thread/components/net/netdev/src/netdev_ipaddr.o ./rt-thread/components/net/lwip/port/ethernetif.o ./rt-thread/components/net/lwip/port/sys_arch.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/netif/ethernet.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/netif/lowpan6.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/ipv4/autoip.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/ipv4/dhcp.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/ipv4/etharp.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/ipv4/icmp.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/ipv4/igmp.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/ipv4/ip4.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/ipv4/ip4_addr.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/ipv4/ip4_frag.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/def.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/dns.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/inet_chksum.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/init.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/ip.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/memp.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/netif.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/pbuf.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/raw.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/stats.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/sys.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/tcp.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/tcp_in.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/tcp_out.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/timeouts.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/core/udp.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/apps/ping/ping.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/api/api_lib.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/api/api_msg.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/api/err.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/api/netbuf.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/api/netdb.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/api/netifapi.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/api/sockets.o ./rt-thread/components/net/lwip/lwip-2.0.3/src/api/tcpip.o ./rt-thread/components/libc/posix/io/poll/poll.o ./rt-thread/components/libc/posix/io/poll/select.o ./rt-thread/components/libc/posix/delay/delay.o ./rt-thread/components/libc/compilers/newlib/syscalls.o ./rt-thread/components/libc/compilers/common/stdlib.o ./rt-thread/components/libc/compilers/common/time.o ./rt-thread/components/finsh/cmd.o ./rt-thread/components/finsh/msh.o ./rt-thread/components/finsh/msh_file.o ./rt-thread/components/finsh/shell.o ./rt-thread/components/drivers/serial/serial.o ./rt-thread/components/drivers/phy/phy.o ./rt-thread/components/drivers/misc/pin.o ./rt-thread/components/drivers/ipc/completion.o ./rt-thread/components/drivers/ipc/dataqueue.o ./rt-thread/components/drivers/ipc/pipe.o ./rt-thread/components/drivers/ipc/ringblk_buf.o ./rt-thread/components/drivers/ipc/ringbuffer.o ./rt-thread/components/drivers/ipc/waitqueue.o ./rt-thread/components/drivers/ipc/workqueue.o ./rt-thread/components/drivers/cputime/cputime.o ./rt-thread/components/drivers/can/can.o ./rt-thread/components/dfs/src/dfs.o ./rt-thread/components/dfs/src/dfs_file.o ./rt-thread/components/dfs/src/dfs_fs.o ./rt-thread/components/dfs/src/dfs_posix.o ./packages/microros/src/identifier.o ./packages/microros/src/rtt_serial_transports.o ./packages/microros/src/rtt_udp_transport.o ./packages/microros/src/string_utilities.o ./packages/microros/src/type_utilities.o ./libraries/fatfs/diskio.o ./libraries/fatfs/ff.o ./libraries/fatfs/ffsystem.o ./libraries/fatfs/ffunicode.o ./libraries/fatfs/fsl_sd_disk.o ./libraries/drivers/drv_can.o ./libraries/drivers/drv_eth.o ./libraries/drivers/drv_gpio.o ./libraries/drivers/drv_sdram.o ./libraries/drivers/drv_uart.o ./libraries/Sdmmc/fsl_sd.o ./libraries/Sdmmc/fsl_sdmmc_common.o ./libraries/Sdmmc/fsl_sdmmc_event.o ./libraries/Sdmmc/fsl_sdmmc_host.o ./libraries/MIMXRT1050/MIMXRT1052/utilities/str/fsl_str.o ./libraries/MIMXRT1050/MIMXRT1052/utilities/log/fsl_log.o ./libraries/MIMXRT1050/MIMXRT1052/utilities/io/fsl_io.o ./libraries/MIMXRT1050/MIMXRT1052/utilities/debug_console/fsl_debug_console.o ./libraries/MIMXRT1050/MIMXRT1052/gcc/startup_MIMXRT1052.o ./libraries/MIMXRT1050/MIMXRT1052/drivers/fsl_cache.o ./libraries/MIMXRT1050/MIMXRT1052/drivers/fsl_clock.o ./libraries/MIMXRT1050/MIMXRT1052/drivers/fsl_common.o ./libraries/MIMXRT1050/MIMXRT1052/drivers/fsl_elcdif.o ./libraries/MIMXRT1050/MIMXRT1052/drivers/fsl_enet.o ./libraries/MIMXRT1050/MIMXRT1052/drivers/fsl_flexcan.o ./libraries/MIMXRT1050/MIMXRT1052/drivers/fsl_gpio.o ./libraries/MIMXRT1050/MIMXRT1052/drivers/fsl_lpuart.o ./libraries/MIMXRT1050/MIMXRT1052/drivers/fsl_os_abstraction_rtthread.o ./libraries/MIMXRT1050/MIMXRT1052/drivers/fsl_semc.o ./libraries/MIMXRT1050/MIMXRT1052/drivers/fsl_usdhc.o ./libraries/MIMXRT1050/MIMXRT1052/drivers/fsl_xbara.o ./libraries/MIMXRT1050/MIMXRT1052/drivers/fsl_xbarb.o ./libraries/MIMXRT1050/MIMXRT1052/drivers/generic_list.o ./libraries/MIMXRT1050/MIMXRT1052/system_MIMXRT1052.o ./board/MCUX_Config/clock_config.o ./board/MCUX_Config/pin_mux.o ./board/board.o ./applications/picture/bmp.o ./applications/picture/gif.o ./applications/picture/piclib.o ./applications/picture/tjpgd.o ./applications/bsp/sd_fatfs_test/bsp_sd_fatfs_test.o ./applications/bsp/sd/bsp_sd.o ./applications/bsp/led/bsp_led.o ./applications/bsp/lcd/bsp_lcd.o ./applications/bsp/lcd/lcd_test.o ./applications/bsp/font/fonts.o ./applications/bsp/beep/bsp_beep.o ./applications/cpuusage.o ./applications/main.o ./applications/micro_ros_client.o ./applications/micro_ros_pub_int32.o ./applications/micro_ros_service.o ./applications/micro_ros_sub_int32.o ./applications/micro_ros_subscriber.o -lmicroros -lc -lm e:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/5.4.1/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc.a(lib_a-fini.o): In function `__libc_fini_array': fini.c:(.text.__libc_fini_array+0x1c): undefined reference to `_fini' collect2.exe: error: ld returned 1 exit status make: *** [makefile:94: rtthread.elf] Error 1 "make -j8 all" terminated with exit code 2. Build might be incomplete. 09:45:42 Build Failed. 1 errors, 0 warnings. (took 1s.696ms) ``` 迫切需要大佬指导下,怎么才能修复这个错误,特别感谢!
查看更多
1
个回答
默认排序
按发布时间排序
xiaorui
认证专家
2023-02-08
小睿手办 https://item.taobao.com/item.htm?id=674889867009
你可以看下这个标签 - [.fini](https://club.rt-thread.org/ask/tag/78ae0114fea92d31.html)
撰写答案
登录
注册新账号
关注者
0
被浏览
482
关于作者
Rongcai
这家伙很懒,什么也没写!
提问
10
回答
1
被采纳
0
关注TA
发私信
相关问题
1
关于.init段和.fini段
2
allwinner_tina包加入speex编译问题
3
Link error from micro-ros
4
rt-thread studio linking第三方库出现问题
5
gcc编译不能链接超过 2MB
6
请问如何修改IAR的工程的linker的路径?
7
编译失败ld returned 1 exit status
8
代码链接错误,找不到函数
9
开启-flto后在链接阶段失败,有人碰到过的吗 ?
10
HAl库函数链接报错
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
使用百度AI助手辅助编写一个rt-thread下的ONVIF设备发现功能的功能代码
2
RT-Thread 发布 EtherKit开源以太网硬件!
3
rt-thread使用cherryusb实现虚拟串口
4
《C++20 图形界面程序:速度与渲染效率的双重优化秘籍》
5
《原子操作:程序世界里的“最小魔法单位”解析》
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
ESP8266
I2C_IIC
WIZnet_W5500
UART
ota在线升级
PWM
cubemx
freemodbus
flash
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
Debug
编译报错
msh
SFUD
keil_MDK
rt_mq_消息队列_msg_queue
ulog
C++_cpp
at_device
本月问答贡献
踩姑娘的小蘑菇
7
个答案
3
次被采纳
a1012112796
13
个答案
2
次被采纳
张世争
9
个答案
2
次被采纳
rv666
5
个答案
2
次被采纳
用户名由3_15位
11
个答案
1
次被采纳
本月文章贡献
程序员阿伟
9
篇文章
2
次点赞
hhart
3
篇文章
4
次点赞
大龄码农
1
篇文章
5
次点赞
ThinkCode
1
篇文章
1
次点赞
Betrayer
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部