are debug symbols loaded into memory on linux?

2020-07-26 14:53发布

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’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, the man page for strip says "a stripped binary (which) will occupy less space in RAM".

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...

标签: linux
1条回答
疯言疯语
2楼-- · 2020-07-26 15:43

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

查看更多
登录 后发表回答