我尝试从目标文件中删除符号,如下所示:
gcc -c test.c
strip --strip-symbol=test_sym test.o test.o
Run Code Online (Sandbox Code Playgroud)
test_sym是一个在 中实现的函数test.c。
strip返回以下消息:
strip: not stripping symbol 'test_sym' because it is named in a relocation.
Run Code Online (Sandbox Code Playgroud)
由于该符号是在同一文件中实现的,因此会出现该错误。但是有没有办法删除该符号?
在代码生成约定的gcc中有一个选项"-fstack-reuse".
https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gcc/Code-Gen-Options.html#Code-Gen-Options
功能返回时; 他们的堆栈也在倒带.但堆栈重用选项究竟意味着什么呢?
有没有办法在不停止/退出正在运行的程序的情况下退出 gdb 连接?我需要在 gdb 连接关闭后继续运行程序。