Forrest logo
back to the nm tool

nm:tldr:9e99c

nm: List only undefined symbols in a file.
$ nm -u ${filename-o}
try on your machine

The command "nm -u ${filename-o}" is used to display the undefined symbols in an object file or executable.

Let's break down the command:

  • nm stands for "symbol table manager." It is a command-line tool present in Unix-like operating systems (e.g., Linux) that displays information about the symbols (e.g., functions, variables) in an object file or binary.

  • -u is an option or flag for nm, specifying that only undefined symbols should be displayed. Undefined symbols are references to functions or variables that are used in the current file but not defined within it. These symbols will need to be resolved during the linking stage of the compilation process.

  • ${filename-o} is a variable that represents the filename or path of the object file or executable. The braces {} are used to enclose the variable name, and the -o option is used to set a default value for the variable if it is not provided. This syntax allows you to specify the filename when executing the command.

Overall, the command "nm -u ${filename-o}" is used to show the undefined symbols in a given object file or executable. It helps identify symbols that need to be resolved during the linking process.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the nm tool