gpt4 book ai didi

gcc - 需要 GLibc 优化

转载 作者:行者123 更新时间:2023-12-03 15:52:07 28 4
gpt4 key购买 nike

为什么不能重新编译 GLibc 关闭所有优化(即 -O0)?

特别是在这样做时:

make CFLAGS='-O0 -w' CXXFLAGS='-O0 -w'

我得到:
 #error "glibc cannot be compiled without optimization"

最佳答案

当我谷歌错误时,第一个结果 tells我到底是为什么。

"In the early startup of the dynamic loader (_dl_start), before relocation of the PLT, you cannot make function calls. You must inline the functions you will use during early startup, or call compiler builtins (__builtin_*).

Without optimizations enabled GCC will not inline functions. The early startup of the dynamic loader will make function calls via an unrelocated PLT and crash." -- Carlos O'Donell

关于gcc - 需要 GLibc 优化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30089652/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com