Project

General

Profile

Actions

Feature #10942

closed

want nm option to not sort symbols

Added by Robert Mustacchi over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Sometimes when using nm, you want to output symbols just based on the order in the symbol table. While it's possible to use sed and then sort to get there, it'd be useful to add support for this by default. I suggest we use the '-i' flag for index. This complements the -v and -n options which sort by values and names. Other nm implementations use -p for that, but we use -p for something else entirely. The nm option set is pretty arbitrary.

To test the -i option I went through and just used nm on several different files and made sure the index was in the right order. I also verified that combining -i with -n or -v created the appropriate warnings.

Next, I decided to regression test every option due to some of the clean up involved in this change. For that I went and used every option to nm on libraries like libgcc_s/libstdc++ and made sure that we had the same output for the other options. I used each option on its own.

Actions

Also available in: Atom PDF