• undefined reference to `__stack_chk_guard'


    root@ubuntu:~/arm/armv8-bare-metal# make
    aarch64-linux-gnu-ld -T linker.ld linker.ld boot.o vector.o exception.o kernel.o gic_v3.o uart.o psw.o aarch64.o timer.o -o kernel.elf
    exception.o: In function `irq_handle':
    /root/arm/armv8-bare-metal/exception.c:60: undefined reference to `__stack_chk_guard'
    /root/arm/armv8-bare-metal/exception.c:60: undefined reference to `__stack_chk_guard'
    /root/arm/armv8-bare-metal/exception.c:82: undefined reference to `__stack_chk_guard'
    /root/arm/armv8-bare-metal/exception.c:82: undefined reference to `__stack_chk_guard'
    /root/arm/armv8-bare-metal/exception.c:82: undefined reference to `__stack_chk_fail'
    /root/arm/armv8-bare-metal/exception.c:82:(.text+0x444): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `__stack_chk_fail'
    Makefile:32: recipe for target 'kernel.elf' failed
    make: *** [kernel.elf] Error 1

    CFLAGS 添加 -fno-stack-protector

  • 相关阅读:
    day4递归原理及实现
    day4装饰器
    day4迭代器&生成器&正则表达式
    open()函数文件操作
    Python中的内置函数
    function(函数)中的动态参数
    copy深浅拷贝
    collections模块
    set集合
    字典dict常用方法
  • 原文地址:https://www.cnblogs.com/dream397/p/16203190.html
Copyright © 2020-2023  润新知