使用调试符号在 64 位机器上编译 OpenSSH
Compiling OpenSSH on 64-bit machine with debugging symbols
我正在尝试使用调试符号编译 openssh,但它没有发生,我不知道为什么。
- wget“https://ftp.nluug.nl/security/OpenSSH/openssh-7.2p2.tar.gz”
- tar xfz openssh-7.2p2.tar.gz
- cd openssh-7.2p2
- 自动配置
- ./configure --with-audit=debug
- 制作
- 须藤安装
- objdump --syms bin/ssh
bin/ssh: file format elf64-x86-64
SYMBOL TABLE: no symbols
为什么没有调试符号?请注意,当我执行以下命令时:
objdump --syms bin/ssh.o
我可以看到符号已添加到目标文件中,但在链接器完成文件时未添加到最终的可执行文件中。
提前致谢。
如果你看看 make install
的作用,你会发现
/usr/bin/install -c -m 0755 -s ssh /usr/local/bin/ssh
-s
选项导致调试符号被删除,就像 strip
命令一样。
也许有办法禁用它?
$ ./configure --help |grep strip
--disable-strip Disable calling strip(1) on install
哦,我们开始了。
我正在尝试使用调试符号编译 openssh,但它没有发生,我不知道为什么。
- wget“https://ftp.nluug.nl/security/OpenSSH/openssh-7.2p2.tar.gz”
- tar xfz openssh-7.2p2.tar.gz
- cd openssh-7.2p2
- 自动配置
- ./configure --with-audit=debug
- 制作
- 须藤安装
- objdump --syms bin/ssh
bin/ssh: file format elf64-x86-64
SYMBOL TABLE: no symbols
为什么没有调试符号?请注意,当我执行以下命令时:
objdump --syms bin/ssh.o
我可以看到符号已添加到目标文件中,但在链接器完成文件时未添加到最终的可执行文件中。
提前致谢。
如果你看看 make install
的作用,你会发现
/usr/bin/install -c -m 0755 -s ssh /usr/local/bin/ssh
-s
选项导致调试符号被删除,就像 strip
命令一样。
也许有办法禁用它?
$ ./configure --help |grep strip
--disable-strip Disable calling strip(1) on install
哦,我们开始了。