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 6 months ago
- Status changed from New to Closed
commit 6f214831a73efcf0c7ce197b21d38588265645a1 Author: Robert Mustacchi <firstname.lastname@example.org> 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 <email@example.com> Reviewed by: Jason King <firstname.lastname@example.org> Reviewed by: Richard Lowe <email@example.com> Reviewed by: Andy Fiddaman <firstname.lastname@example.org> Reviewed by: Gergő Doma <email@example.com> Reviewed by: Peter Tribble <firstname.lastname@example.org> Reviewed by: C Fraire <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>