调试符号是否已加载到Linux的内存中? [英] are debug symbols loaded into memory on linux?

查看:134
本文介绍了调试符号是否已加载到Linux的内存中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从可执行文件(或共享库)中剥离调试符号会减少使用的内存量吗? (我知道它减小了磁盘文件的大小,我感兴趣的是实际使用的RAM).

Does stripping debug symbols from an executable (or shared library) reduce the amount of memory used? (I know it reduces the size of the disk file -- what I'm interested in here is that actual RAM used).

Drepper在第13页上的论文(http://www.akkadia.org/drepper/dsohowto.pdf)说:正常的符号表在运行时不使用,因此没有必要剥离二进制文件.它".

Drepper’s paper (http://www.akkadia.org/drepper/dsohowto.pdf) on p.13 says "The normal symbol table is not used at run-time and it is therefore not necessary to strip a binary of it".

OTOH,strip的手册页上说:已剥离的二进制文件将在RAM中占用更少的空间".

OTOH, the man page for strip says "a stripped binary (which) will occupy less space in RAM".

基于一些快速测试,看起来Drepper是正确的(在此并不奇怪),因此strip的手册页是错误的.

Based on some quick tests, it looks like Drepper is correct (no surprise there), and therefore man page for strip is wrong.

任何人都可以帮助确认/拒绝吗?

Can anyone help confirm/deny?

TIA ...

推荐答案

在使用预读来加快启动和程序启动速度的系统上,调试符号的确会浪费文件缓存中的内存.

On systems that use readahead to speed up boot and program launch, debug symbols do waste memory in the file cache.

这篇关于调试符号是否已加载到Linux的内存中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆