Embedded Design Handbook

ID 683689
Date 8/28/2023
Public
Document Table of Contents

4.1.6.13.2. More Complex nios2-elf-nm Example

To generate a list of symbols from your .elf file in ascending address order, use the following command:

nios2-elf-nm <project>.elf | sort -n > <project>.elf.nm

The <project> .elf.nm file contains all of the symbols in your executable file, listed in ascending address order. In this example, the nios2-elf-nm command creates the symbol list. In this text list, each symbol’s address is the first field in a new line. The -n option for the sort command specifies that the symbols be sorted by address in numerical order instead of the default alphabetical order.