diff options
author | Nick Clifton <nickc@redhat.com> | 2023-05-10 10:29:52 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2023-05-10 10:29:52 +0100 |
commit | 496917ce466c703c1ae3bf1cbbe753de1c091445 (patch) | |
tree | 0c4992f98acf35f1965238bb7163a7d8cab0ee78 /ld/ld.texi | |
parent | 2093c2af3c58da1fe63807dfea07d56afc6e7a8a (diff) | |
download | gdb-496917ce466c703c1ae3bf1cbbe753de1c091445.zip gdb-496917ce466c703c1ae3bf1cbbe753de1c091445.tar.gz gdb-496917ce466c703c1ae3bf1cbbe753de1c091445.tar.bz2 |
Add linker option to include local symbols in the linker map.
PR 16566
* ldlang.c (ld_is_local_symbol): New function. (print_input_section): Add code to display local symbols in the section.
* ldlex.h (enum option_values): Add OPTION_PRINT_MAP_LOCALS and OPTION_PRINT_MAP_LOCALS.
* lexsup.c (ld_options[]): Add entries for --print-map-locals and --no-print-map-locals.
* NEWS: Mention the new feature.
* ld.h (struct ld_config_type): Add print_map_locals field.
* ld.texi: Document the new command line option.
* testsuite/ld-scripts/sizeof.s: Add a local symbol.
* testsuite/ld-scripts/map-locals.d: New test control file.
* testsuite/ld-scripts/map-address.exp: Run the new test.
Diffstat (limited to 'ld/ld.texi')
-rw-r--r-- | ld/ld.texi | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -870,6 +870,16 @@ is 0x1, and @file{bar.o}, whose 0xc0010001 property value is 0x1. Print (or do not print) the list of discarded and garbage collected sections in the link map. Enabled by default. +@kindex --print-map-locals +@kindex --no-print-map-locals +@item --print-map-locals +@itemx --no-print-map-locals +Print (or do not print) local symbols in the link map. Local symbols +will have the text @samp{(local)} printed before their name, and will +be listed after all of the global symbols in a given section. +Temporary local symbols (typically those that start with @samp{.L}) +will not be included in the output. Disabled by default. + @kindex -n @cindex read-only text @cindex NMAGIC |