3.1.30. waf_tools.nm

Symbol listing from compiled object and linked files using the nm utility.

This waf tool runs the armnm symbol listing utility on compiled object files and linked executables/libraries to produce human-readable symbol tables. The output is written to .nm.log files alongside the original artifacts. Symbol listing is an optional post-processing step controlled by the --run-nm command-line option.

The tool hooks into task generators with the c, cstlib, or cprogram features and creates an nm task for each compiled object file and the final linked output.

3.1.30.1. Usage

  1. The tool is loaded and configured by waf_tools.ti_arm_cgt.find_armnm() and waf_tools.ti_arm_cgt.options():

    # in ti_arm_cgt.py
    @conf
    def find_armnm(ctx):
        ctx.load("nm", tooldir=TOOL_DIR)
    
    # in ti_arm_cgt.py
    def options(opt):
        opt.load("nm", tooldir=TOOL_DIR)
    
  2. Run the build with the --run-nm flag to generate symbol listings:

    waf build_app_ti_arm_cgt --run-nm
    
  3. Symbol listing files are written next to their corresponding object or linked files with the suffix .nm.log.

3.1.30.2. Dependencies

  • TI armnm utility (NM environment variable)

  • TI ARM CGT toolchain (CC_NAME == "armcl")

Functions

configure(ctx)

Configure the nm symbol listing tool.

make_nm_task_objects(self)

Create nm tasks for compiled object files and linked output files.

options(opt)

Register command-line options for the nm tool.

Classes

nm(*k, **kw)

Task that runs the NM symbol listing tool on a single file.