- 论坛徽章:
- 95
|
回复 5# cdsfiui
我的疑问在于这里,为什么不加选项的时候反而能看到check_stack_fail这个段
Ubuntu gcc(1):
-fstack-protector
Emit extra code to check for buffer overflows, such as stack smashing attacks. This is done by adding a guard variable to functions with
vulnerable objects. This includes functions that call "alloca", and functions with buffers larger than 8 bytes. The guards are
initialized when a function is entered and then checked when the function exits. If a guard check fails, an error message is printed and
the program exits.
NOTE: In Ubuntu 6.10 and later versions this option is enabled by default for C, C++, ObjC, ObjC++, if none of -fno-stack-protector,
-nostdlib, nor -ffreestanding are found.
现在我的疑问是,你到底看的哪的文档?另外,有疑问的时候,为什么不去通过 g++ -v 检查下编译过程中的实际参数?
BTW, check_stack_fail 就不是个段,而是个函数调用。
|
|