Bug 16566 - Please provide a way to include static symbols in linker map file
Summary: Please provide a way to include static symbols in linker map file
Status: NEW
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.22
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-12 15:42 UTC by Paul Sokolovsky
Modified: 2017-07-10 16:12 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Sokolovsky 2014-02-12 15:42:02 UTC
Link map file (-Map=) is one good way to get detailed information about complete ready-to-deploy binary product. Unfortunately, a map file doesn't include information about local (static in C-speak) symbols. Usage of static symbols is the best practice in contemporary C and other languages, and such situation means that a map file unfortunately is not suitable for many interesting analyses (like for example tracking detailed function sizes across application versions/optimization settings).

So, please consider:

1. Adding a linker option to include local/static symbols in generated map file.
2. Alternatively, it may be argued that users whu are interested in map files are probably want to have information about all symbols anyway, so it can be just changed to include local/static symbols unconditionally, without growing number of command-line options.

Thanks.