Add linker option to include local symbols in the linker map.
authorNick Clifton <nickc@redhat.com>
Wed, 10 May 2023 09:29:52 +0000 (10:29 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 10 May 2023 09:29:52 +0000 (10:29 +0100)
commit496917ce466c703c1ae3bf1cbbe753de1c091445
tree0c4992f98acf35f1965238bb7163a7d8cab0ee78
parent2093c2af3c58da1fe63807dfea07d56afc6e7a8a
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.
ld/ChangeLog
ld/NEWS
ld/ld.h
ld/ld.texi
ld/ldlang.c
ld/ldlex.h
ld/lexsup.c
ld/testsuite/ld-scripts/map-address.exp
ld/testsuite/ld-scripts/map-locals.d [new file with mode: 0644]
ld/testsuite/ld-scripts/sizeof.s