want nm option to not sort symbols
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.
Updated by Electric Monk about 2 months ago
- Status changed from New to Closed
commit 6f214831a73efcf0c7ce197b21d38588265645a1 Author: Robert Mustacchi <email@example.com> Date: 2019-06-03T13:09:10.000Z 10942 want nm option to not sort symbols 10943 nm should be smatch and CERRWARN clean Reviewed by: Patrick Mooney <firstname.lastname@example.org> Reviewed by: Jason King <email@example.com> Reviewed by: Richard Lowe <firstname.lastname@example.org> Reviewed by: Andy Fiddaman <email@example.com> Reviewed by: Gergő Doma <firstname.lastname@example.org> Reviewed by: Peter Tribble <email@example.com> Reviewed by: C Fraire <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>